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

Fix global shader uniform texture loading #80654

Merged

Conversation

bitsawer
Copy link
Member

If a global shader uniform texture/sampler is not set to valid a resource/path in the project settings, the code used ERR_CONTINUE() to skip whole initialization logic which is not always wanted. This PR always sets or creates the global shader uniform texture and sets it to empty RID if the resource is not set or if resource loading fails.

This PR does not fix some related issues like #62610.

@bitsawer bitsawer added this to the 4.2 milestone Aug 15, 2023
@bitsawer bitsawer requested a review from a team as a code owner August 15, 2023 11:25
@clayjohn clayjohn requested a review from Chaosus August 15, 2023 14:24
Copy link
Member

@Chaosus Chaosus left a comment

Choose a reason for hiding this comment

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

Looks straightforward, but it really fixes the issue.

@akien-mga akien-mga merged commit 9d9043a into godotengine:master Aug 16, 2023
@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
None yet
Development

Successfully merging this pull request may close these issues.

Global shader uniforms sampler2d not updating correctly in Godot 4.1.1
3 participants