Jump to content
  • Advertisement
Sign in to follow this  
ken2240

How implements Sun Shafts[S.T.A.L.K.E.R.: Clear Sky Method]

This topic is 2059 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, All

I know how to implement the Sun Shafts of screen space that is used in CryEngine.

However, this way is ineffective if the sun does not exist in a screen.

I want to implement a Sun Shafts that are used in the Stalker.

How does this method implement it?

If you may know some, please teach me.

I am glad when there are documents and source code.

Share this post


Link to post
Share on other sites
Advertisement
I search it by the word Sun Shafts,God Rays and Crepuscular rays.
However, I am found only for implementation of CryEngine.
Please Help!

Share this post


Link to post
Share on other sites
there are a few demos with full source code in google just search 'screen space god rays' or 'screen space sun-shafts' and look at results on first page. I have used those when making it in my engine.

Share this post


Link to post
Share on other sites
One technique to get volumetric shadows / godrays that are present even when the light source is not visible is marching through the shadowmap.
So for sun/directional light for example you would do a full screen pass, potentially downres-ed for performance reasons, where for each pixel you step through the scene from pixel pos to scene pos, sampling the shadow map at each step. This gives you the atmosphere amount in shadow.

Share this post


Link to post
Share on other sites
I found only one information. Crepuscular rays of X-Ray Engine seems to be using the depth map.

I want to know the implementation crepuscular rays are visible even when the sun does not exist in the screen.

Share this post


Link to post
Share on other sites
godrays.png
Uploaded with ImageShack.us
You mean this? Ray marching is the way to go! It's not even that expensive compared to a radial blur as long as you use a small shadow map. You can even do it in half resolution and blur it like SSAO.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!