mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 09:29:38 +01:00
Fixed lights.
This commit is contained in:
parent
ec789f1b87
commit
bb323b5bee
@ -2319,6 +2319,13 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
|
||||
prev_base_pass = base_pass;
|
||||
}
|
||||
|
||||
if (!unshaded && e->light_index < RenderList::MAX_LIGHTS) {
|
||||
light = render_light_instances[e->light_index];
|
||||
if ((e->instance->layer_mask & light->light_ptr->cull_mask) == 0) {
|
||||
light = nullptr; // Don't use this light, it is culled
|
||||
}
|
||||
}
|
||||
|
||||
if (light != prev_light) {
|
||||
_setup_light_type(light, shadow_atlas);
|
||||
rebind = true;
|
||||
|
Loading…
Reference in New Issue
Block a user