summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-04-03 05:50:40 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-01-09 03:47:14 -0500
commit1d5042c9e265219dec8da7311879f12ef3ef698b (patch)
tree9456ab509bbcaf26cad8dca32dbe18a3cca9277d /servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
parent98ccaa1bad97bdb83b2afd6a4df6f7a392745592 (diff)
Use Math_TAU and deg2rad/rad2deg in more places and optimize code
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp')
-rw-r--r--servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
index 5b3c3c703f..6f6388820e 100644
--- a/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp
@@ -1622,7 +1622,7 @@ void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index,
projection.set_frustum(xmin, xmax, ymin, ymax, nearp, farp);
}
- Vector3 cam_target = Basis(Vector3(0, 0, Math_PI * 2 * ((i + 3) / 4.0))).xform(Vector3(0, 1, 0));
+ Vector3 cam_target = Basis(Vector3(0, 0, Math_TAU * ((i + 3) / 4.0))).xform(Vector3(0, 1, 0));
projection = projection * CameraMatrix(Transform().looking_at(cam_target, Vector3(0, 0, -1)).affine_inverse());
ShadowRenderPushConstant push_constant;