Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: NVidia Framebuffer Attachments Color Location

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2016
    Posts
    5

    Exclamation NVidia Framebuffer Attachments Color Location

    Hello Forums,

    I have a weird behavior on my NVidia graphics card with Frame Buffer Objects. I have a frag shader emiting a blue color on out location = 1 and an orange color on out location 5. I create a fbo with one color attachment on location GL_COLOR_ATTACHMENT5. I would expect it to show the orange color, because it is bound to loation 5, but it is showing the blue one.

    It seems that NVidia fbo color attachments are ignoring the location and binding the attachments "in order" (1, 2, 3...). I would apreciate it if someone would confirm/deny it on NVidia and other platforms. Also I can only test this with Java and LWJGL2, but I don't think that matters (LWJGL is a direct opengl wrapper for java)

    My system specs:
    Dell Latitude 6520 (Notebok)
    Intel i7 2640m
    NVidia Quadro 4200M (96 cores, 512 mb only )

    Thanks

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    4,124

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2016
    Posts
    5
    That could be the same / similar issue...

    It seems like that the attachment locations are also broken there, also NVidia.

  4. #4
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,907
    I have a frag shader emiting a blue color on out location = 1 and an orange color on out location 5. I create a fbo with one color attachment on location GL_COLOR_ATTACHMENT5. I would expect it to show the orange color, because it is bound to loation 5, but it is showing the blue one.
    Why would you expect that? The color attachment number and the fragment shader output location don't mean anything. What gives them meaning is the framebuffer's draw buffers state defined by `glDrawBuffers`. That's what sets the mapping between fragment shader output locations and framebuffer attachments.

    So what is your draw buffers state?

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2016
    Posts
    5
    I was just experimenting and unterstood glDrawBuffers finally!

    And yes I derped because I thought you just give it the locations it should "activate".
    Like {GL_COLOR_ATTACHMENT3} and loation 3 is active.

    But it's totally different I just noticed the hard way...

    Anyway, thanks for support

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •