Advertisement Jump to content
Sign in to follow this  

Shadowing in lightmap space

This topic is 4583 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 there, I'm working on a process of performing all my lighting and shadows in lightmap space. Currently I am rendering all my lighting and shadows for a mesh into a single render target, but I am rendering them into lightmap space - like the way max does render-to-texture. Theoretically this means I can have as many lights as I want (not restricted to GL's 8). It works fine with one light and one mesh, but certain problems arise when I try to take it any further. 1. I'm not able to use the accumulation buffer for a FBO. Is there any way around this? 2. I'm using an octree and want to be able to have one single FBO for the whole octree, by subdividing the FBO into sections for each of the octree nodes dependant upon their distance from the camera. For example, if the octree has 3 end nodes, and the camera is in node 1, I want that nodes lightmap to take up the majority of the render target, and the other 2 nodes to use smaller sections of it. Is there a way to do this on the fly? 3. I'm using a color buffer as well as a depth buffer for each light in the shadow rendering pass, to render the distance each pixel is from the camera. I then use this when compiling the lightmap to compute the soft penumbra for the shadows. I'm thinking there must be a more efficient way of doing this also. Maybe rendering all the shadows to one FBO as described in .2 Can anyone point me in the right direction?

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!