Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / having hard time understanding shaders

Author
Message
haliop_New
User Banned
Posted: 11th Feb 2015 18:40 Edited at: 11th Feb 2015 18:41
hi
i have a few sprites which i want them to glow
so i took the bloom shader from the tutorials->version2->shaders
so i have bloom.ps and quad.vs in my game media folder

and i try this:

at startup :


and in the loop


but this does absolutly nothing it display everything as if i didnt even use it...

i really want my sprites to glow... so please if you have any idea on how to do so , please say something.

thank you , haliop.
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Feb 2015 19:15 Edited at: 11th Feb 2015 19:28
Hi,

At first the bloom shader itself don't make it glow(regarding sprites)
you could also use a simpler shader:

Thats a blur shader and you should get a similar result for sprites.

And for the bloom shader you need the code from line 27-58
and 110-163


I don't know what exactly you are looking for.
But for better "glow" I would write/or take a light shader and darken everything exept the area wich shall illuminate light using an Illumination map and then blur the result.

Hm.. you even could use the bloom shader for that, but apply an Illumination map like texture to the Initial.ps... should work for sprites ... just thinking loud ^^

Hope I could help somehow


Using AppGameKit V2 Tier1
Jukuma
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: Germany
Posted: 12th Feb 2015 00:43 Edited at: 12th Feb 2015 00:49
I'm not shure but i have the same one and the ID of your renderImage
ID is over 10000. Make a fixed ID (lower) to test it.

Login to post a reply

Server time is: 2024-11-25 16:57:24
Your offset time is: 2024-11-25 16:57:24