mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-21 10:06:09 +01:00
Fix file indentation
This commit is contained in:
parent
f9346f40e6
commit
4d538090e5
@ -47,25 +47,25 @@ varying float vSunlight;
|
|||||||
varying float vBlocklight;
|
varying float vBlocklight;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vPosition = position;
|
vPosition = position;
|
||||||
vec4 worldPos = modelMatrix * vec4(vPosition, 1);
|
vec4 worldPos = modelMatrix * vec4(vPosition, 1);
|
||||||
vWorldPosition = worldPos.xyz;
|
vWorldPosition = worldPos.xyz;
|
||||||
vNormal = normal;
|
vNormal = normal;
|
||||||
vUv = uv;
|
vUv = uv;
|
||||||
vColor = color;
|
vColor = color;
|
||||||
vAo = ao;
|
vAo = ao;
|
||||||
vSunlight = sunlight;
|
vSunlight = sunlight;
|
||||||
vBlocklight = blocklight;
|
vBlocklight = blocklight;
|
||||||
|
|
||||||
// apply directional lighting
|
// apply directional lighting
|
||||||
if (vNormal.x * vNormal.z == 0.0) {
|
if (vNormal.x * vNormal.z == 0.0) {
|
||||||
float distFac = smoothstep(1000.0, 50.0, distance);
|
float distFac = smoothstep(1000.0, 50.0, distance);
|
||||||
vAo *= 1.0 - abs(dot(vNormal.xz, lightDirection)) * 0.4 * distFac;
|
vAo *= 1.0 - abs(dot(vNormal.xz, lightDirection)) * 0.4 * distFac;
|
||||||
vAo *= 1.0 - max(0.0, -vNormal.y) * 0.6 * distFac;
|
vAo *= 1.0 - max(0.0, -vNormal.y) * 0.6 * distFac;
|
||||||
}
|
}
|
||||||
|
|
||||||
gl_Position = projectionMatrix * (viewMatrix * modelMatrix * vec4(position, 1));
|
gl_Position = projectionMatrix * (viewMatrix * modelMatrix * vec4(position, 1));
|
||||||
|
|
||||||
${ShaderChunk.logdepthbuf_vertex}
|
${ShaderChunk.logdepthbuf_vertex}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
Loading…
Reference in New Issue
Block a user