Browse Source

Updated docs.

Mr.doob 2 months ago
parent
commit
47df54e21e

+ 4 - 0
docs/index.html

@@ -1027,6 +1027,8 @@
 						<li><a href="TSL.html#buffer">buffer</a></li>
 						<li><a href="TSL.html#bufferAttribute">bufferAttribute</a></li>
 						<li><a href="TSL.html#builtin">builtin</a></li>
+						<li><a href="TSL.html#builtinAOContext">builtinAOContext</a></li>
+						<li><a href="TSL.html#builtinShadowContext">builtinShadowContext</a></li>
 						<li><a href="TSL.html#bumpMap">bumpMap</a></li>
 						<li><a href="TSL.html#burn">burn</a></li>
 						<li><a href="TSL.html#bypass">bypass</a></li>
@@ -1497,6 +1499,7 @@
 						<li><a href="TSL.html#viewportSize">viewportSize</a></li>
 						<li><a href="TSL.html#viewportTexture">viewportTexture</a></li>
 						<li><a href="TSL.html#viewportUV">viewportUV</a></li>
+						<li><a href="TSL.html#vogelDiskSample">vogelDiskSample</a></li>
 						<li><a href="TSL.html#wgsl">wgsl</a></li>
 						<li><a href="TSL.html#workgroupArray">workgroupArray</a></li>
 						<li><a href="TSL.html#workgroupBarrier">workgroupBarrier</a></li>
@@ -1636,6 +1639,7 @@
 						<li><a href="global.html#PCFShadowMap">PCFShadowMap</a></li>
 						<li><a href="global.html#PCFSoftShadowFilter">PCFSoftShadowFilter</a></li>
 						<li><a href="global.html#PCFSoftShadowMap">PCFSoftShadowMap</a></li>
+						<li><a href="global.html#PointShadowFilter">PointShadowFilter</a></li>
 						<li><a href="global.html#R11_EAC_Format">R11_EAC_Format</a></li>
 						<li><a href="global.html#RED_GREEN_RGTC2_Format">RED_GREEN_RGTC2_Format</a></li>
 						<li><a href="global.html#RED_RGTC1_Format">RED_RGTC1_Format</a></li>

+ 18 - 1
docs/pages/BufferGeometry.html

@@ -110,6 +110,14 @@ now defines indirect draw calls.</p>
 						<p>Default is <code>null</code>.</p>
 					</div>
 				</div>
+				<div class="member">
+					<h3 class="name" id="indirectOffset" translate="no">.<a href="#indirectOffset">indirectOffset</a><span class="type-signature"> : number</span> </h3>
+					<div class="description">
+						<p>The offset, in bytes, into the indirect drawing buffer where the value data begins.</p>
+<p>Can only be used with <a href="WebGPURenderer.html">WebGPURenderer</a> and a WebGPU backend.</p>
+						<p>Default is <code>0</code>.</p>
+					</div>
+				</div>
 				<div class="member">
 					<h3 class="name" id="isBufferGeometry" translate="no">.<a href="#isBufferGeometry">isBufferGeometry</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
 					<div class="description">
@@ -644,7 +652,7 @@ data from the array. The length of the array must match the vertex count.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
 						</dl>
 					</div>
-					<h3 class="name name-method" id="setIndirect" translate="no">.<a href="#setIndirect">setIndirect</a><span class="signature">( indirect : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a></span> )</span><span class="type-signature"> : <a href="BufferGeometry.html">BufferGeometry</a></span> </h3>
+					<h3 class="name name-method" id="setIndirect" translate="no">.<a href="#setIndirect">setIndirect</a><span class="signature">( indirect : <span class="param-type"><a href="BufferAttribute.html">BufferAttribute</a></span>, indirectOffset : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="BufferGeometry.html">BufferGeometry</a></span> </h3>
 					<div class="method">
 						<div class="description">
 							<p>Sets the given indirect attribute to this geometry.</p>
@@ -659,6 +667,15 @@ data from the array. The length of the array must match the vertex count.</p>
 										<p>The attribute holding indirect draw calls.</p>
 									</td>
 								</tr>
+								<tr>
+									<td class="name">
+										<strong>indirectOffset</strong>
+									</td>
+									<td class="description last">
+										<p>The offset, in bytes, into the indirect drawing buffer where the value data begins.</p>
+										<p>Default is <code>0</code>.</p>
+									</td>
+								</tr>
 							</tbody>
 						</table>
 						<dl class="details">

+ 1 - 1
docs/pages/CubeTextureNode.html

@@ -120,7 +120,7 @@
 					<h3 class="name name-method" id="getInputType" translate="no">.<a href="#getInputType">getInputType</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : string</span> </h3>
 					<div class="method">
 						<div class="description">
-							<p>Overwrites the default implementation to return a fixed value <code>'cubeTexture'</code>.</p>
+							<p>Overwrites the default implementation to return the appropriate cube texture type.</p>
 						</div>
 						<table class="params">
 							<tbody>

+ 30 - 9
docs/pages/PointShadowNode.html

@@ -94,6 +94,35 @@ rendering code.</p>
 							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="ShadowNode.html#renderShadow">ShadowNode#renderShadow</a></dt>
 						</dl>
 					</div>
+					<h3 class="name name-method" id="setupRenderTarget" translate="no">.<a href="#setupRenderTarget">setupRenderTarget</a><span class="signature">( shadow : <span class="param-type"><a href="LightShadow.html">LightShadow</a></span>, builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : Object</span> </h3>
+					<div class="method">
+						<div class="description">
+							<p>Overwrites the default implementation to create a CubeRenderTarget with CubeDepthTexture.</p>
+						</div>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name">
+										<strong>shadow</strong>
+									</td>
+									<td class="description last">
+										<p>The light shadow object.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>builder</strong>
+									</td>
+									<td class="description last">
+										<p>A reference to the current node builder.</p>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+						<dl class="details">
+							<dt class="tag-returns"><strong>Returns:</strong> An object containing the shadow map and depth texture.</dt>
+						</dl>
+					</div>
 					<h3 class="name name-method" id="setupShadowCoord" translate="no">.<a href="#setupShadowCoord">setupShadowCoord</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span>, shadowPosition : <span class="param-type"><a href="Node.html">Node</a>.&lt;vec3></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec3></span> </h3>
 					<div class="method">
 						<div class="description">
@@ -158,20 +187,12 @@ shadow filter functions.</p>
 										<p>This function defines the filtering type of the shadow map e.g. PCF.</p>
 									</td>
 								</tr>
-								<tr>
-									<td class="name">
-										<strong>shadowTexture</strong>
-									</td>
-									<td class="description last">
-										<p>A reference to the shadow map's texture.</p>
-									</td>
-								</tr>
 								<tr>
 									<td class="name">
 										<strong>depthTexture</strong>
 									</td>
 									<td class="description last">
-										<p>A reference to the shadow map's texture data.</p>
+										<p>A reference to the shadow map's depth texture.</p>
 									</td>
 								</tr>
 								<tr>

+ 1 - 1
docs/pages/Sphere.html

@@ -237,7 +237,7 @@ be negative.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> A reference to this sphere.</dt>
 						</dl>
 					</div>
-					<h3 class="name name-method" id="fromJSON" translate="no">.<a href="#fromJSON">fromJSON</a><span class="signature">( json : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Box3.html">Box3</a></span> </h3>
+					<h3 class="name name-method" id="fromJSON" translate="no">.<a href="#fromJSON">fromJSON</a><span class="signature">( json : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Sphere.html">Sphere</a></span> </h3>
 					<div class="method">
 						<div class="description">
 							<p>Returns a serialized structure of the bounding sphere.</p>

+ 102 - 0
docs/pages/TSL.html

@@ -2734,6 +2734,68 @@ kernels won't perform well. Use Gaussian instead if you need a more high-quality
 							</tbody>
 						</table>
 					</div>
+					<h3 class="name name-method" id="builtinAOContext" translate="no">.<a href="#builtinAOContext">builtinAOContext</a><span class="signature">( aoNode : <span class="param-type"><a href="Node.html">Node</a></span>, node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
+					<div class="method">
+						<div class="description">
+							<p>TSL function for defining a built-in ambient occlusion context for a given node.</p>
+						</div>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name">
+										<strong>aoNode</strong>
+									</td>
+									<td class="description last">
+										<p>The ambient occlusion value node to apply.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>node</strong>
+									</td>
+									<td class="description last">
+										<p>The node whose context should be modified.</p>
+										<p>Default is <code>null</code>.</p>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+					</div>
+					<h3 class="name name-method" id="builtinShadowContext" translate="no">.<a href="#builtinShadowContext">builtinShadowContext</a><span class="signature">( shadowNode : <span class="param-type"><a href="ShadowNode.html">ShadowNode</a></span>, light : <span class="param-type"><a href="Light.html">Light</a></span>, node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="ContextNode.html">ContextNode</a></span> </h3>
+					<div class="method">
+						<div class="description">
+							<p>TSL function for defining a built-in shadow context for a given node.</p>
+						</div>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name">
+										<strong>shadowNode</strong>
+									</td>
+									<td class="description last">
+										<p>The shadow node representing the light's shadow.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>light</strong>
+									</td>
+									<td class="description last">
+										<p>The light associated with the shadow.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>node</strong>
+									</td>
+									<td class="description last">
+										<p>The node whose context should be modified.</p>
+										<p>Default is <code>null</code>.</p>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+					</div>
 					<h3 class="name name-method" id="bumpMap" translate="no">.<a href="#bumpMap">bumpMap</a><span class="signature">( textureNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span>, scaleNode : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="BumpMapNode.html">BumpMapNode</a></span> </h3>
 					<div class="method">
 						<div class="description">
@@ -11724,6 +11786,46 @@ which is incorrect.</p>
 							</tbody>
 						</table>
 					</div>
+					<h3 class="name name-method" id="vogelDiskSample" translate="no">.<a href="#vogelDiskSample">vogelDiskSample</a><span class="signature">( sampleIndex : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, samplesCount : <span class="param-type"><a href="Node.html">Node</a>.&lt;int></span>, phi : <span class="param-type"><a href="Node.html">Node</a>.&lt;float></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec2></span> </h3>
+					<div class="method">
+						<div class="description">
+							<p>Vogel disk sampling for uniform circular distribution.</p>
+<p>This function generates sample points distributed uniformly on a disk using the golden angle,
+resulting in an efficient low-discrepancy sequence for sampling. The rotation parameter (phi)
+allows randomizing the pattern per-pixel when combined with IGN.</p>
+						</div>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name">
+										<strong>sampleIndex</strong>
+									</td>
+									<td class="description last">
+										<p>The index of the current sample (0-based).</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>samplesCount</strong>
+									</td>
+									<td class="description last">
+										<p>The total number of samples.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>phi</strong>
+									</td>
+									<td class="description last">
+										<p>Rotation angle in radians (typically from IGN * 2π).</p>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+						<dl class="details">
+							<dt class="tag-returns"><strong>Returns:</strong> A 2D point on the unit disk.</dt>
+						</dl>
+					</div>
 					<h3 class="name name-method" id="wgsl" translate="no">.<a href="#wgsl">wgsl</a><span class="signature">( src : <span class="param-type">string</span>, includes : <span class="param-type">Array.&lt;<a href="Node.html">Node</a>></span> )</span><span class="type-signature"> : <a href="CodeNode.html">CodeNode</a></span> </h3>
 					<div class="method">
 						<div class="description">

+ 63 - 1
docs/pages/global.html

@@ -1637,7 +1637,10 @@ with a binary <code>[0,1]</code> result.</p>
 					<h3 class="name name-method" id="PCFShadowFilter" translate="no">.<a href="#PCFShadowFilter">PCFShadowFilter</a><span class="signature">( inputs : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
 					<div class="method">
 						<div class="description">
-							<p>A shadow filtering function performing PCF filtering.</p>
+							<p>A shadow filtering function performing PCF filtering with Vogel disk sampling and IGN.</p>
+<p>Uses 5 samples distributed via Vogel disk pattern, rotated per-pixel using Interleaved
+Gradient Noise (IGN) to break up banding artifacts. Combined with hardware PCF (4-tap
+filtering per sample), this effectively provides 20 filtered taps with better distribution.</p>
 						</div>
 						<table class="params">
 							<tbody>
@@ -1732,6 +1735,65 @@ with a binary <code>[0,1]</code> result.</p>
 							<dt class="tag-returns"><strong>Returns:</strong> The filtering result.</dt>
 						</dl>
 					</div>
+					<h3 class="name name-method" id="PointShadowFilter" translate="no">.<a href="#PointShadowFilter">PointShadowFilter</a><span class="signature">( inputs : <span class="param-type">Object</span> )</span><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
+					<div class="method">
+						<div class="description">
+							<p>A shadow filtering function for point lights using Vogel disk sampling and IGN.</p>
+<p>Uses 5 samples distributed via Vogel disk pattern in tangent space around the
+sample direction, rotated per-pixel using Interleaved Gradient Noise (IGN).</p>
+						</div>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name">
+										<strong>inputs</strong>
+									</td>
+									<td class="description last">
+										<p>The input parameter object.</p>
+						<table class="params">
+							<tbody>
+								<tr>
+									<td class="name">
+										<strong>depthTexture</strong>
+									</td>
+									<td class="description last">
+										<p>A reference to the shadow cube map.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>bd3D</strong>
+									</td>
+									<td class="description last">
+										<p>The normalized direction from light to fragment.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>dp</strong>
+									</td>
+									<td class="description last">
+										<p>The depth value to compare against.</p>
+									</td>
+								</tr>
+								<tr>
+									<td class="name">
+										<strong>shadow</strong>
+									</td>
+									<td class="description last">
+										<p>The light shadow.</p>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+									</td>
+								</tr>
+							</tbody>
+						</table>
+						<dl class="details">
+							<dt class="tag-returns"><strong>Returns:</strong> The filtering result.</dt>
+						</dl>
+					</div>
 					<h3 class="name name-method" id="Stack" translate="no">.<a href="#Stack">Stack</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span> )</span><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
 					<div class="method">
 						<div class="description">

+ 24 - 0
docs/search.json

@@ -1668,6 +1668,10 @@
 			"title": "BufferGeometry#indirect",
 			"kind": "member"
 		},
+		{
+			"title": "BufferGeometry#indirectOffset",
+			"kind": "member"
+		},
 		{
 			"title": "BufferGeometry#isBufferGeometry",
 			"kind": "member"
@@ -10228,6 +10232,10 @@
 			"title": "PointShadowNode#renderShadow",
 			"kind": "function"
 		},
+		{
+			"title": "PointShadowNode#setupRenderTarget",
+			"kind": "function"
+		},
 		{
 			"title": "PointShadowNode#setupShadowCoord",
 			"kind": "function"
@@ -25300,6 +25308,10 @@
 			"title": "PlaneGeometry.fromJSON",
 			"kind": "function"
 		},
+		{
+			"title": "PointShadowFilter",
+			"kind": "function"
+		},
 		{
 			"title": "PolyhedronGeometry.fromJSON",
 			"kind": "function"
@@ -26482,6 +26494,14 @@
 			"title": "builtin",
 			"kind": "function"
 		},
+		{
+			"title": "builtinAOContext",
+			"kind": "function"
+		},
+		{
+			"title": "builtinShadowContext",
+			"kind": "function"
+		},
 		{
 			"title": "bumpMap",
 			"kind": "function"
@@ -28378,6 +28398,10 @@
 			"title": "viewportUV",
 			"kind": "member"
 		},
+		{
+			"title": "vogelDiskSample",
+			"kind": "function"
+		},
 		{
 			"title": "wgsl",
 			"kind": "function"

粤ICP备19079148号