-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Changing opacity of transparent material forces shader recompilation #6184
Comments
Yep fully agreed, we discussed this and few similar material parameters before. Same for tinting parameters, and likely some others. |
Is this on the agenda for some of the next releases? This is bugging us for quite a while. Or maybe you are open for a PR for this. I had quick look in the |
As a temporary workaround you can use: |
setProperty does not seem to be a function of material. |
@lucaheft PRs are always welcome! 🙏 |
|
Description
When changing the opacity intensity of a material which was initially set to 1, to some smaller value a shader recomplication is forced.
This seems to happen because MAPFLOAT isn't defined when the intensity is set to 1.
Technically this is correct, because multiplying by 1 doesn't change the ouput. However this introduces micro stutter for the first time the transparent material is faded.
I advocate for always including the intensity in the shader code. As the advantages farly outweigh the disadvantage.
The same applies for emissive intensity and probably a few others.
Pros
Cons:
Steps to Reproduce
TransparentRed
is generated a second timeThe text was updated successfully, but these errors were encountered: