Advertisement Jump to content
Sign in to follow this  

glClampColor and glCopySubImage2d problem

This topic is 4561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!