Jump to content
  • Advertisement
Sign in to follow this  
tnmartin

OpenGL Multi-pass rendering using the fixed-function pipeline

This topic is 2544 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 there,

I've written a shadow volume routine that makes two passes using the openGL fixed function pipeline. First it needs to render the scene with global ambient lighting, then it renders the shadow volumes with stenciling, and finally it turns off the global ambient and renders my scene again with individual lights. My problems are not with shadows but combining the lighting passes. I'm using glBlendFunc(GL_ONE,GL_ZERO) before the first pass and glBlendFunc(GL_ONE,GL_ONE) for the second pass. The scene looks mostly ok, the shadows appear but everything is just a bit brighter.

To isolate the problem I am trying to simply render a scene without shadows using two passes. One for the global ambient and another only for the diffuse/specular lighting. I'm using the same blending functions for additive blending as above but things are still slightly brighter, more saturated.

Should the single and double pass routines output the same result? Are there any special depth function/depthMask state changes I may have missed?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I think this may actually be a case of over-saturation caused by opengl clamping my additive blends. It actually looks kinda cool...more vibrant.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!