Jump to content
  • Advertisement
Sign in to follow this  

GLSL-depthfirst problem and shadowbuffer-blending problem

This topic is 4688 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!