Is there a reason why CanvasModulate doesn't respect Item Cull Mask? #7466
hunterloftis
started this conversation in
2D
Replies: 1 comment 1 reply
-
Internally, this is all CanvasModulate does: https://github.com/godotengine/godot/blob/eca6f0eb545166708c56633152974f40f51de2be/scene/2d/canvas_modulate.cpp#L73 This would require implementing per-layer modulation, which sounds technically feasible, but it may have a performance cost (probably not a huge one though). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are many examples of people trying to exclude nodes from the effects of CanvasModulate:
The most-commonly-recommended solution is to put excluded content inside a separate CanvasLayer. This has lots of drawbacks though and is sometimes impossible, since it requires rearranging the node tree. The only alternative I have found is to replace the CanvasItem material with an unshaded one, for every item to be excluded.
Lights have a simple mechanism to allow canvas items to opt-out of being lit:
range_item_cull_mask
. Is there a reason whyCanvasModulate
doesn't use the same mechanism to allow items to opt-out of being modulated?Beta Was this translation helpful? Give feedback.
All reactions