Skip to content

Commit 0f2d204

Browse files
authored
Change directional lighting condition to allow more models to be shaded (#699)
1 parent 4be4363 commit 0f2d204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/webapp/src/js/map/hires/HiresVertexShader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void main() {
5858
vBlocklight = blocklight;
5959
6060
// apply directional lighting
61-
if (vNormal.x * vNormal.z == 0.0) {
61+
if (vNormal.y != 0.0 || abs(abs(vNormal.x) - abs(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;

0 commit comments

Comments
 (0)