GLSL-depthfirst problem and shadowbuffer-blending problem
Hi! I have 2 questions...
1.
In my game I previously used Cg. In the renderer I first did a depthfirst pass and then all the normal passes. With the depthfirst I gained about 30% speed. Now I have rewritten the game to GLSL and it works fine but now depthfirst only give me less then 1% speedup. Why? Does GLSL have some auto depthfirst or is it more overhead per pass in GLSL?
2.
My current render loop:
RenderAmbientPass();
for( i = 0; i < numLights; i++ ) {
RenderShadowBuffer(i);
RenderLightPass(i);
}
It works fine. The problem is when I want to render alpha blended surfaces, normally you would render all non-transparent surfaces, sort your transparent surfaces and the render them with no z-draws. The problem is that in my render loop I render all lights as a different pass and render the lights shadowbuffer just before. So if I want to render transparent surfaces I have to rerender all shadowbuffers (Slow!) or pre-render all shadowbuffers for all lights (A lot of GPU mem!)
This must be a pretty common problem, is there a good solution?
// Coorn
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement