summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-10 16:47:11 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-10 16:47:11 +0200
commit94721f5ab8af9e7d91a4de58baf2c8d849ceab6e (patch)
tree92fb34d709310b76de1c2d45cfe2aad8db7a523a /servers/rendering
parent6ab92464bc6356f3342c3efd1fc1bb1a5e4467d5 (diff)
Revert "Renamed plane's d to distance"
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp2
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp
index afd1296002..d469dd97ca 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_effects_rd.cpp
@@ -558,7 +558,7 @@ void RasterizerEffectsRD::sub_surface_scattering(RID p_diffuse, RID p_diffuse2,
int32_t y_groups = (p_screen_size.height - 1) / 8 + 1;
Plane p = p_camera.xform4(Plane(1, 0, -1, 1));
- p.normal /= p.distance;
+ p.normal /= p.d;
float unit_size = p.normal.x;
{ //scale color and depth to half
diff --git a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
index 8ca8446c23..8d299d623a 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_storage_rd.cpp
@@ -1368,7 +1368,7 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
gui[0] = v.normal.x;
gui[1] = v.normal.y;
gui[2] = v.normal.z;
- gui[3] = v.distance;
+ gui[3] = v.d;
}
} break;
case ShaderLanguage::TYPE_MAT2: {
@@ -4929,7 +4929,7 @@ void RasterizerStorageRD::_global_variable_store_in_buffer(int32_t p_index, RS::
bv.x = v.normal.x;
bv.y = v.normal.y;
bv.z = v.normal.z;
- bv.w = v.distance;
+ bv.w = v.d;
} break;
case RS::GLOBAL_VAR_TYPE_COLOR: {
GlobalVariables::Value &bv = global_variables.buffer_values[p_index];