Sign in to follow this  

Framebuffer projection artifacts

This topic is 3320 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´m trying to implement shadow mapping into my engine using GLSL. It almost works alright but there are still some strange errors that can be seen on the image below. The right image shows the "depth" of the scene beeing rendered from the light´s view beeing rendered to a FBO-texture. However I do not render to a depth map but to the 3 color channels RGB so the "depth" is actually encoded in RGB. In the left part of the screenshot you can see the incomplete 2nd render pass. The FBO-texture is beeing projected onto the scene. As you can see there are some strange artifacts. The weired thing is these only appear if the fbo-texture is beeing projected onto the scene. Projecting a "normal" texture beeing loaded from a image file works just fine. Has anyone come across something similar? Thanks in advance, Ralph

Share this post


Link to post
Share on other sites
i have seen those kind of artifacts before... make sure your math is right with normals and matrix multiplication. weird about image vs screen... not sure... but what caused me to get those was bad math... particularly with normals/tangents

Share this post


Link to post
Share on other sites

Thanks you for your reply.
Well, yes I´ve checked every part of the code again and I think I´m getting crazy :-)
I couldn´t find any obvious error. I´ve atached a screenshot where a "normal" texture is beeing projected and there are definitely no artifacts when moving around...

Free Image Hosting at www.ImageShack.us

Ralph


Share this post


Link to post
Share on other sites
Almost certainly Z-buffer bleeding. Personally I work with shadow volumes (rather than maps) but I would suggest you use glPolygonOffset() with positive or negative values, somewhere in your shadow code.

Also, as the artifact tends to happen mostly/worse at right angles to the light source; you should also look out for un-normalized computation of any "right-vectors"! Dot products can be funny at extremes ;)

Share this post


Link to post
Share on other sites

Hi,

I also thought of massive z-Buffer problems and fiddled around with glPolygonOffset´s parameters though it didn´t affect the result at all.
Now I tried something "new".
I grabbed the framebuffer´s content via gDEBugger and saved it as a texture to the hard drive. Then I loaded that texture and projected it onto the scene using the same projective-settings as before and the same artifacts occured. So the error seems somewhere in the projection part. I really hate that kind of problems :-)

Ralph

Share this post


Link to post
Share on other sites

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