Framebuffer object with float texture clamps values

前端 未结 2 653
渐次进展
渐次进展 2020-12-21 08:07

I have checked this similar question, but the suggestions did not solve my problem: Low precision and clamping when writing to floating point FBO.

I

相关标签:
2条回答
  • 2020-12-21 08:45

    Do a full set of glClampColor() operations in your initGL() function:

    glClampColor(GL_CLAMP_READ_COLOR, GL_FALSE);
    glClampColor(GL_CLAMP_VERTEX_COLOR, GL_FALSE);
    glClampColor(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE);
    

    On my system I only needed the GL_CLAMP_VERTEX_COLOR.

    0 讨论(0)
  • 2020-12-21 08:48

    You must use glClampColor to state whether the colors you read with glReadPixels will be clamped or not.

    Note that this is just for the reading of the color. What gets written by the fragment shader will always be unclamped.

    0 讨论(0)
提交回复
热议问题