-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Automatically ensure correct normals in Compatibility renderer #82804
Automatically ensure correct normals in Compatibility renderer #82804
Conversation
1e8a23a
to
8ab0c94
Compare
As Calinou mentioned earlier #82763 (comment), I think we should make this consistent with the Forward+ and Mobile renderers instead of making it use the render mode. Matching behaviour between the renderers is more important than saving a single integer uniform |
ensure_correct_normals
in Compatibility renderer2c13eba
to
4de577c
Compare
4de577c
to
f31371c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I can confirm that this fixes the reported issue.
Is this implemented now in the latest revision of this PR? If not, I suggest opening another issue to track this once this is merged. |
I haven't made much progress on the instanced rendering part, so I will do as suggested. Edit: I've opened the new issue here: #84903 |
Thanks! |
Cherry-picked for 4.2.1. |
Fixes #82763
The
ensure_correct_normals
define is redundant in the Forward+ and Mobile renderers, as they check whether individual instances are uniform or not.Due to the way instancing is done in the Compatibility renderer, however, theENSURE_CORRECT_NORMALS
shader define has to be used instead.This PR changes the shader's logic to automatically figure out which objects have a non-uniform scale.
Results (Compatibility):
Progress: