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

Copy texture filter/repeat modes when replacing a texture in the GL Compatibility backend #78287

Merged
merged 1 commit into from
Jun 16, 2023

Conversation

clayjohn
Copy link
Member

Fixes: #78228

When a GradientTexture1D is updated we use the texture_replace() function to place the contents of the new texture into the resource referenced by the old RID. The copy_from() copies all the Texture state except for the filter/repeat modes. This lead to a situation where the gl_texture's state got out of sync with the Texture referenced by the RID. This change ensures that we copy over all data from the new_texture so that the filter/repeat can get properly updated at draw time.

@clayjohn clayjohn added this to the 4.1 milestone Jun 15, 2023
@clayjohn clayjohn requested a review from a team as a code owner June 15, 2023 20:14
@akien-mga akien-mga merged commit 9e81aed into godotengine:master Jun 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.

Shader: Incorrect texture read in Editor (Compatibility Renderer)
2 participants