diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-14 09:32:39 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-14 09:32:39 -0300 |
commit | 984063cf0b926b7eb354b9618acd042bdeeda2a4 (patch) | |
tree | d9752eb809b7b217975a836eac2cbcbfd459e2c9 /servers/visual/visual_server_scene.h | |
parent | 37c5aa108499104dc417d6b983cb64bcf05f35c2 (diff) |
Cleaned up and fixed the base_changed function in rasterizers, also fixes #15617
Diffstat (limited to 'servers/visual/visual_server_scene.h')
-rw-r--r-- | servers/visual/visual_server_scene.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h index 0d4737f268..38c5258116 100644 --- a/servers/visual/visual_server_scene.h +++ b/servers/visual/visual_server_scene.h @@ -192,14 +192,9 @@ public: singleton->instance_set_base(self, RID()); } - virtual void base_changed() { + virtual void base_changed(bool p_aabb, bool p_materials) { - singleton->_instance_queue_update(this, true, true); - } - - virtual void base_material_changed() { - - singleton->_instance_queue_update(this, false, true); + singleton->_instance_queue_update(this, p_aabb, p_materials); } Instance() : @@ -247,6 +242,7 @@ public: List<Instance *> lighting; bool lighting_dirty; bool can_cast_shadows; + bool material_is_animated; List<Instance *> reflection_probes; bool reflection_dirty; @@ -261,6 +257,7 @@ public: lighting_dirty = false; reflection_dirty = true; can_cast_shadows = true; + material_is_animated = true; gi_probes_dirty = true; } }; @@ -488,7 +485,7 @@ public: _FORCE_INLINE_ void _update_dirty_instance(Instance *p_instance); _FORCE_INLINE_ void _update_instance_lightmap_captures(Instance *p_instance); - _FORCE_INLINE_ void _light_instance_update_shadow(Instance *p_instance, const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, RID p_shadow_atlas, Scenario *p_scenario); + _FORCE_INLINE_ bool _light_instance_update_shadow(Instance *p_instance, const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, RID p_shadow_atlas, Scenario *p_scenario); void _prepare_scene(const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, RID p_force_environment, uint32_t p_visible_layers, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe); void _render_scene(const Transform p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_orthogonal, RID p_force_environment, RID p_scenario, RID p_shadow_atlas, RID p_reflection_probe, int p_reflection_probe_pass); |