Jump to content
  • Advertisement
Sign in to follow this  
Key_46

Volumetric Lights using ShadowMaps

This topic is 4380 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, i am trying to implement the volumetric rendering of light in my game engine, i can do this using Hardware Slice Planes intersecting ShadowMaps and i think that the performance is to bad for the final result, i am starting to think... if the graphics are a lot of mathematic calculations so, there must be a way to compute virtual Slice Planes generated by the shader, did someone do this yet? How?

Share this post


Link to post
Share on other sites
Advertisement
Hello, I don't know how to do it with shadowmap... for that matter i would probably use stencil shadows as they already are some kind of light rays (i know the shadow volume isn't exacly what you're looking after, but, it just seems that I wouldn't go into shadowmaps for that matter...) just my opinion.

Share this post


Link to post
Share on other sites
Check out this old thread in which YannL discusses his technique. It's basically just regular volumetric rendering while also projecting the shadow map onto it. Unfortunately he doesn't go into too much detail on his specific implementation because of NDA issues, but maybe this thread will turn into a good resource for detailed information.

Share this post


Link to post
Share on other sites
i've describe in several threads how i think yann l did it so i'll do it here again:

First you render the scene,from the cameras POV without all the lightvolumes to a depth map and to a colormap.

Then render all lightvolumes' backfaces(from the camera POV) to a rendertarget.

Render all lightvolumes' frontfaces to a rendertarget and substract the backfaces's rendertarget from this one(can be done in 1 pass), now we have the distance through the volumes from the camera(distance map)

Now in the final pass render a fullscreen quad,pick some intervall(the smaller the better),"step through the volumes" and check if the point is in shadow or not(through the shadowmap). Now after having walked through the volume average all of the values and write it to another rendertarget which can then be overlayed over the image without lightvolumes.

this approach should work but i'm not really sure how fast it is,because there are many passes and heavy pixelshaders(especially the last one)

regards,
m4gnus

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!