-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Add decals_disabled
render mode and BaseMaterial3D property
#89235
base: master
Are you sure you want to change the base?
Conversation
I don't think we should add a new render mode for this. I think we should disable decals the same way we disable other clustered elements when we use the UNSHADED debug mode. I.e. by ignoring the decal element array: godot/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp Lines 1156 to 1160 in 7d2ca2d
I think we can just add:
Which saves us a lot of complexity. |
decals_disabled
render mode and BaseMaterial3D property
I've done this in #89253. I'll leave this PR open as it addresses an existing proposal. |
9b44667
to
f667754
Compare
(I do agree with clayjohn by the way, just making sure everything is clean in case of a change of heart) |
This adds a `decals_disabled` render mode that can be used in shaders and toggled in BaseMaterial3D. When this flag is used, decals will not be displayed on the material regardless of the layers its mesh are present on.
f667754
to
4216a67
Compare
This adds a
decals_disabled
render mode that can be used in shaders and toggled in BaseMaterial3D. When this flag is used, decals will not be displayed on the material regardless of the layers its mesh are present on. This may be more convenient or flexible for certain materials that should never receive decals, such as VFX materials or parts of a mesh that use a separate material (such as eyes on a character).Testing project: test_debug_draw_modes_decals.zip
Preview
The cyan toruses have the Disable Decals property enabled on their material, but are still on the default VisualInstance3D layer. A white torus in the decal's area had its layer changed (with the decal's cull mask being modified) so it doesn't receive the decal.
Forward+
Mobile