glClampColor and glCopySubImage2d problem
Hi all
My problem is a little complicated. The general idea is to perform multipass rendering, first pass suppose to fill float texture :
glTexImage2D ( GL_TEXTURE_RECTANGLE_NV, 0, GL_RGBA16F_ARB, w, h, 0, GL_RGBA, GL_FLOAT, 0);
with clamping float values disabled :
glClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, GL_FALSE);
and additive blending enabled :
glBlendFunc ( GL_ONE, GL_ONE );
Than second pass suppose to use result of first pass, thats why befor second pass starts I perform copying color values from frame buffer to my float texture:
glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_NV, 0, 0, 0, 0, 0, w, h);
float fbuf = new float [ w * h * 4 ];
glGetTexImage(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGBA, GL_FLOAT, fbuf );
The problem is values are clamped to 0..1. Anyone knows what could be the reason ?? I tried the same using EXT_framebuffer_object and it works correctly but it is much slower on my geforce 7300GT.
Thanks in advance.
Marcin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement