Replaced float4 .w with more appropriate and functionally identical .a#206
Merged
stackotter merged 2 commits intostackotter:mainfrom Apr 15, 2026
Merged
Replaced float4 .w with more appropriate and functionally identical .a#206stackotter merged 2 commits intostackotter:mainfrom
stackotter merged 2 commits intostackotter:mainfrom
Conversation
float4.rgba is the same as float4.xyzw
Owner
|
Thanks for that, no clue why I used |
stackotter
approved these changes
Apr 14, 2026
Owner
|
Damn, the Linux workflows are failing cause it’s been so long. I may have to quickly update those before merging this to avoid getting stuck with failing CI on main |
Owner
|
I've fixed the CI in #207. I'll merge that first and then you can update this branch (rebase or merge; whichever you prefer) and then the CI should work again. #207 also merges in a ton of other changes that have been sitting on the |
stackotter
approved these changes
Apr 15, 2026
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.
float4.rgba is the same as float4.xyzw
Description
The use of the .w accessor (or whatever) for a variable named
color, especially when it is clear that the alpha value is being checked, can confuse code readers. So I just replaced .w with .a, and in this case, it is functionally identical. All color float4s in metal shaders always use RGBA format.Type of change
Consistency change
Checklist: