Godrays with sprites?

Started by
3 comments, last by noatom 11 years, 1 month ago

How would one create god rays in an environment with just sprites?

I mean I'd like something like this: Have sprites with trees in the background,and rays racing between the gaps.

Is there a tutorial for this? I have basic knowledge of HLSL,but never created god rays.

Advertisement

You can do that, it was done in a bunch of games a few years ago. Time consuming though and can't really match the detailed shapes of the occluders.

( you have your tree meshes place out, and then camera facing tri strips additively blended onto the scene manually placed to match the gaps in foliage with fixed light direction.

A more flexible and less time consuming approach could be tracing through your shadow maps for each pixel on screen, computing the shadow factor for a bunch of steps in the atmosphere. Great results.

A cheaper / simpler approach is the screen space one described in gpu gems 3 I think, where you effectively just do a bunch of directional blurs towards light direction, killing them off if they hit an occluder texel.

damn...this seems like A LOT of work...

Check this out http://xnauk-randomchaosblogarchive.blogspot.co.uk/2012/10/2d-crepuscular-god-rays.html

that looks good but all the code is in c#,and the shader code...well,it's a lot of code.Without a tutorial,I won't be able to implement it...

This topic is closed to new replies.

Advertisement