diff options
author | Saracen <SaracenOne@gmail.com> | 2016-03-06 17:00:29 +0000 |
---|---|---|
committer | Saracen <SaracenOne@gmail.com> | 2016-03-12 16:51:17 +0000 |
commit | 24bc7d8db7744589672b0b16b269e99160b64e32 (patch) | |
tree | b053502f78623ef8fe271ee4e1e0f6ed6ec7290e /servers | |
parent | 8b1dcbfe4d92f9d7273bbd2f1eb805e5c508961a (diff) |
Fix 'FLAG_RECEIVE_SHADOWS' flag for GeometryInstances so that turning it off now correctly disables shadows from affecting the instance.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/rasterizer.h | 1 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 4 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 276758ea95..194df9596a 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -546,6 +546,7 @@ public: bool depth_scale :8; bool billboard :8; bool billboard_y :8; + bool receive_shadows : 8; }; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 2ce0c9a360..6d293f0ce8 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -2734,7 +2734,7 @@ void VisualServerRaster::instance_geometry_set_flag(RID p_instance,InstanceFlags } break; case INSTANCE_FLAG_RECEIVE_SHADOWS: { - instance->receive_shadows=p_enabled; + instance->data.receive_shadows=p_enabled; } break; case INSTANCE_FLAG_DEPH_SCALE: { @@ -2786,7 +2786,7 @@ bool VisualServerRaster::instance_geometry_get_flag(RID p_instance,InstanceFlags } break; case INSTANCE_FLAG_RECEIVE_SHADOWS: { - return instance->receive_shadows; + return instance->data.receive_shadows; } break; case INSTANCE_FLAG_DEPH_SCALE: { diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 77d5780c5f..06501d1b81 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -169,7 +169,6 @@ class VisualServerRaster : public VisualServer { AABB transformed_aabb; uint32_t object_ID; bool visible; - bool receive_shadows; bool visible_in_all_rooms; uint32_t layer_mask; float draw_range_begin; @@ -300,7 +299,7 @@ class VisualServerRaster : public VisualServer { update=false; visible=true; data.cast_shadows=SHADOW_CASTING_SETTING_ON; - receive_shadows=true; + data.receive_shadows=true; data.depth_scale=false; data.billboard=false; data.billboard_y=false; |