Skip to content

Commit

Permalink
Fix file indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Nov 20, 2024
1 parent f9346f4 commit 4d53809
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions common/webapp/src/js/map/hires/HiresVertexShader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
`;

0 comments on commit 4d53809

Please sign in to comment.