| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>TemporalReprojectNode - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Node.html">Node</a> → <a href="TempNode.html">TempNode</a> → </p>
- <h1 translate="no">TemporalReprojectNode</h1>
- <section>
- <header>
- <div class="class-description"><p>Temporal reprojection pass for denoising screen-space effects (SSGI, SSR, etc.).</p>
- <p>Both modes share geometrically-weighted 4-tap bilinear history sampling and YCoCg variance clipping.
- Surface velocity reprojection is always sampled first. Specular mode then blends in
- hit-point parallax history on top of that surface result.
- Diffuse mode applies velocity-field divergence to detect surface stretching.</p>
- <p>Unlike jitter-based TAA/TAAU, this node does not apply camera sub-pixel jitter — it only
- reprojects and accumulates history using motion vectors.</p>
- <p>References:</p>
- <ul>
- <li><a href="https://alextardif.com/TAA.html" target="_blank" rel="noopener">https://alextardif.com/TAA.html</a></li>
- <li><a href="https://www.elopezr.com/temporal-aa-and-the-quest-for-the-holy-trail/" target="_blank" rel="noopener">https://www.elopezr.com/temporal-aa-and-the-quest-for-the-holy-trail/</a></li>
- </ul></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">TemporalReprojectNode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
- <pre><code class="language-js">import { temporalReproject } from 'three/addons/tsl/display/TemporalReprojectNode.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="TemporalReprojectNode" translate="no">new <a href="#TemporalReprojectNode">TemporalReprojectNode</a><span class="signature">( beautyNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, depthNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, normalNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, velocityNode : <span class="param-type"><a href="TextureNode.html">TextureNode</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, options : <span class="param-type"><a href="global.html#TemporalReprojectNodeOptions">TemporalReprojectNodeOptions</a></span> )</span> </h3>
- <div class="method">
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong translate="no">beautyNode</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong translate="no">depthNode</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong translate="no">normalNode</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong translate="no">velocityNode</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong translate="no">camera</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong translate="no">options</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="accumulate" translate="no">.<a href="#accumulate">accumulate</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>When <code>true</code>, resolve output is copied into the internal history buffer each frame.
- When <code>false</code>, history is supplied externally via <a href="TemporalReprojectNode.html#setHistoryTexture">TemporalReprojectNode#setHistoryTexture</a>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="mode" translate="no">.<a href="#mode">mode</a><span class="type-signature"> : <a href="global.html#TemporalReprojectMode">TemporalReprojectMode</a></span> </h3>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="setHistoryTexture" translate="no">.<a href="#setHistoryTexture">setHistoryTexture</a><span class="signature">( source : <span class="param-type">Object | <a href="Texture.html">Texture</a></span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Supplies an external history source (e.g. a <a href="RecurrentDenoiseNode.html">RecurrentDenoiseNode</a> or its
- texture). Only used when <a href="TemporalReprojectNode.html#accumulate">TemporalReprojectNode#accumulate</a> is <code>false</code>.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong translate="no">source</strong>
- </td>
- <td class="description last">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/TemporalReprojectNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/display/TemporalReprojectNode.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|