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

Add missing check when insert function normal_roughness_compatibility #87207

Merged

Conversation

jsjtxietian
Copy link
Contributor

Fixes #87202

Without this check, the shader ivec2 normal_roughness_size = textureSize(normal_roughness_buffer, 0); compiles to
ivec2 m_normal_roughness_size=normal_roughness_compatibility(textureSize(sampler2D(normal_roughness_buffer, SAMPLER_LINEAR_WITH_MIPMAPS_REPEAT), 0)); and thus type mismatch and compile error.

Introduced in #86316 , cc @clayjohn Any suggestions?

@danbolt
Copy link

danbolt commented Jan 16, 2024

Hi, thanks for the quick turnaround!

I just compiled Godot at 26b1fd0 with this change and it addressed the issue I was encountering with #87202. 👍

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

This is the correct fix. Great work

@akien-mga akien-mga merged commit 5b19796 into godotengine:master Jan 16, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@jsjtxietian jsjtxietian deleted the fix-normal_roughness_compatibility branch January 16, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shader compilation error when calling textureSize on the normal roughness texture
4 participants