summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-09-28 16:40:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-09-28 16:42:47 -0300
commitf2ed26d71e20b92dbf21693eeea36ccfcc50ced6 (patch)
tree641b343f7fac36eb4b951c6effb33dbb5a86a51a /servers/visual
parent40c3c8745df3d08065802762e236beeaa6aa1345 (diff)
Reflection probe support in GLES2 back-end.
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer.h1
-rw-r--r--servers/visual/visual_server_raster.h1
-rw-r--r--servers/visual/visual_server_scene.cpp2
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
4 files changed, 5 insertions, 0 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 6eeaf12dfc..877eb72c98 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -397,6 +397,7 @@ public:
virtual RID reflection_probe_create() = 0;
virtual void reflection_probe_set_update_mode(RID p_probe, VS::ReflectionProbeUpdateMode p_mode) = 0;
+ virtual void reflection_probe_set_resolution(RID p_probe, int p_resolution) = 0;
virtual void reflection_probe_set_intensity(RID p_probe, float p_intensity) = 0;
virtual void reflection_probe_set_interior_ambient(RID p_probe, const Color &p_ambient) = 0;
virtual void reflection_probe_set_interior_ambient_energy(RID p_probe, float p_energy) = 0;
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index b54e150656..ff8469ad32 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -337,6 +337,7 @@ public:
BIND2(reflection_probe_set_enable_box_projection, RID, bool)
BIND2(reflection_probe_set_enable_shadows, RID, bool)
BIND2(reflection_probe_set_cull_mask, RID, uint32_t)
+ BIND2(reflection_probe_set_resolution, RID, int)
/* BAKED LIGHT API */
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index a82b426f0d..cd0702d20b 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -2141,6 +2141,8 @@ bool VisualServerScene::_render_reflection_probe_step(Instance *p_instance, int
Scenario *scenario = p_instance->scenario;
ERR_FAIL_COND_V(!scenario, true);
+ VisualServerRaster::redraw_request(); //update, so it updates in editor
+
if (p_step == 0) {
if (!VSG::scene_render->reflection_probe_instance_begin_render(reflection_probe->instance, scenario->reflection_atlas)) {
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index b8f86d7123..dbc45653ea 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -271,6 +271,7 @@ public:
FUNC2(reflection_probe_set_enable_box_projection, RID, bool)
FUNC2(reflection_probe_set_enable_shadows, RID, bool)
FUNC2(reflection_probe_set_cull_mask, RID, uint32_t)
+ FUNC2(reflection_probe_set_resolution, RID, int)
/* BAKED LIGHT API */