cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

bugsweeper
Journeyman III

Corrupted texture after rendering to it (GL)

The shadowmap has some weird spots on it...

A real and serious problem this time.

A certain combination of OpenGL calls can make rendering to a depth texture look wrong. I don't know much about it, all I know is that it's triggered by some imposters I'm rendering and that I'm not sure if it's my bug or a driver bug or both.

The wireframe of the object is rendered correctly (I didn't change the fill mode to get that) but everything else is set to some odd repeating pattern. The texture is cleared before rendering though.

http://img14.imageshack.us/g/dstrike2011043007310954.jpg/

You can see the pattern in the first image and the wireframe in the second.

The main problem with this is that it's not consistent. Thus, I cannot really know what's the cause of this problem, it shows up only when the camera is in certain spots (and thus rendering some imposters).

I also haven't found any good differences between rendering imposters and meshes. The only one I know of ATM is that imposters are rendered from RAM (vertex arrays) and meshes use indexed vertex buffers.

I am also quite sure that this is a bug on my side. It's just that OpenGL gives no errors of any kind to tell me when I'm doing something wrong.

0 Likes
0 Replies