PDA

View Full Version : Shadowing Oddity...



NitroGL
10-28-2002, 03:14 PM
This could be a driver related problem, but has anyone else ever had this problem with infinite volume shadows?
http://evilman.netfirms.com/shadowoddity.jpg

Edit:
BTW, it's the big red shadow, it should be black (stupid jpeg compression makes it look like the red was added in Photoshop... http://www.opengl.org/discussion_boards/ubb/rolleyes.gif oh well)

And this only seems to happen when the light is in a particular place.

[This message has been edited by NitroGL (edited 10-28-2002).]

SirKnight
10-28-2002, 04:46 PM
I had a problem like this once. What I did to correct it was call glColor( 0, 0, 0 ) as the last line of code in my render func. Otherwise the last color i used would be blended with the shadow and/or the whole scene. Try that and see what happens. Also do you disable color writes before you render the shadow volumes?

-SirKnight

[This message has been edited by SirKnight (edited 10-28-2002).]

mattc
10-28-2002, 05:06 PM
just a thought: maybe your first rendering pass (shadowing) is not setting its colour so the last colour specified carries over to the start of the next frame? could always happen http://www.opengl.org/discussion_boards/ubb/smile.gif

NitroGL
10-28-2002, 06:11 PM
Interesting...

I added a glColor4f(0.0f, 0.0f, 0.0f, 0.0f); to the top of my shadow render function and it seems to have got rid of it. Still don't get why it happens in the first place though (I don't use glColor anywhere, all color is handled by the frag program).

Oh well.

Thanks!

mattc
11-04-2002, 11:00 AM
well, it sounds like you have things being coloured before the current colour is initialised by your program, in terms of gl context... if you can see what i mean 8)