I wasn't sure where to post this, but here seems like a good place, I recently being playing around with Nvidia's shaders to see whether they work in DBpro correctly and if it appears to look undesired effect. And attempt a tweak with the very limited knowledge I have with shaders. Along with many failures, I was able to finally get nvidia’s “ddgodray.fx” working correctly in DarkBasic Pro, obtaining the desired effect, and it was fairly simple change.
The Screen Shots below will show what was done, with the source code below each image. With a Zip attached to demonstrate the difference in two example programs.
Notice in this screenshot a dark grey (Near black) overlay where the rays are has no transparency:
rem Initialise
sync on
sync rate 0
color backdrop 0
rem Load model and shader effect
load object "cube(T).dbo",1
load object "cube(T).dbo",2
load image "BrickOldMixedSize0139_2_S.png",1
texture object 2,1
Scale object 2,99,99,99
autocam off
load effect "ddGodRays.fx",1,1
set object effect 1,1
set object transparency 1,3
//Set alpha mapping on 1,25
do
ny=mousemovex()
ry=ry+ny
Set camera to follow 0,0,0,ry,200,10,3,0
rem Draw main camera
sync mask %001 : sync
loop
Notice in this screenshot the dark grey overlay has been removed and the wall object texture can be seen through the god ray:
rem Initialise
sync on
sync rate 0
color backdrop 0
rem Load model and shader effect
load object "cube(T).dbo",1
load object "cube(T).dbo",2
load image "BrickOldMixedSize0139_2_S.png",1
texture object 2,1
Scale object 2,99,99,99
autocam off
load effect "ddGodRays Modified.fx",1,1
set object effect 1,1
set object transparency 1,3
//Set alpha mapping on 1,25
do
ny=mousemovex()
ry=ry+ny
Set camera to follow 0,0,0,ry,200,10,3,0
rem Draw main camera
sync mask %001 : sync
loop
Edit: Trying to fix BBcode mistakes
![](/images/smilies/dead.gif)
Edit 2: BBcodes fixed