From 4d538090e5ba7dac0c7d1b08263a9f6a4e6399c2 Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Wed, 20 Nov 2024 20:02:10 +0100 Subject: [PATCH] Fix file indentation --- .../src/js/map/hires/HiresVertexShader.js | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/common/webapp/src/js/map/hires/HiresVertexShader.js b/common/webapp/src/js/map/hires/HiresVertexShader.js index 762b0489..1add4aa1 100644 --- a/common/webapp/src/js/map/hires/HiresVertexShader.js +++ b/common/webapp/src/js/map/hires/HiresVertexShader.js @@ -47,25 +47,25 @@ varying float vSunlight; varying float vBlocklight; void main() { - vPosition = position; - vec4 worldPos = modelMatrix * vec4(vPosition, 1); - vWorldPosition = worldPos.xyz; - vNormal = normal; - vUv = uv; - vColor = color; - vAo = ao; - vSunlight = sunlight; - vBlocklight = blocklight; - - // apply directional lighting - if (vNormal.x * vNormal.z == 0.0) { + vPosition = position; + vec4 worldPos = modelMatrix * vec4(vPosition, 1); + vWorldPosition = worldPos.xyz; + vNormal = normal; + vUv = uv; + vColor = color; + vAo = ao; + vSunlight = sunlight; + vBlocklight = blocklight; + + // apply directional lighting + if (vNormal.x * vNormal.z == 0.0) { float distFac = smoothstep(1000.0, 50.0, distance); vAo *= 1.0 - abs(dot(vNormal.xz, lightDirection)) * 0.4 * distFac; vAo *= 1.0 - max(0.0, -vNormal.y) * 0.6 * distFac; } - - gl_Position = projectionMatrix * (viewMatrix * modelMatrix * vec4(position, 1)); - - ${ShaderChunk.logdepthbuf_vertex} + + gl_Position = projectionMatrix * (viewMatrix * modelMatrix * vec4(position, 1)); + + ${ShaderChunk.logdepthbuf_vertex} } `;