@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/CHANGELOG.md +6 -0
- package/build/shared.cjs +2 -0
- package/build/shared.cjs.map +1 -1
- package/build/shared.js +2 -0
- package/build/shared.js.map +1 -1
- package/package.json +1 -1
- package/src/shaders/clouds.frag +2 -0
package/package.json
CHANGED
package/src/shaders/clouds.frag
CHANGED
|
@@ -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);
|