Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL: Enabling MSAA makes render colours brighter #3409

Open
raddari opened this issue Feb 13, 2025 · 2 comments
Open

OpenGL: Enabling MSAA makes render colours brighter #3409

raddari opened this issue Feb 13, 2025 · 2 comments
Labels

Comments

@raddari
Copy link

raddari commented Feb 13, 2025

Describe the bug
When enabling any of the BGFX_RESET_MSAA_* flags, the colours appear brighter than they should be. This only seems to affect the OpenGL backend, I can run Vulkan with MSAA just fine.

Captured frames in RenderDoc show the backbuffer colours are correct if the "gamma display of linear data" override is enabled. Maybe it's an issue with framebuffer sRGB?

To Reproduce

  1. Run example-09-hdr --gl
  2. Press F8 to turn on MSAA

Expected behavior
Colours don't change when MSAA is enabled.

Screenshots
MSAA off:
Image
MSAA on:
Image

Additional context
OS: Ubuntu 22.04
Output of glxinfo -B:

name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) Graphics (RPL-P) (0xa7a0)
    Version: 23.2.1
    Accelerated: yes
    Video memory: 31780MB
    Unified memory: yes
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) Graphics (RPL-P)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3.1~22.04.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
@bkaradzic bkaradzic added the bug label Feb 14, 2025
@SnapperTT
Copy link
Contributor

I noticed this issue last night myself. OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.3.4-arch1.1

This may be a case of GL_FRAMEBUFFER_SRGB causing double gamma correction

@mcourteaux
Copy link
Contributor

Not happening for me under OpenGL 4.0 renderer and NVIDIA drivers 565.77 and Wayland. Haven't tried to recompile with OpenGL 4.6, but it would surprise me that that matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants