mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
RasterizerCanvas: Use getornull to fetch light occluder polygon
Fixes #21286 when the occluder is not fully configured.
This commit is contained in:
parent
ed22a4c454
commit
815bf761a5
@ -1894,7 +1894,7 @@ void RasterizerCanvasGLES2::canvas_light_shadow_buffer_update(RID p_buffer, cons
|
||||
|
||||
while (instance) {
|
||||
|
||||
RasterizerStorageGLES2::CanvasOccluder *cc = storage->canvas_occluder_owner.get(instance->polygon_buffer);
|
||||
RasterizerStorageGLES2::CanvasOccluder *cc = storage->canvas_occluder_owner.getornull(instance->polygon_buffer);
|
||||
if (!cc || cc->len == 0 || !(p_light_mask & instance->light_mask)) {
|
||||
|
||||
instance = instance->next;
|
||||
|
@ -1889,7 +1889,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons
|
||||
|
||||
while (instance) {
|
||||
|
||||
RasterizerStorageGLES3::CanvasOccluder *cc = storage->canvas_occluder_owner.get(instance->polygon_buffer);
|
||||
RasterizerStorageGLES3::CanvasOccluder *cc = storage->canvas_occluder_owner.getornull(instance->polygon_buffer);
|
||||
if (!cc || cc->len == 0 || !(p_light_mask & instance->light_mask)) {
|
||||
|
||||
instance = instance->next;
|
||||
|
Loading…
Reference in New Issue
Block a user