My current rendering engine is using the following algorithm:
*First, render the scene from the point of view of the camera, with a pure black shader and writing to the depth buffer
*Then, for each light:
- render the shadow buffer to a frame buffer linked only of a depth texture
- for each layer of material
+ render the scene, with blend set, no write to the depth buffer, and depth comparison set to less or equal
But I got rendering a.c.n.e (sorry, seems the word is refused in post) !!
So, my main question is:
Is it possible to render to a fame Buffer in order to fill a texture while rendering in the default/static back buffer (not at the same time, but rendering something in the back buffer, then switch the rendering buffer, render a shadow map or a reflection map, and back to render the scene to the back buffer)?
Or do I need to use a render buffer for the main rendering too (which is not that bad, I will be able to switch to a linear workflow)?
Thanks for any helps,