You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Light2D shadow mask construction fix
When using the default setting (layer 1 set only) nothing is stored in the tscn file for a Light2D, hence it relies on the value in the constructor.
The problem is the constructed value is 1 in Light2D, and -1 in RasterizerCanvas::Light. -1 results in all bits being set so all occluders are shown, rather than just those in layer 1.
This PR changes Rasterizer::Canvas constructor to set to 1. An alternative is to have -1 as the value for layer 1 throughout.
(cherry picked from commit bf54fa5a62)
This commit is contained in:
committed by
Rémi Verschelde
parent
07025e607d
commit
61b3eb3b28
@@ -814,7 +814,7 @@ public:
|
|||||||
item_mask = 1;
|
item_mask = 1;
|
||||||
scale = 1.0;
|
scale = 1.0;
|
||||||
energy = 1.0;
|
energy = 1.0;
|
||||||
item_shadow_mask = -1;
|
item_shadow_mask = 1;
|
||||||
mode = RS::CANVAS_LIGHT_MODE_ADD;
|
mode = RS::CANVAS_LIGHT_MODE_ADD;
|
||||||
// texture_cache = nullptr;
|
// texture_cache = nullptr;
|
||||||
next_ptr = nullptr;
|
next_ptr = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user