martinsm
05-12-2006, 01:03 AM
Hello.
I am implementing some image processing algorithms using OpenGL framebuffer and GLSL shaders. To do so I create framebuffer with float (32-bit) format, and also texture (also with 32-bit float internal format) - using GL_NV_texture_rectangle and GL_NV_float_buffer extensions. I want to use this texture as lookup in shader while I draw big quad all over the framebuffer. Is it possible?
The problem is that I always get 0 pixel values from texture2D() function in shader. If I change that lookup texture format to usual 32-bit RGBA (each color component is 8-bit byte), then shader recieves correct values and I get what I want. So is it possible to use float format textures in GLSL to render to framebuffer?
I have tested my code on GeForce FX 5200 and GeForce 7x00 (don't remeber exact number). Results are same on both videocards.
I can post some source code which I'm using for testing, if needed.
I am implementing some image processing algorithms using OpenGL framebuffer and GLSL shaders. To do so I create framebuffer with float (32-bit) format, and also texture (also with 32-bit float internal format) - using GL_NV_texture_rectangle and GL_NV_float_buffer extensions. I want to use this texture as lookup in shader while I draw big quad all over the framebuffer. Is it possible?
The problem is that I always get 0 pixel values from texture2D() function in shader. If I change that lookup texture format to usual 32-bit RGBA (each color component is 8-bit byte), then shader recieves correct values and I get what I want. So is it possible to use float format textures in GLSL to render to framebuffer?
I have tested my code on GeForce FX 5200 and GeForce 7x00 (don't remeber exact number). Results are same on both videocards.
I can post some source code which I'm using for testing, if needed.