full screen blur

Previous topic - Next topic

djtoon

hi i saw this thred:
http://www.glbasic.com/forum/index.php?topic=1391.msg9101#msg9101

and the demo fluid dosent seem to compile on the new glbasic?
any ideas how to do a full screen blur?

Kitty Hello

The fluids demo was a bit of a different story. For "simple" bluring do:

Code (glbasic) Select


RenderSceneToOffScreen( sprite_id%) // render to texture 1:1 what you want on the screen
DRAWSPRITE sprite_id%, 0,0 // draw as if there was no bluring
FOR i=0 TO 10 // number of blur steps
    ALPHAMODE 0.05 // adjust this for bluriness
    LOCAL fac# = 1.0 + (i+1) * 0.05 // blur-scaling (play with the *0.05)
    ZOOMSPRITE sprite_id%, 0,0, fac, fac
NEXT
SHOWSCREEN


This should give a pretty blur/glow effect starting from the center of the screen.



djtoon

:) nice
it there a way to use somesort of color threshold?
make everything a solid color?

Slydog

Maybe you can just change the 'ALPHAMODE 0.05' to 'ALPHAMODE 0.0' to force a solid colour.
(I have no idea how this will look)

Here's a fluid code snippet for Dark Basic:
http://forum.thegamecreators.com/?m=forum_view&t=96427&b=6

It uses something called 'cellular automata'?
It should be easy to port to GLBasic, since they're both 'basic' based.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]