FXAANode.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>FXAANode - 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">FXAANode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Post processing node for applying FXAA. This node requires sRGB input
  17. so tone mapping and color space conversion must happen before the anti-aliasing.</p></div>
  18. </header>
  19. <article>
  20. <h2 class="subsection-title">Import</h2>
  21. <p><span translate="no">FXAANode</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  22. <pre><code class="language-js">import { fxaa } from 'three/addons/tsl/display/FXAANode.js';</code></pre>
  23. <div class="container-overview">
  24. <h2>Constructor</h2>
  25. <h3 class="name name-method" id="FXAANode" translate="no">new <a href="#FXAANode">FXAANode</a><span class="signature">( textureNode : <span class="param-type">TextureNode</span> )</span> </h3>
  26. <div class="method">
  27. <div class="description">
  28. <p>Constructs a new FXAA node.</p>
  29. </div>
  30. <table class="params">
  31. <tbody>
  32. <tr>
  33. <td class="name"><code>textureNode</code></td>
  34. <td class="description last"><p>The texture node that represents the input of the effect.</p></td>
  35. </tr>
  36. </tbody>
  37. </table>
  38. </div>
  39. </div>
  40. <h2 class="subsection-title">Properties</h2>
  41. <div class="member">
  42. <h3 class="name" id="textureNode" translate="no">.<a href="#textureNode">textureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  43. <div class="description">
  44. <p>The texture node that represents the input of the effect.</p>
  45. </div>
  46. </div>
  47. <div class="member">
  48. <h3 class="name" id="updateBeforeType" translate="no">.<a href="#updateBeforeType">updateBeforeType</a><span class="type-signature"> : string</span> </h3>
  49. <div class="description">
  50. <p>The <code>updateBeforeType</code> is set to <code>NodeUpdateType.FRAME</code> since the node updates
  51. its internal uniforms once per frame in <code>updateBefore()</code>.<br/>Default is <code>'frame'</code>.</p>
  52. </div>
  53. <dl class="details">
  54. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBeforeType">TempNode#updateBeforeType</a></dt>
  55. </dl>
  56. </div>
  57. <h2 class="subsection-title">Methods</h2>
  58. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type">NodeBuilder</span> )</span><span class="type-signature"> : ShaderCallNodeInternal</span> </h3>
  59. <div class="method">
  60. <div class="description">
  61. <p>This method is used to setup the effect's TSL code.</p>
  62. </div>
  63. <table class="params">
  64. <tbody>
  65. <tr>
  66. <td class="name"><code>builder</code></td>
  67. <td class="description last"><p>The current node builder.</p></td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. <dl class="details">
  72. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  73. </dl>
  74. <dl class="details">
  75. <dt class="tag-returns"><strong>Returns:</strong> </dt>
  76. </dl>
  77. </div>
  78. <h3 class="name name-method" id="updateBefore" translate="no">.<a href="#updateBefore">updateBefore</a><span class="signature">( frame : <span class="param-type">NodeFrame</span> )</span> </h3>
  79. <div class="method">
  80. <div class="description">
  81. <p>This method is used to update the effect's uniforms once per frame.</p>
  82. </div>
  83. <table class="params">
  84. <tbody>
  85. <tr>
  86. <td class="name"><code>frame</code></td>
  87. <td class="description last"><p>The current node frame.</p></td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. <dl class="details">
  92. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBefore">TempNode#updateBefore</a></dt>
  93. </dl>
  94. </div>
  95. <h2 class="subsection-title">Source</h2>
  96. <p>
  97. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/FXAANode.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/display/FXAANode.js</a>
  98. </p>
  99. </article>
  100. </section>
  101. <script src="../scripts/linenumber.js"></script>
  102. <script src="../scripts/page.js"></script>
  103. </body>
  104. </html>
粤ICP备19079148号