summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_storage_gles3.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-12-22 10:00:15 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-12-22 10:00:15 -0300
commitf9603d82365823938129e68823a19739a3dd0b23 (patch)
treeea679907dd39ad85fe3171e73fb149c910dc4b16 /drivers/gles3/rasterizer_storage_gles3.cpp
parent37f558cd7b2308f6442f74c5265f12425d9887c8 (diff)
can bake for omni and spotlight
store normal when baking
Diffstat (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp41
1 files changed, 39 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 9edc37fe3b..fe8373b20d 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -4695,6 +4695,8 @@ RID RasterizerStorageGLES3::gi_probe_create() {
gip->data_depth=0;
gip->bounds=AABB(Vector3(),Vector3(1,1,1));
gip->dynamic_range=1.0;
+ gip->energy=1.0;
+ gip->interior=false;
gip->version=1;
gip->cell_size=1.0;
@@ -4773,7 +4775,7 @@ DVector<int> RasterizerStorageGLES3::gi_probe_get_dynamic_data(RID p_probe) cons
return gip->dynamic_data;
}
-void RasterizerStorageGLES3::gi_probe_set_dynamic_range(RID p_probe,float p_range){
+void RasterizerStorageGLES3::gi_probe_set_dynamic_range(RID p_probe,int p_range){
GIProbe *gip = gi_probe_owner.getornull(p_probe);
ERR_FAIL_COND(!gip);
@@ -4781,7 +4783,7 @@ void RasterizerStorageGLES3::gi_probe_set_dynamic_range(RID p_probe,float p_rang
gip->dynamic_range=p_range;
}
-float RasterizerStorageGLES3::gi_probe_get_dynamic_range(RID p_probe) const{
+int RasterizerStorageGLES3::gi_probe_get_dynamic_range(RID p_probe) const{
const GIProbe *gip = gi_probe_owner.getornull(p_probe);
ERR_FAIL_COND_V(!gip,0);
@@ -4789,6 +4791,41 @@ float RasterizerStorageGLES3::gi_probe_get_dynamic_range(RID p_probe) const{
return gip->dynamic_range;
}
+void RasterizerStorageGLES3::gi_probe_set_energy(RID p_probe,float p_range){
+
+ GIProbe *gip = gi_probe_owner.getornull(p_probe);
+ ERR_FAIL_COND(!gip);
+
+ gip->energy=p_range;
+
+}
+
+void RasterizerStorageGLES3::gi_probe_set_interior(RID p_probe,bool p_enable) {
+
+ GIProbe *gip = gi_probe_owner.getornull(p_probe);
+ ERR_FAIL_COND(!gip);
+
+ gip->interior=p_enable;
+
+}
+
+bool RasterizerStorageGLES3::gi_probe_is_interior(RID p_probe) const{
+
+ const GIProbe *gip = gi_probe_owner.getornull(p_probe);
+ ERR_FAIL_COND_V(!gip,false);
+
+ return gip->interior;
+
+}
+
+float RasterizerStorageGLES3::gi_probe_get_energy(RID p_probe) const{
+
+ const GIProbe *gip = gi_probe_owner.getornull(p_probe);
+ ERR_FAIL_COND_V(!gip,0);
+
+ return gip->energy;
+}
+
void RasterizerStorageGLES3::gi_probe_set_static_data(RID p_gi_probe,const DVector<uint8_t>& p_data,VS::GIProbeDataFormat p_format,int p_width,int p_height,int p_depth) {