summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-02-16 08:55:11 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-02-16 08:55:43 -0300
commit903a3aa5f0e128abb1fb752c10b343b34af8f799 (patch)
treeb1dddad8ee9a0a984559fe1260e23c0b908e0cd5 /servers
parent3fadcac7c42f97fded2af88fe2cf72ff7b0f4d71 (diff)
a ton of bug fixes to the renderer
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/rasterizer.h5
-rw-r--r--servers/visual/visual_server_raster.h3
-rw-r--r--servers/visual/visual_server_scene.cpp6
-rw-r--r--servers/visual_server.h3
4 files changed, 17 insertions, 0 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 21f7f0769f..dd22986865 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -432,6 +432,9 @@ public:
virtual void gi_probe_set_energy(RID p_probe,float p_range)=0;
virtual float gi_probe_get_energy(RID p_probe) const=0;
+ virtual void gi_probe_set_bias(RID p_probe,float p_range)=0;
+ virtual float gi_probe_get_bias(RID p_probe) const=0;
+
virtual void gi_probe_set_propagation(RID p_probe,float p_range)=0;
virtual float gi_probe_get_propagation(RID p_probe) const=0;
@@ -519,6 +522,8 @@ public:
virtual bool has_os_feature(const String& p_feature) const=0;
+ virtual void update_dirty_resources()=0;
+
static RasterizerStorage*base_signleton;
RasterizerStorage();
virtual ~RasterizerStorage() {}
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index ad0cb664c5..7d547e1862 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -825,6 +825,9 @@ public:
BIND2(gi_probe_set_energy,RID,float)
BIND1RC(float,gi_probe_get_energy,RID)
+ BIND2(gi_probe_set_bias,RID,float)
+ BIND1RC(float,gi_probe_get_bias,RID)
+
BIND2(gi_probe_set_propagation,RID,float)
BIND1RC(float,gi_probe_get_propagation,RID)
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index c54f3dbca5..6f7b2e3aed 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -1556,9 +1556,11 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance,const
cull_count--;
SWAP(instance_shadow_cull_result[j],instance_shadow_cull_result[cull_count]);
j--;
+ continue;
}
+
instance->transformed_aabb.project_range_in_plane(Plane(z_vec,0),min,max);
if (max>z_max)
z_max=max;
@@ -3475,6 +3477,7 @@ void VisualServerScene::_update_dirty_instance(Instance *p_instance) {
} else if (p_instance->base_type==VS::INSTANCE_MULTIMESH) {
RID mesh = VSG::storage->multimesh_get_mesh(p_instance->base);
if (mesh.is_valid()) {
+
bool cast_shadows=false;
int sc = VSG::storage->mesh_get_surface_count(mesh);
@@ -3491,6 +3494,7 @@ void VisualServerScene::_update_dirty_instance(Instance *p_instance) {
cast_shadows=true;
break;
}
+
}
if (!cast_shadows) {
@@ -3538,6 +3542,8 @@ void VisualServerScene::_update_dirty_instance(Instance *p_instance) {
void VisualServerScene::update_dirty_instances() {
+ VSG::storage->update_dirty_resources();
+
while(_instance_update_list.first()) {
_update_dirty_instance( _instance_update_list.first()->self() );
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 5c835c2287..08cf34a653 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -475,6 +475,9 @@ public:
virtual void gi_probe_set_energy(RID p_probe,float p_range)=0;
virtual float gi_probe_get_energy(RID p_probe) const=0;
+ virtual void gi_probe_set_bias(RID p_probe,float p_range)=0;
+ virtual float gi_probe_get_bias(RID p_probe) const=0;
+
virtual void gi_probe_set_propagation(RID p_probe,float p_range)=0;
virtual float gi_probe_get_propagation(RID p_probe) const=0;