TemporalReprojectNode.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>TemporalReprojectNode - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Node.html">Node</a> → <a href="TempNode.html">TempNode</a> → </p>
  13. <h1 translate="no">TemporalReprojectNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Temporal reprojection pass for denoising screen-space effects (SSGI, SSR, etc.).</p>
  17. <p>Both modes share geometrically-weighted 4-tap bilinear history sampling and YCoCg variance clipping.
  18. Surface velocity reprojection is always sampled first. Specular mode then blends in
  19. hit-point parallax history on top of that surface result.
  20. Diffuse mode applies velocity-field divergence to detect surface stretching.</p>
  21. <p>Unlike jitter-based TAA/TAAU, this node does not apply camera sub-pixel jitter — it only
  22. reprojects and accumulates history using motion vectors.</p>
  23. <p>References:</p>
  24. <ul>
  25. <li><a href="https://alextardif.com/TAA.html" target="_blank" rel="noopener">https://alextardif.com/TAA.html</a></li>
  26. <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>
  27. </ul></div>
  28. </header>
  29. <article>
  30. <h2 class="subsection-title">Import</h2>
  31. <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>
  32. <pre><code class="language-js">import { temporalReproject } from 'three/addons/tsl/display/TemporalReprojectNode.js';</code></pre>
  33. <div class="container-overview">
  34. <h2>Constructor</h2>
  35. <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>
  36. <div class="method">
  37. <table class="params">
  38. <tbody>
  39. <tr>
  40. <td class="name">
  41. <strong translate="no">beautyNode</strong>
  42. </td>
  43. <td class="description last">
  44. </td>
  45. </tr>
  46. <tr>
  47. <td class="name">
  48. <strong translate="no">depthNode</strong>
  49. </td>
  50. <td class="description last">
  51. </td>
  52. </tr>
  53. <tr>
  54. <td class="name">
  55. <strong translate="no">normalNode</strong>
  56. </td>
  57. <td class="description last">
  58. </td>
  59. </tr>
  60. <tr>
  61. <td class="name">
  62. <strong translate="no">velocityNode</strong>
  63. </td>
  64. <td class="description last">
  65. </td>
  66. </tr>
  67. <tr>
  68. <td class="name">
  69. <strong translate="no">camera</strong>
  70. </td>
  71. <td class="description last">
  72. </td>
  73. </tr>
  74. <tr>
  75. <td class="name">
  76. <strong translate="no">options</strong>
  77. </td>
  78. <td class="description last">
  79. </td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </div>
  84. </div>
  85. <h2 class="subsection-title">Properties</h2>
  86. <div class="member">
  87. <h3 class="name" id="accumulate" translate="no">.<a href="#accumulate">accumulate</a><span class="type-signature"> : boolean</span> </h3>
  88. <div class="description">
  89. <p>When <code>true</code>, resolve output is copied into the internal history buffer each frame.
  90. When <code>false</code>, history is supplied externally via <a href="TemporalReprojectNode.html#setHistoryTexture">TemporalReprojectNode#setHistoryTexture</a>.</p>
  91. </div>
  92. </div>
  93. <div class="member">
  94. <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>
  95. </div>
  96. <h2 class="subsection-title">Methods</h2>
  97. <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>
  98. <div class="method">
  99. <div class="description">
  100. <p>Supplies an external history source (e.g. a <a href="RecurrentDenoiseNode.html">RecurrentDenoiseNode</a> or its
  101. texture). Only used when <a href="TemporalReprojectNode.html#accumulate">TemporalReprojectNode#accumulate</a> is <code>false</code>.</p>
  102. </div>
  103. <table class="params">
  104. <tbody>
  105. <tr>
  106. <td class="name">
  107. <strong translate="no">source</strong>
  108. </td>
  109. <td class="description last">
  110. </td>
  111. </tr>
  112. </tbody>
  113. </table>
  114. </div>
  115. <h2 class="subsection-title">Source</h2>
  116. <p>
  117. <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>
  118. </p>
  119. </article>
  120. </section>
  121. <script src="../scripts/linenumber.js"></script>
  122. <script src="../scripts/page.js"></script>
  123. </body>
  124. </html>
粤ICP备19079148号