Mr.doob преди 4 дни
родител
ревизия
0b8d5fabe7
променени са 6 файла, в които са добавени 49 реда и са изтрити 8 реда
  1. 1 0
      build/three.tsl.js
  2. 0 0
      build/three.tsl.min.js
  3. 24 4
      build/three.webgpu.js
  4. 0 0
      build/three.webgpu.min.js
  5. 24 4
      build/three.webgpu.nodes.js
  6. 0 0
      build/three.webgpu.nodes.min.js

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
build/three.tsl.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
build/three.tsl.min.js


+ 24 - 4
build/three.webgpu.js

@@ -18932,13 +18932,13 @@ class ViewportTextureNode extends TextureNode {
 		this.isOutputTextureNode = true;
 
 		/**
-		 * The `updateBeforeType` is set to `NodeUpdateType.FRAME` since the node renders the
-		 * scene once per frame in its {@link ViewportTextureNode#updateBefore} method.
+		 * The `updateBeforeType` is set to `NodeUpdateType.RENDER` since the node should extract
+		 * the current contents of the bound framebuffer for each render call.
 		 *
 		 * @type {string}
-		 * @default 'frame'
+		 * @default 'render'
 		 */
-		this.updateBeforeType = NodeUpdateType.FRAME;
+		this.updateBeforeType = NodeUpdateType.RENDER;
 
 		/**
 		 * The framebuffer texture for the current renderer context.
@@ -41130,6 +41130,25 @@ const densityFogFactor = Fn( ( [ density ], builder ) => {
 
 } );
 
+/**
+ * Constructs a new height fog factor node. This fog factor requires a Y-up coordinate system.
+ *
+ * @tsl
+ * @function
+ * @param {Node} density - Defines the fog density.
+ * @param {Node} height - The height threshold in world space. Everything below this y-coordinate is affected by fog.
+ */
+const exponentialHeightFogFactor = Fn( ( [ density, height ], builder ) => {
+
+	const viewZ = getViewZNode( builder );
+
+	const distance = height.sub( positionWorld.y ).max( 0 ).toConst();
+	const m = distance.mul( viewZ ).toConst();
+
+	return density.mul( density, m, m ).negate().exp().oneMinus();
+
+} );
+
 /**
  * This class can be used to configure a fog for the scene.
  * Nodes of this type are assigned to `Scene.fogNode`.
@@ -47396,6 +47415,7 @@ var TSL = /*#__PURE__*/Object.freeze({
 	equirectUV: equirectUV,
 	exp: exp,
 	exp2: exp2,
+	exponentialHeightFogFactor: exponentialHeightFogFactor,
 	expression: expression,
 	faceDirection: faceDirection,
 	faceForward: faceForward,

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
build/three.webgpu.min.js


+ 24 - 4
build/three.webgpu.nodes.js

@@ -18932,13 +18932,13 @@ class ViewportTextureNode extends TextureNode {
 		this.isOutputTextureNode = true;
 
 		/**
-		 * The `updateBeforeType` is set to `NodeUpdateType.FRAME` since the node renders the
-		 * scene once per frame in its {@link ViewportTextureNode#updateBefore} method.
+		 * The `updateBeforeType` is set to `NodeUpdateType.RENDER` since the node should extract
+		 * the current contents of the bound framebuffer for each render call.
 		 *
 		 * @type {string}
-		 * @default 'frame'
+		 * @default 'render'
 		 */
-		this.updateBeforeType = NodeUpdateType.FRAME;
+		this.updateBeforeType = NodeUpdateType.RENDER;
 
 		/**
 		 * The framebuffer texture for the current renderer context.
@@ -41130,6 +41130,25 @@ const densityFogFactor = Fn( ( [ density ], builder ) => {
 
 } );
 
+/**
+ * Constructs a new height fog factor node. This fog factor requires a Y-up coordinate system.
+ *
+ * @tsl
+ * @function
+ * @param {Node} density - Defines the fog density.
+ * @param {Node} height - The height threshold in world space. Everything below this y-coordinate is affected by fog.
+ */
+const exponentialHeightFogFactor = Fn( ( [ density, height ], builder ) => {
+
+	const viewZ = getViewZNode( builder );
+
+	const distance = height.sub( positionWorld.y ).max( 0 ).toConst();
+	const m = distance.mul( viewZ ).toConst();
+
+	return density.mul( density, m, m ).negate().exp().oneMinus();
+
+} );
+
 /**
  * This class can be used to configure a fog for the scene.
  * Nodes of this type are assigned to `Scene.fogNode`.
@@ -47396,6 +47415,7 @@ var TSL = /*#__PURE__*/Object.freeze({
 	equirectUV: equirectUV,
 	exp: exp,
 	exp2: exp2,
+	exponentialHeightFogFactor: exponentialHeightFogFactor,
 	expression: expression,
 	faceDirection: faceDirection,
 	faceForward: faceForward,

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
build/three.webgpu.nodes.min.js


Някои файлове не бяха показани, защото твърде много файлове са промени

粤ICP备19079148号