I have a single (1024*1024) texture (fbo) I want to display in a orthogonal setup after rotating it a bit in the z and x direction. After which it looks ugly
I tried AF, but I didn’t see any difference.
glBindTexture(GL_TEXTURE_2D, fboTex);
glRotatef( 45f,1f,0f,0f);
glRotatef( 20f,0f,0f,1f);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f);
Try trilinear filtering (GL_LINEAR_MIPMAP_LINEAR), don’t forget to build mipmaps first. Also, 2.0 is the minimal value you can specify according to the extension spec, try a higher value.
Will building mipmaps help? It is only one texture rendered on a single quad.
16.0f still looks exactly the same. How do I test if everything is going as expected?
Ok, then anotehr question: what is the size of the rasterized quad? I mean, if you map the texture to a image with a smaller size, say, 500x500 pixels, you can’t expect good filtering quality (this is where the mipmaps kick in – or use a smaller FBO). There is nothign else that comes to my mind right now
Mipmapping didn’t change anything.
Maybe I got it wrong but if the size of the texture is about the size of the object (in pixels) mipmapping will not be used, or am I wrong here?
I don’t think there’s much you can do for such fine line textures.
e.g. suppose you have a black texture with a one pixel vertical white line. If you draw that texture to a viewport of the same size, half a pixel offset in the horizontal direction, you get a 2 pixel-wide gray line. 8 pixel height is also rather low for text don’t you agree?
Except for what I said: Using a normal texture iso the fbo makes the font look a lot better.
So I’m looking into the difference or maybe GL_LINEAR is not supported on fbo’s
The texture you created is a normal texture. The fact that you bind it to an FBO doesn’t make it less of a texture. It should behave in the same way as any normal texture as long as you don’t read from and write to it in one pass.
This makes it look like it should (or how I expected it :)).
But also makes the fbo one big black quad as expected.
thus, the problem lies in displaying/filtering of the rgba fbo texture.