FXAANode.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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" rel="noopener">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"><a href="TextureNode.html">TextureNode</a></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">
  34. <strong>textureNode</strong>
  35. </td>
  36. <td class="description last">
  37. <p>The texture node that represents the input of the effect.</p>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>
  42. </div>
  43. </div>
  44. <h2 class="subsection-title">Properties</h2>
  45. <div class="member">
  46. <h3 class="name" id="textureNode" translate="no">.<a href="#textureNode">textureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  47. <div class="description">
  48. <p>The texture node that represents the input of the effect.</p>
  49. </div>
  50. </div>
  51. <div class="member">
  52. <h3 class="name" id="updateBeforeType" translate="no">.<a href="#updateBeforeType">updateBeforeType</a><span class="type-signature"> : string</span> </h3>
  53. <div class="description">
  54. <p>The <code>updateBeforeType</code> is set to <code>NodeUpdateType.FRAME</code> since the node updates
  55. its internal uniforms once per frame in <code>updateBefore()</code>.</p>
  56. <p>Default is <code>'frame'</code>.</p>
  57. </div>
  58. <dl class="details">
  59. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBeforeType">TempNode#updateBeforeType</a></dt>
  60. </dl>
  61. </div>
  62. <h2 class="subsection-title">Methods</h2>
  63. <h3 class="name name-method" id="setup" translate="no">.<a href="#setup">setup</a><span class="signature">( builder : <span class="param-type"><a href="NodeBuilder.html">NodeBuilder</a></span> )</span><span class="type-signature"> : ShaderCallNodeInternal</span> </h3>
  64. <div class="method">
  65. <div class="description">
  66. <p>This method is used to setup the effect's TSL code.</p>
  67. </div>
  68. <table class="params">
  69. <tbody>
  70. <tr>
  71. <td class="name">
  72. <strong>builder</strong>
  73. </td>
  74. <td class="description last">
  75. <p>The current node builder.</p>
  76. </td>
  77. </tr>
  78. </tbody>
  79. </table>
  80. <dl class="details">
  81. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  82. </dl>
  83. </div>
  84. <h3 class="name name-method" id="updateBefore" translate="no">.<a href="#updateBefore">updateBefore</a><span class="signature">( frame : <span class="param-type"><a href="NodeFrame.html">NodeFrame</a></span> )</span> </h3>
  85. <div class="method">
  86. <div class="description">
  87. <p>This method is used to update the effect's uniforms once per frame.</p>
  88. </div>
  89. <table class="params">
  90. <tbody>
  91. <tr>
  92. <td class="name">
  93. <strong>frame</strong>
  94. </td>
  95. <td class="description last">
  96. <p>The current node frame.</p>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <dl class="details">
  102. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBefore">TempNode#updateBefore</a></dt>
  103. </dl>
  104. </div>
  105. <h2 class="subsection-title">Source</h2>
  106. <p>
  107. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/FXAANode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/display/FXAANode.js</a>
  108. </p>
  109. </article>
  110. </section>
  111. <script src="../scripts/linenumber.js"></script>
  112. <script src="../scripts/page.js"></script>
  113. </body>
  114. </html>
粤ICP备19079148号