@d5techs/3dgs-lib 1.4.66 → 1.4.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3dgs-lib.cjs +3 -4
- package/dist/3dgs-lib.cjs.map +1 -1
- package/dist/3dgs-lib.js +3 -4
- package/dist/3dgs-lib.js.map +1 -1
- package/package.json +1 -1
package/dist/3dgs-lib.cjs
CHANGED
|
@@ -2239,7 +2239,7 @@ fn dirToUv(d: vec3<f32>) -> vec2<f32> {
|
|
|
2239
2239
|
@fragment fn fs(i: V) -> @location(0) vec4<f32> {
|
|
2240
2240
|
let d = normalize(i.dir);
|
|
2241
2241
|
let cx = u.cam.x;
|
|
2242
|
-
let cy = u.cam.y;
|
|
2242
|
+
let cy = max(u.cam.y, 0.1); // clamp: camera always above ground
|
|
2243
2243
|
let cz = u.cam.z;
|
|
2244
2244
|
let captureH = u.cam.w;
|
|
2245
2245
|
|
|
@@ -2260,10 +2260,9 @@ fn dirToUv(d: vec3<f32>) -> vec2<f32> {
|
|
|
2260
2260
|
let skyColor = textureSample(envTexture, envSampler, skyUv).rgb;
|
|
2261
2261
|
let groundColor = textureSample(envTexture, envSampler, groundUv).rgb;
|
|
2262
2262
|
|
|
2263
|
-
// Sharp blend at horizon
|
|
2263
|
+
// Sharp blend at horizon — cy is always > 0 so no aboveGround check needed
|
|
2264
2264
|
let horizonBlend = smoothstep(0.002, -0.002, d.y);
|
|
2265
|
-
let
|
|
2266
|
-
let c = mix(skyColor, groundColor, horizonBlend * aboveGround);
|
|
2265
|
+
let c = mix(skyColor, groundColor, horizonBlend);
|
|
2267
2266
|
|
|
2268
2267
|
// Reinhard tone mapping + gamma
|
|
2269
2268
|
let mapped = c / (c + vec3(1.));
|