Sign in to follow this  

GLSL-depthfirst problem and shadowbuffer-blending problem

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

Share this post


Link to post
Share on other sites

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