A bit off-topic but still on topic.
But I am trying to get the gasmask shader into a DB Pro project, but I have no clue on what would be required to do in order for it to render properly.
The code I have tried with is the basic code for Dark Shader fullscreen shaders.
Rem Project: Gasmask test
Rem Created: Saturday, November 12, 2011
Rem ***** Main Source File *****
sync on
sync rate 60
make camera 1
color backdrop 1,0
load camera effect "gasmask.fx",1,1
set camera effect 1,1,1
make object sphere 1,10
make object plane 2,2,2,1
load effect "quad.fx",1,0
set object effect 2,1
null=make vector4(1)
set vector4 1,640,480,0,0
set effect constant vector 1,"Viewsize",1
null=delete vector4(1)
texture object 2,0,1
do
position camera 1,camera position x(0),camera position y(0),camera position z(0)
rotate camera 1, camera angle x(0),camera angle y(0),camera angle z(0)
hide object 2
show object 1
sync camera 1
show object 2
hide object 1
sync mask %01
sync
loop
Are lights required? Shaders isnt my strongest.
Looks extremely good in FPSC tou, great work on all of them!
The raindrop effect is very realistic. These shaders and the new feature alone makes me want to make a game with FPSC again
[edit]
Found out that the code I posted didnt even work with standard Dark Shader shaders...
But this code by Green Gandalf at least works with other shaders
set display mode 1024,768,32 `,1 ` *** GG change
`set window off ` *** GG change
reload display pointer ` *** GG change - seems to be essential (no idea why!)
setupBloom()
make object sphere 1,20
autocam off
position camera 0, 0, -100
repeat ` *** GG change (personal taste only)
handleBloom()
until spacekey() ` *** GG change (personal taste only)
end ` *** GG change (personal taste only)
function setupBloom()
rem Initialise
sync on
sync rate 60
rem Make fullscreen shader camera and effect
make camera 1
color backdrop 0,rgb(100,149,237)
color backdrop 1,rgb(100,149,237)
load camera effect "Bloom.dbs",1,0
set camera effect 1,1,1
rem Make fullscreen plane
make object plain 2,2,2,1
load effect "quad.fx",1,0
set object effect 2,1
null = make vector4(1)
set vector4 1,1.0/screen width(),1.0/screen height(),0,0 ` *** GG change
set effect constant vector 1,"InvViewSize",1 ` *** GG change
null = delete vector4(1)
texture object 2,0,1
endfunction
function handleBloom()
rem Position camera to main camera location
position camera 1,camera position x(0),camera position y(0),camera position z(0)
rotate camera 1,camera angle x(0),camera angle y(0),camera angle z(0)
rem Draw fullscreen shader camera
hide object 2
show object 1
sync camera 1
show object 2
hide object 1
sync mask %001 : sync
sync
endfunction
I believe it has has something to do with the float "time", or am I completely wrong?