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

Use Vector4 for texture mask in BaseMaterial to avoid converting to and from Plane #99743

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

clayjohn
Copy link
Member

Fixes: #84633
Fixes: #99663
Supersedes: #84650

It seems like ShaderMaterial doesn't serialize Plane properly (or it doesn't handle converting back and forth between Plane and Vector4 gracefully). #84650 fixes the issue by forcing the plane to become a Vector4 during conversion, but the solution can be even cleaner by just never using a Plane.

The fact that this change fixes the issue hints at a deeper issue with how we serialize shader params as both Plane and Vector should work fine. But we should go ahead with this small fix for now and investigate deeper later if necessary.

Copy link
Contributor

@jsjtxietian jsjtxietian left a comment

Choose a reason for hiding this comment

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

LGTM

@Repiteo Repiteo merged commit 2154229 into godotengine:master Nov 27, 2024
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Nov 27, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants