Sign in to follow this  

Volumetric Lights using ShadowMaps

This topic is 4167 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
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

This topic is 4167 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.

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