From 1d5042c9e265219dec8da7311879f12ef3ef698b Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Fri, 3 Apr 2020 05:50:40 -0400 Subject: Use Math_TAU and deg2rad/rad2deg in more places and optimize code --- servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/rendering/renderer_rd/renderer_canvas_render_rd.cpp') 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; -- cgit v1.2.3