PixelationNode.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>PixelationNode - 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">PixelationNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A inner node definition that implements the actual pixelation TSL code.</p></div>
  17. </header>
  18. <article>
  19. <div class="container-overview">
  20. <h2>Constructor</h2>
  21. <h3 class="name name-method" id="PixelationNode" translate="no">new <a href="#PixelationNode">PixelationNode</a><span class="signature">( textureNode : <span class="param-type">TextureNode</span>, depthNode : <span class="param-type">TextureNode</span>, normalNode : <span class="param-type">TextureNode</span>, pixelSize : <span class="param-type">Node.&lt;float></span>, normalEdgeStrength : <span class="param-type">Node.&lt;float></span>, depthEdgeStrength : <span class="param-type">Node.&lt;float></span> )</span> </h3>
  22. <div class="method">
  23. <div class="description">
  24. <p>Constructs a new pixelation node.</p>
  25. </div>
  26. <table class="params">
  27. <tbody>
  28. <tr>
  29. <td class="name"><code>textureNode</code></td>
  30. <td class="description last"><p>The texture node that represents the beauty pass.</p></td>
  31. </tr>
  32. <tr>
  33. <td class="name"><code>depthNode</code></td>
  34. <td class="description last"><p>The texture that represents the beauty's depth.</p></td>
  35. </tr>
  36. <tr>
  37. <td class="name"><code>normalNode</code></td>
  38. <td class="description last"><p>The texture that represents the beauty's normals.</p></td>
  39. </tr>
  40. <tr>
  41. <td class="name"><code>pixelSize</code></td>
  42. <td class="description last"><p>The pixel size.</p></td>
  43. </tr>
  44. <tr>
  45. <td class="name"><code>normalEdgeStrength</code></td>
  46. <td class="description last"><p>The normal edge strength.</p></td>
  47. </tr>
  48. <tr>
  49. <td class="name"><code>depthEdgeStrength</code></td>
  50. <td class="description last"><p>The depth edge strength.</p></td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </div>
  55. </div>
  56. <h2 class="subsection-title">Properties</h2>
  57. <div class="member">
  58. <h3 class="name" id="_resolution" translate="no">.<a href="#_resolution">_resolution</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;vec4></span> </h3>
  59. <div class="description">
  60. <p>Uniform node that represents the resolution.</p>
  61. </div>
  62. </div>
  63. <div class="member">
  64. <h3 class="name" id="depthEdgeStrength" translate="no">.<a href="#depthEdgeStrength">depthEdgeStrength</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  65. <div class="description">
  66. <p>The depth edge strength.</p>
  67. </div>
  68. </div>
  69. <div class="member">
  70. <h3 class="name" id="depthNode" translate="no">.<a href="#depthNode">depthNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  71. <div class="description">
  72. <p>The texture that represents the beauty's depth.</p>
  73. </div>
  74. </div>
  75. <div class="member">
  76. <h3 class="name" id="normalEdgeStrength" translate="no">.<a href="#normalEdgeStrength">normalEdgeStrength</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  77. <div class="description">
  78. <p>The pixel size.</p>
  79. </div>
  80. </div>
  81. <div class="member">
  82. <h3 class="name" id="normalNode" translate="no">.<a href="#normalNode">normalNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  83. <div class="description">
  84. <p>The texture that represents the beauty's normals.</p>
  85. </div>
  86. </div>
  87. <div class="member">
  88. <h3 class="name" id="pixelSize" translate="no">.<a href="#pixelSize">pixelSize</a><span class="type-signature"> : <a href="Node.html">Node</a>.&lt;float></span> </h3>
  89. <div class="description">
  90. <p>The pixel size.</p>
  91. </div>
  92. </div>
  93. <div class="member">
  94. <h3 class="name" id="textureNode" translate="no">.<a href="#textureNode">textureNode</a><span class="type-signature"> : <a href="TextureNode.html">TextureNode</a></span> </h3>
  95. <div class="description">
  96. <p>The texture node that represents the beauty pass.</p>
  97. </div>
  98. </div>
  99. <div class="member">
  100. <h3 class="name" id="updateBeforeType" translate="no">.<a href="#updateBeforeType">updateBeforeType</a><span class="type-signature"> : string</span> </h3>
  101. <div class="description">
  102. <p>The <code>updateBeforeType</code> is set to <code>NodeUpdateType.FRAME</code> since the node updates
  103. its internal uniforms once per frame in <code>updateBefore()</code>.<br/>Default is <code>'frame'</code>.</p>
  104. </div>
  105. <dl class="details">
  106. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBeforeType">TempNode#updateBeforeType</a></dt>
  107. </dl>
  108. </div>
  109. <h2 class="subsection-title">Methods</h2>
  110. <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>
  111. <div class="method">
  112. <div class="description">
  113. <p>This method is used to setup the effect's TSL code.</p>
  114. </div>
  115. <table class="params">
  116. <tbody>
  117. <tr>
  118. <td class="name"><code>builder</code></td>
  119. <td class="description last"><p>The current node builder.</p></td>
  120. </tr>
  121. </tbody>
  122. </table>
  123. <dl class="details">
  124. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#setup">TempNode#setup</a></dt>
  125. </dl>
  126. <dl class="details">
  127. <dt class="tag-returns"><strong>Returns:</strong> </dt>
  128. </dl>
  129. </div>
  130. <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>
  131. <div class="method">
  132. <div class="description">
  133. <p>This method is used to update uniforms once per frame.</p>
  134. </div>
  135. <table class="params">
  136. <tbody>
  137. <tr>
  138. <td class="name"><code>frame</code></td>
  139. <td class="description last"><p>The current node frame.</p></td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. <dl class="details">
  144. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="TempNode.html#updateBefore">TempNode#updateBefore</a></dt>
  145. </dl>
  146. </div>
  147. <h2 class="subsection-title">Source</h2>
  148. <p>
  149. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/PixelationPassNode.js" target="_blank" rel="noopener" translate="no">examples/jsm/tsl/display/PixelationPassNode.js</a>
  150. </p>
  151. </article>
  152. </section>
  153. <script src="../scripts/linenumber.js"></script>
  154. <script src="../scripts/page.js"></script>
  155. </body>
  156. </html>
粤ICP备19079148号