@takram/three-clouds 0.7.0 → 0.7.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takram/three-clouds",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "A Three.js and R3F implementation of geospatial volumetric clouds",
5
5
  "keywords": [
6
6
  "three",
@@ -5,6 +5,7 @@ precision highp sampler2DArray;
5
5
  #include <common>
6
6
  #include <packing>
7
7
 
8
+ #include "core/depth"
8
9
  #include "core/math"
9
10
  #include "core/turbo"
10
11
  #include "core/generators"
@@ -818,6 +819,7 @@ vec2 getHazeRayNearFar(const IntersectionResult intersections) {
818
819
 
819
820
  float getRayDistanceToScene(const vec3 rayDirection, out float viewZ) {
820
821
  float depth = readDepth(vUv * targetUvScale + temporalJitter);
822
+ depth = reverseLogDepth(depth, cameraNear, cameraFar);
821
823
  if (depth < 1.0 - 1e-7) {
822
824
  viewZ = getViewZ(depth);
823
825
  return -viewZ / dot(rayDirection, vCameraDirection);