summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer.h7
-rw-r--r--servers/visual/visual_server_raster.h4
-rw-r--r--servers/visual/visual_server_scene.cpp2
-rw-r--r--servers/visual/visual_server_scene.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index d87cc0fd8c..06509c6fd0 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -78,6 +78,7 @@ public:
Transform transform;
int depth_layer;
+ uint32_t layer_mask;
//RID sampled_light;
@@ -114,6 +115,7 @@ public:
billboard=false;
billboard_y=false;
depth_layer=0;
+ layer_mask=1;
}
};
@@ -295,16 +297,17 @@ public:
virtual void light_set_color(RID p_light,const Color& p_color)=0;
virtual void light_set_param(RID p_light,VS::LightParam p_param,float p_value)=0;
virtual void light_set_shadow(RID p_light,bool p_enabled)=0;
+ virtual void light_set_shadow_color(RID p_light,const Color& p_color)=0;
virtual void light_set_projector(RID p_light,RID p_texture)=0;
- virtual void light_set_attenuation_texure(RID p_light,RID p_texture)=0;
virtual void light_set_negative(RID p_light,bool p_enable)=0;
virtual void light_set_cull_mask(RID p_light,uint32_t p_mask)=0;
- virtual void light_set_shader(RID p_light,RID p_shader)=0;
virtual void light_omni_set_shadow_mode(RID p_light,VS::LightOmniShadowMode p_mode)=0;
virtual void light_omni_set_shadow_detail(RID p_light,VS::LightOmniShadowDetail p_detail)=0;
virtual void light_directional_set_shadow_mode(RID p_light,VS::LightDirectionalShadowMode p_mode)=0;
+ virtual void light_directional_set_blend_splits(RID p_light,bool p_enable)=0;
+ virtual bool light_directional_get_blend_splits(RID p_light) const=0;
virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light)=0;
virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light)=0;
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index 7810cc9018..4d8a46122c 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -757,16 +757,16 @@ public:
BIND2(light_set_color,RID,const Color&)
BIND3(light_set_param,RID ,LightParam ,float )
BIND2(light_set_shadow,RID ,bool )
+ BIND2(light_set_shadow_color,RID ,const Color& )
BIND2(light_set_projector,RID,RID )
- BIND2(light_set_attenuation_texure,RID,RID )
BIND2(light_set_negative,RID,bool )
BIND2(light_set_cull_mask,RID ,uint32_t )
- BIND2(light_set_shader,RID ,RID )
BIND2(light_omni_set_shadow_mode,RID,LightOmniShadowMode)
BIND2(light_omni_set_shadow_detail,RID,LightOmniShadowDetail)
BIND2(light_directional_set_shadow_mode,RID,LightDirectionalShadowMode)
+ BIND2(light_directional_set_blend_splits,RID,bool)
/* PROBE API */
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index e36e31e191..e214374f4d 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -1165,7 +1165,7 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance,Camer
float texture_size=VSG::scene_render->get_directional_light_shadow_size(light->instance);
- bool overlap = false;//rasterizer->light_instance_get_pssm_shadow_overlap(p_light->light_info->instance);
+ bool overlap = VSG::storage->light_directional_get_blend_splits(p_instance->base);
for (int i=0;i<splits;i++) {
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index 1b62583dcf..e4f06fee64 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -204,7 +204,6 @@ public:
float extra_margin;
uint32_t object_ID;
bool visible;
- uint32_t layer_mask;
float lod_begin;
float lod_end;
@@ -253,7 +252,6 @@ public:
object_ID=0;
visible=true;
- layer_mask=1;
lod_begin=0;
lod_end=0;