Skip to content

Don't clear Array param when freeing material #108857

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beicause
Copy link
Contributor

Fixes #108815.

This reverts #71346. The code is originally introduced to fix issue #70527, but now I'm unable to reproduce it, so I think it's better to revert the change.

Another solution is duplicating Array when setting shader parameter, but it's not ideal as it changes the behavior and prevents Array from being shared across materials.

@beicause beicause requested a review from a team as a code owner July 22, 2025 05:24
@clayjohn clayjohn requested a review from RandomShaper July 22, 2025 08:47
@clayjohn clayjohn added this to the 4.5 milestone Jul 22, 2025
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.

Duplicated ShaderMaterial with a sampler2D[] uniform loses items when another object with the same duplicated material is removed
2 participants