Einige Bug Fixes (Camera, Thumbnails), Terrain

This commit is contained in:
2026-08-15 00:11:29 +02:00
parent f2944c9a91
commit 9807a958f4
81 changed files with 865 additions and 321 deletions

View File

@@ -96,4 +96,17 @@ void main() {
#else
outColor = vec4(col.rgb * light * BRIGHTNESS + vec3(spec * 0.35), col.a);
#endif
#ifdef SHOW_GRID
vec2 fw = fwidth(vWorldPos.xz);
float maxFw = max(fw.x, fw.y);
float fade = 1.0 - smoothstep(0.2, 0.6, maxFw);
if (fade > 0.0) {
vec2 gp = fract(vWorldPos.xz);
vec2 d = min(gp, 1.0 - gp);
float ga = 1.0 - min(smoothstep(0.0, max(fw.x, 0.005), d.x),
smoothstep(0.0, max(fw.y, 0.005), d.y));
outColor.rgb = mix(outColor.rgb, vec3(0.5), ga * fade * 0.5);
}
#endif
}