extensive work on lighting, shadows, and fog

- use MeshLambertMaterial for interiors, terrain, and shapes
- use smooth vertex normal blending to avoid facted-looking contrasty lighting
  between adjacent surfaces
- update io_dif Blender addon to extract lightmaps
- re-export .dif files to glTF with lightmaps and without LOD
- enable sun, ensure correct direction
- adjust fog (more work to do)
- cleanup and optimization
This commit is contained in:
Brian Beck 2025-12-07 14:01:26 -08:00
parent 035812724d
commit 3ba1ce9afd
927 changed files with 632 additions and 215 deletions

View file

@ -101,10 +101,14 @@ uniform float tiling4;
uniform float tiling5;
uniform float debugMode;
${visibilityMask ? "uniform sampler2D visibilityMask;" : ""}
${detailTexture ? `uniform sampler2D detailTexture;
${
detailTexture
? `uniform sampler2D detailTexture;
uniform float detailTiling;
uniform float detailFadeDistance;
varying vec3 vTerrainWorldPos;` : ""}
varying vec3 vTerrainWorldPos;`
: ""
}
// Wireframe edge detection for debug mode
float getWireframe(vec2 uv, float gridSize, float lineWidth) {