-
-
Notifications
You must be signed in to change notification settings - Fork 585
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
backend: gl: Use effective texture size for rounded corner calculation #1002
backend: gl: Use effective texture size for rounded corner calculation #1002
Conversation
8ccd10e
to
abbff8a
Compare
Codecov Report
@@ Coverage Diff @@
## next #1002 +/- ##
==========================================
- Coverage 37.82% 37.67% -0.16%
==========================================
Files 48 48
Lines 10849 10853 +4
==========================================
- Hits 4104 4089 -15
- Misses 6745 6764 +19
|
The rounded corner calculation only took the actual texture dimensions into account, effectively turning all pixels outside completely transparent. Furthermore, `texelFetch()` in the default window shader does not work with any `GL_TEXTURE_WRAP_x` parameter. As a result, a to-be-tiled root pixmap wasn't properly tiled and only visible in the original top-left corner. - Changed the default window shader to use `textureSize()` to scale the texture coordinates into the proper range for use with `texture2D()`. - Added a new uniform to the default post-processing shader containing the effective texture size for rounded corners calculation instead of relying on `textureSize()`.
abbff8a
to
332501a
Compare
Hmm, actually, should we have a different shader for root pixmap?, which by default can just do nothing. I remember there are someone asking for something like this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, sorry this took so long
The rounded corner calculation only took the actual texture dimensions into account, effectively turning all pixels outside completely transparent. Furthermore,
texelFetch()
in the default window shader does not work with any of theGL_TEXTURE_WRAP_x
parameters.As a result, a to-be-tiled root pixmap wasn't properly tiled and only visible in the original top-left corner (see #970).
textureSize()
to scale the texture coordinates into the proper range for use withtexture2D()
.textureSize()
.Related: #1000 (different fix for xrender)