Low precision and clamping when writing to floating point FBO

前端 未结 2 1645
野性不改
野性不改 2020-12-21 05:43

I have an FBO which has been created in the following way:

glGenRenderbuffers(1, &m_depthStencilBuffer);
glBindRenderbuffer(GL_RENDERBUFFER, m_depthStenc         


        
相关标签:
2条回答
  • 2020-12-21 05:48

    The problem was a stupid bug on my part, in my FBO resize code I called:

    glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, ...);
    

    instead of

    glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA32F_ARB, ...);
    
    0 讨论(0)
  • 2020-12-21 05:59

    Yes, it will be clamped to the range (0, 1) - check out glClampColor and disable color clamping.

    Hope this helps!

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