PDA

View Full Version : My rendered textures don't look as good



01-22-2004, 08:03 PM
When I open a tga texture in Photoshop, it looks very good (it's 32bit). However, when I try to render it, it looks faded, and ugly. Could it be because I've shrunk it to fit on the QUAD ?
My display is fullscreen at 32bit so that's not the problem.

Thanks.

Relic
01-23-2004, 02:30 AM
Use an internalformat like GL_RGBA8 instead of GL_RGBA to make sure the textures stays 32 bit internally.
If it is smaller, use mipmapping to prefilter the texture to smaller good looking ones.
Use anisotropic filtering if you look at it in sharp angles.

01-25-2004, 06:41 PM
Originally posted by Relic:
Use an internalformat like GL_RGBA8 instead of GL_RGBA to make sure the textures stays 32 bit internally.
If it is smaller, use mipmapping to prefilter the texture to smaller good looking ones.
Use anisotropic filtering if you look at it in sharp angles.

I'm not really sure where to use GL_RGBA8 instead of GL_RGBA.
this is how I load my textures.

=======================
glGenTextures(1, &texture[loop].texID); // Create The Texture ( CHANGE )
glBindTexture(GL_TEXTURE_2D, texture[loop].texID);
glTexImage2D(GL_TEXTURE_2D, 0, texture[loop].bpp / 8, texture[loop].width, texture[loop].height, 0, texture[loop].type, GL_UNSIGNED_BYTE, texture[loop].imageData);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_LINEAR);
=====================

I'm pretty much a newbie, but I see nowhere in my code '16bit' instead of 32..

Help would be greatly apppreciated

soconne
01-25-2004, 07:10 PM
Put it here

glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, texture[loop].width, texture[loop].height, 0, GL_RGB8, GL_UNSIGNED_BYTE, texture[loop].imageData);