-
-
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
Ensure shadow material and mesh are not used with wireframe mode #98683
Conversation
CC @tetrapod00 |
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.
Tested locally (rebased on top of master
87318a2), it works as expected in all rendering methods.
Hoever, in Compatibility, when running the project, the mesh doesn't use wireframe:
It renders correctly in the editor which is also using Compatibility:
To test this, edit car_base.tscn
in Truck Town and give the Body node material a custom shader with render_mode wireframe;
.
@Calinou Did you remember to call It is needed for the engine to generate the wireframe versions of meshes. It is true by default in the editor |
I forgot to do that. I've added a call to PS: The method's description is outdated in the class reference. |
Thanks for taking a look. I will update the docs in this PR and I'll take another look to see why the setting might be ignored at run time. |
I took a look at truck town locally. The problem with truck town is that it is loading the mesh before |
Rebased and updated the documentation. This is ready for merging now |
And in the Compatibility renderer actually use the wireframe render mode
Updated docs based on the comments. Should be good to merge now |
Thanks! |
Fixes: #98532
In all three backends, the shared shadow material and shadow mesh were being used despite the wireframe render mode being on. This meant that for all backends shadows would never be wireframed and in the forward+ backend the depth prepass used the wrong shader + mesh.
Also, in the Compatibility renderer we weren't requesting wireframe mode at render time when using the wireframe render_mode.