summaryrefslogtreecommitdiff
path: root/scene/3d/gi_probe.cpp
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-01-14 14:35:39 -0600
committerFerenc Arn <tagcup@yahoo.com>2017-01-16 13:36:33 -0600
commit6f4f9aa6ded6da027c84cc466c767334dc3d3362 (patch)
tree4d45d7e600a069d7feb2a2dae3a70d6b9ddbf884 /scene/3d/gi_probe.cpp
parentd13f2f9e25e380496e706b59720cd85eed299ca2 (diff)
Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
Diffstat (limited to 'scene/3d/gi_probe.cpp')
-rw-r--r--scene/3d/gi_probe.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 8035ce1cc7..b29ae211de 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -510,8 +510,8 @@ void GIProbe::_plot_face(int p_idx, int p_level,int p_x,int p_y,int p_z, const V
Vector2 uv = get_uv(intersection,p_vtx,p_uv);
- int uv_x = CLAMP(Math::fposmod(uv.x,1.0)*bake_texture_size,0,bake_texture_size-1);
- int uv_y = CLAMP(Math::fposmod(uv.y,1.0)*bake_texture_size,0,bake_texture_size-1);
+ int uv_x = CLAMP(Math::fposmod(uv.x,1.0f)*bake_texture_size,0,bake_texture_size-1);
+ int uv_y = CLAMP(Math::fposmod(uv.y,1.0f)*bake_texture_size,0,bake_texture_size-1);
int ofs = uv_y*bake_texture_size+uv_x;
albedo_accum.r+=p_material.albedo[ofs].r;
@@ -539,8 +539,8 @@ void GIProbe::_plot_face(int p_idx, int p_level,int p_x,int p_y,int p_z, const V
Vector2 uv = get_uv(inters,p_vtx,p_uv);
- int uv_x = CLAMP(Math::fposmod(uv.x,1.0)*bake_texture_size,0,bake_texture_size-1);
- int uv_y = CLAMP(Math::fposmod(uv.y,1.0)*bake_texture_size,0,bake_texture_size-1);
+ int uv_x = CLAMP(Math::fposmod(uv.x,1.0f)*bake_texture_size,0,bake_texture_size-1);
+ int uv_y = CLAMP(Math::fposmod(uv.y,1.0f)*bake_texture_size,0,bake_texture_size-1);
int ofs = uv_y*bake_texture_size+uv_x;