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

Trigger material update on texture update #52528

Closed

Conversation

GiantBlargg
Copy link
Contributor

This PR makes textures store which materials they were used in, and when the texture changes, triggers material updates for all stored materials. This fixes some issues where a material would continue using an out of date texture.

Fixes #52505

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.

Makes sense to me!

Needs @reduz' approval before merging.

@BastiaanOlij
Copy link
Contributor

Makes sense to me too

@reduz
Copy link
Member

reduz commented Sep 20, 2021

To be entirely honest, I wanted to deprecate proxy textures. They add a lot of complexity and they are not as efficient in Vulkan as they were in OpenGL. Their main use case was 2D animated textures for tilemaps, but this was now solved better in a different way.

@GiantBlargg
Copy link
Contributor Author

GiantBlargg commented Sep 21, 2021

@reduz

Proxy textures are still used by AnimatedTexture and ViewportTexture. Could these be modified to work without a proxy texture?

Even if proxy textures were removed there are still instances when a texture is replaced (e.g. render targets and procedural textures) that would still need a version of this PR.

@akien-mga
Copy link
Member

Superseded by #54489.

@akien-mga akien-mga closed this Jan 19, 2022
@GiantBlargg GiantBlargg deleted the propagate-texture-update branch January 19, 2022 15:02
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.

Proxy texture updates aren't propagated to existing materials
6 participants