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

Small fixups for the new reflection probe blending #100344

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

clayjohn
Copy link
Member

Fixes some small issues from #99958

The biggest issue is that ANGLE doesn't allow mixing ints and floats so this shader will fail to compile on the web or when using the ANGLE backend.

Second, the way the shader is written it does a lot of unnecessary instructions. Running a quick comparison in shader playground shows that it was allocating 2 more VGPRs than necessary and was roughly doing double the number of instructions it needed to. https://shader-playground.timjones.io/0a125912ec8d14f234b4a9c287f0f2e6

I rewrote the code to do vector operations throughout (the compiler mostly did this, but not fully) and avoid doing work that would get immediately undone. This makes the code easier to understand, faster to compile, and faster to run.

@clayjohn clayjohn added this to the 4.4 milestone Dec 13, 2024
@clayjohn clayjohn requested a review from a team as a code owner December 13, 2024 01:33
@akien-mga akien-mga merged commit 691d8be into godotengine:master Dec 13, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Immediate Blocker
Development

Successfully merging this pull request may close these issues.

2 participants