switch FBO format to GL_RGB8 and remove swizzle#537
Merged
Conversation
Change internal texture formats from GL_RGBA8 to GL_RGB8. Eliminating the alpha channel forces sampled textures to implicitly return an alpha of 1.0, ensuring fully opaque window composition under Wayland.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideSwitches the legacy OpenGL FBO color attachments from RGBA8 to RGB8 and removes the runtime alpha swizzle, relying on the lack of alpha to implicitly yield an alpha of 1.0 for Wayland composition. Sequence diagram for updated FBO configuration without alpha swizzlesequenceDiagram
participant Functions
participant FBO
participant QOpenGLFramebufferObject
Functions->>FBO: configure(physicalViewport, samples)
FBO->>FBO: resolvedFormat.setInternalTextureFormat(GL_RGB8)
FBO->>QOpenGLFramebufferObject: QOpenGLFramebufferObject(physicalSize, resolvedFormat)
alt multisampling_enabled
FBO->>FBO: msFormat.setInternalTextureFormat(GL_RGB8)
FBO->>QOpenGLFramebufferObject: QOpenGLFramebufferObject(physicalSize, msFormat)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since the FBO color attachments no longer have an alpha channel, review any shaders or blending paths that may read or rely on alpha from this buffer and adjust them to assume a constant 1.0 rather than sampling it.
- If you still target OpenGL ES 2 or other constrained GL implementations, verify that GL_RGB8 is guaranteed color-renderable in your minimum configuration; if not, you may need to retain GL_RGBA8 or use a more widely supported internal format.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since the FBO color attachments no longer have an alpha channel, review any shaders or blending paths that may read or rely on alpha from this buffer and adjust them to assume a constant 1.0 rather than sampling it.
- If you still target OpenGL ES 2 or other constrained GL implementations, verify that GL_RGB8 is guaranteed color-renderable in your minimum configuration; if not, you may need to retain GL_RGBA8 or use a more widely supported internal format.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #537 +/- ##
=======================================
Coverage 25.69% 25.69%
=======================================
Files 521 521
Lines 43192 43187 -5
Branches 4709 4708 -1
=======================================
Hits 11099 11099
+ Misses 32093 32088 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change internal texture formats from GL_RGBA8 to GL_RGB8. Eliminating the alpha channel forces sampled textures to implicitly return an alpha of 1.0, ensuring fully opaque window composition under Wayland.
Summary by Sourcery
Switch OpenGL framebuffer object color attachments to RGB8 and rely on implicit alpha of 1.0 for opaque composition under Wayland.
Enhancements: