File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed
common/webapp/src/js/map/hires Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -47,25 +47,25 @@ varying float vSunlight;
4747varying float vBlocklight;
4848
4949void main() {
50- vPosition = position;
51- vec4 worldPos = modelMatrix * vec4(vPosition, 1);
52- vWorldPosition = worldPos.xyz;
53- vNormal = normal;
54- vUv = uv;
55- vColor = color;
56- vAo = ao;
57- vSunlight = sunlight;
58- vBlocklight = blocklight;
59-
60- // apply directional lighting
61- if (vNormal.x * vNormal.z == 0.0) {
50+ vPosition = position;
51+ vec4 worldPos = modelMatrix * vec4(vPosition, 1);
52+ vWorldPosition = worldPos.xyz;
53+ vNormal = normal;
54+ vUv = uv;
55+ vColor = color;
56+ vAo = ao;
57+ vSunlight = sunlight;
58+ vBlocklight = blocklight;
59+
60+ // apply directional lighting
61+ if (vNormal.x * vNormal.z == 0.0) {
6262 float distFac = smoothstep(1000.0, 50.0, distance);
6363 vAo *= 1.0 - abs(dot(vNormal.xz, lightDirection)) * 0.4 * distFac;
6464 vAo *= 1.0 - max(0.0, -vNormal.y) * 0.6 * distFac;
6565 }
66-
67- gl_Position = projectionMatrix * (viewMatrix * modelMatrix * vec4(position, 1));
68-
69- ${ ShaderChunk . logdepthbuf_vertex }
66+
67+ gl_Position = projectionMatrix * (viewMatrix * modelMatrix * vec4(position, 1));
68+
69+ ${ ShaderChunk . logdepthbuf_vertex }
7070}
7171` ;
You can’t perform that action at this time.
0 commit comments