From d790bbc2803230c2e2b9a6906fd9aaeefe20be09 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 30 Aug 2023 15:40:16 -0700 Subject: [PATCH] rename confusing variable --- src/shader.wgsl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shader.wgsl b/src/shader.wgsl index 7ae2d05c..cf11303b 100644 --- a/src/shader.wgsl +++ b/src/shader.wgsl @@ -1,6 +1,6 @@ struct SkyOutput { @builtin(position) position: vec4, - @location(0) uv: vec3, + @location(0) sampledir: vec3, }; struct Data { @@ -34,7 +34,7 @@ fn vs_sky(@builtin(vertex_index) vertex_index: u32) -> SkyOutput { let unprojected = r_data.proj_inv * pos; var result: SkyOutput; - result.uv = inv_model_view * unprojected.xyz; + result.sampledir = inv_model_view * unprojected.xyz; result.position = pos; return result; } @@ -92,7 +92,7 @@ var r_sampler: sampler; @fragment fn fs_sky(vertex: SkyOutput) -> @location(0) vec4 { - return textureSample(r_texture, r_sampler, vertex.uv); + return textureSample(r_texture, r_sampler, vertex.sampledir); } @fragment