Sign in to follow this  
Geometrian

[SOLVED] 3D Texture Noise

Recommended Posts

Geometrian    1810
Hello, I've been working on 3D textures. In my previous thread, the texture itself wasn't being loaded properly. I think I've improved that. However, the noise problem persists. I created a simple test file, which is available here. It loads a picture of a cheeseplate (it was all I could think of) from online, converts it into a 3D texture (a 480×342×1 3D texture) and texture maps a cube. The issue seems to be along the "1" axis. There's weird noise that I can't account for! What's causing this, and how can I fix it? Thanks, -Geometrian [Edited by - Geometrian on June 20, 2009 1:55:42 PM]

Share this post


Link to post
Share on other sites
V-man    813
I didn't see a problem.
Looks like some texels are getting blended with the other edge.
Try to clamp with
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);

Also try glPixelStorei(GL_UNPACK_ALIGNMENT, 1)
before calling glTexImage3D but that shouldn't be a problem since the alignment of 4 is ok in your case
http://www.opengl.org/wiki/Common_Mistakes#Texture_Upload

Share this post


Link to post
Share on other sites

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