Need Help With GLSL Light Scattering Script!

Hello, I’m a intermediate python coder and dedicated music artist and I wanted to create an emotional game to go with my music (I love making music more than anything). The game I’m making will be strict survival on an island. No Zombies, no monsters, no enemies. Just surviving. I want the island to be beautiful, hints why light scattering through the trees would be gorgeous.

Does anybody have or know where to get a light scattering script? If so, HOW DO I USE IT. <— People tend to forget that part. I have absolutely NO GLSL knowlage so you have to tell me how to hook it up and what properties to set up in the game logic panel.

Thanks! -Jake

I don’t have a script handy but I can tell you how to use them. In your logic bricks there is a “Filter 2D” Actuator. You add a new 2d filter and set the type to “Custom Filter”. This will give you an option to select a “Script” which is populated with your text blocks in your .blend file. You just copy-paste the GLSL code into a text window then point your 2d filter to that text block.

Check out the “Game resources” sub-forum. I seem to remember there being a number of filters being posted there at some point and I’ve seen demos of “God Rays” and various bloom effects.

I have tried this with many shaders I have found with no results. When I play the game, everything is normal.

I don’t understand what I’m supposed to look at. All of those files don’t work.

Do you have a GPU that is running?

you want exactly mean by not working? …More information

I mean I get no result. With that link you posted, it does give me results, but the rays are cast to the side instead of straight down. I tried to mess with the script but I got no fix.

What do you mean?


I’ll get you a working version of a light scattering glsl shader this evening or tomorrow. Is it just light scattering from the sun you are looking for? Hows your knowledge of python? I’ll comment the code, but just so I know how much to comment.

PM me and remind me if I don’t post it by tomorrow.