File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -69,19 +69,18 @@ void WireframeCanvasRenderingEngine4D::render_frame() {
6969 const int b_index = edge_indices[edge_index * 2 + 1 ];
7070 const Vector4 a_vert_4d = camera_relative_vertices[a_index];
7171 const Vector4 b_vert_4d = camera_relative_vertices[b_index];
72-
72+ // Cull edges that are too far in the W axis.
7373 if (camera_has_w_fading) {
7474 real_t fade_denom = camera_w_fade_distance;
7575 if (camera_has_perspective) {
7676 fade_denom += camera_w_fade_slope * -0 .5f * (a_vert_4d.z + b_vert_4d.z );
7777 }
78-
79- if (abs ((a_vert_4d.w + b_vert_4d.w ) / 2.0 ) > fade_denom) {
80- // The edge is too far in the w axis from the camera, so we can skip this edge.
78+ if (Math::abs ((a_vert_4d.w + b_vert_4d.w ) / 2 .0f ) > fade_denom) {
79+ // The edge is too far in the W axis from the camera, so we can skip this edge.
8180 continue ;
8281 }
8382 }
84-
83+ // Cull or clip edges that are behind the camera.
8584 if (a_vert_4d.z > negative_camera_clip_depth_near) {
8685 if (b_vert_4d.z > negative_camera_clip_depth_near) {
8786 // Both points are behind the camera, so we skip this edge.
You can’t perform that action at this time.
0 commit comments