Sign in to follow this  
noatom

Godrays with sprites?

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this