Skip to content

Fix asfloat/asuint functions having the wrong return types in the Metal shader compiler. - #162

Merged
ccpisheden merged 2 commits into
mainfrom
metal-asfloat-fix
Nov 27, 2026
Merged

ccpisheden merged 2 commits into
mainfrom
metal-asfloat-fix

Conversation

@ccpisheden

Copy link
Copy Markdown
Contributor

Summary

Fixes an issue where asfloat() and asuint() had odd/incorrect hardcoded return types that didn't match the input. As an example, asfloat(uint) returned a float2. These two functions have now been fixed and work with all types of scalars and vectors as inputs (but not matrices, which was never supported).

Linked issue (optional)

Fixes CORTAO compilation errors.

Testing

  • Full recompile of all shaders, no errors.
  • CORTAO prepass WIP shader now compiles correctly and produces the expected result.

AI assistance

Claude tracked down the location of the issue and fixed it.

…al shader compiler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ccpisheden
ccpisheden merged commit 019f6d9 into main Nov 27, 2026
1 check passed
@ccpisheden
ccpisheden deleted the metal-asfloat-fix branch November 27, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants