From 3e8c7e69a23893600f06ee737dace812b72fd86d Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Sat, 6 Aug 2022 02:16:44 +0100 Subject: [PATCH] Fix redundant renormalisation of vertex attribute. --- src/outline.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/outline.wgsl b/src/outline.wgsl index 70bd6ed..a307a72 100644 --- a/src/outline.wgsl +++ b/src/outline.wgsl @@ -40,7 +40,7 @@ fn mat4to3(m: mat4x4) -> mat3x3 { fn vertex(vertex: VertexInput) -> VertexOutput { var out: VertexOutput; var clip_pos = view.view_proj * (mesh.model * vec4(vertex.position, 1.0)); - var clip_norm = mat4to3(view.view_proj) * (mat4to3(mesh.model) * normalize(vertex.normal)); + var clip_norm = mat4to3(view.view_proj) * (mat4to3(mesh.model) * vertex.normal); var clip_delta = vec2(vstage.width * normalize(clip_norm.xy) * clip_pos.w * view_uniform.scale); out.clip_position = vec4((clip_pos.xy + clip_delta) / clip_pos.w, model_origin_z(), 1.0); return out;