Original Post
🔒 Locked
does shadow mapping require an additional render pass?
Advertisement
Construction of the shadow map involves rendering the scene from the light's point of view. Unless you happen to also be viewing the scene from the light's point of view (in which case no shadows will be visible from that light), you can't really escape doing an extra pass for it.
Not sure what is the question here.
Shadow-mapping requires that you render at least two scenes : the scene from each light position (more precisely, each light you want to project shadows, because many insignificant little glowing light sources don't really need shadows) and, of course, the scene from the viewer's position.
But if you want to save multi-pass because for instance you're rendering your main scene to a big FSAA'ed screen, you don't really need to render your scene multiple times from the viewer's position. With some finely tuned shaders, and thanks to shader support on the hardware if you have the chance to use pixels shaders, you can render you "viewer's scene" with shadows in the same pass that another pass for the same scene. However, you still need to render the "light scene" for each light, but for this scene you generally use a different buffer (off-screen rendering) which is smaller, eg 128x128, which optimizes fillrate and texture transfert, but also may reduce image quality (all in all you always have to balance performance and quality obviously).
Shadow-mapping requires that you render at least two scenes : the scene from each light position (more precisely, each light you want to project shadows, because many insignificant little glowing light sources don't really need shadows) and, of course, the scene from the viewer's position.
But if you want to save multi-pass because for instance you're rendering your main scene to a big FSAA'ed screen, you don't really need to render your scene multiple times from the viewer's position. With some finely tuned shaders, and thanks to shader support on the hardware if you have the chance to use pixels shaders, you can render you "viewer's scene" with shadows in the same pass that another pass for the same scene. However, you still need to render the "light scene" for each light, but for this scene you generally use a different buffer (off-screen rendering) which is smaller, eg 128x128, which optimizes fillrate and texture transfert, but also may reduce image quality (all in all you always have to balance performance and quality obviously).
for the record; a 3rd, and final, part is in the works showing how to shadow map with the FBO extension and glsl...
you'd have to copy the framebuffer to a texture (glCopySubTexImage & glCopyTexImage iirc).
however, you can't do shadow mapping with just plain OGL1.1 as it lacks all the shadowing extensions...
however, you can't do shadow mapping with just plain OGL1.1 as it lacks all the shadowing extensions...
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement