RenderOutputNode.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>RenderOutputNode - 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">RenderOutputNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Normally, tone mapping and color conversion happens automatically just
  17. before outputting a pixel to the default (screen) framebuffer. In certain
  18. post processing setups this is too late because some effects such as FXAA
  19. require e.g. sRGB input. For such scenarios, <code>RenderOutputNode</code> can be used
  20. to apply tone mapping and color space conversion at an arbitrary point
  21. in the effect chain.</p>
  22. <p>When applying tone mapping and color space conversion manually with this node,
  23. you have to set <a href="RenderPipeline.html#outputColorTransform">RenderPipeline#outputColorTransform</a> to <code>false</code>.</p></div>
  24. <h2>Code Example</h2>
  25. <div translate="no"><pre><code class="language-js">const postProcessing = new RenderPipeline( renderer );
  26. postProcessing.outputColorTransform = false;
  27. const scenePass = pass( scene, camera );
  28. const outputPass = renderOutput( scenePass );
  29. postProcessing.outputNode = outputPass;
  30. </code></pre></div>
  31. </header>
  32. <article>
  33. <div class="container-overview">
  34. <h2>Constructor</h2>
  35. <h3 class="name name-method" id="RenderOutputNode" translate="no">new <a href="#RenderOutputNode">RenderOutputNode</a><span class="signature">( colorNode : <span class="param-type"><a href="Node.html">Node</a></span>, toneMapping : <span class="param-type">number</span>, outputColorSpace : <span class="param-type">string</span> )</span> </h3>
  36. <div class="method">
  37. <div class="description">
  38. <p>Constructs a new render output node.</p>
  39. </div>
  40. <table class="params">
  41. <tbody>
  42. <tr>
  43. <td class="name">
  44. <strong translate="no">colorNode</strong>
  45. </td>
  46. <td class="description last">
  47. <p>The color node to process.</p>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td class="name">
  52. <strong translate="no">toneMapping</strong>
  53. </td>
  54. <td class="description last">
  55. <p>The tone mapping type.</p>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td class="name">
  60. <strong translate="no">outputColorSpace</strong>
  61. </td>
  62. <td class="description last">
  63. <p>The output color space.</p>
  64. </td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. </div>
  69. </div>
  70. <h2 class="subsection-title">Properties</h2>
  71. <div class="member">
  72. <h3 class="name" id="colorNode" translate="no">.<a href="#colorNode">colorNode</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
  73. <div class="description">
  74. <p>The color node to process.</p>
  75. </div>
  76. </div>
  77. <div class="member">
  78. <h3 class="name" id="isRenderOutputNode" translate="no">.<a href="#isRenderOutputNode">isRenderOutputNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
  79. <div class="description">
  80. <p>This flag can be used for type testing.</p>
  81. <p>Default is <code>true</code>.</p>
  82. </div>
  83. </div>
  84. <div class="member">
  85. <h3 class="name" id="outputColorSpace" translate="no">.<a href="#outputColorSpace">outputColorSpace</a><span class="type-signature"> : string</span> </h3>
  86. <div class="description">
  87. <p>The output color space.</p>
  88. </div>
  89. </div>
  90. <h2 class="subsection-title">Methods</h2>
  91. <h3 class="name name-method" id="getToneMapping" translate="no">.<a href="#getToneMapping">getToneMapping</a><span class="signature">()</span><span class="type-signature"> : number</span> </h3>
  92. <div class="method">
  93. <div class="description">
  94. <p>Gets the tone mapping type.</p>
  95. </div>
  96. <dl class="details">
  97. <dt class="tag-returns"><strong>Returns:</strong> The tone mapping type.</dt>
  98. </dl>
  99. </div>
  100. <h3 class="name name-method" id="setToneMapping" translate="no">.<a href="#setToneMapping">setToneMapping</a><span class="signature">( value : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="ToneMappingNode.html">ToneMappingNode</a></span> </h3>
  101. <div class="method">
  102. <div class="description">
  103. <p>Sets the tone mapping type.</p>
  104. </div>
  105. <table class="params">
  106. <tbody>
  107. <tr>
  108. <td class="name">
  109. <strong translate="no">value</strong>
  110. </td>
  111. <td class="description last">
  112. <p>The tone mapping type.</p>
  113. </td>
  114. </tr>
  115. </tbody>
  116. </table>
  117. <dl class="details">
  118. <dt class="tag-returns"><strong>Returns:</strong> A reference to this node.</dt>
  119. </dl>
  120. </div>
  121. <h2 class="subsection-title">Source</h2>
  122. <p>
  123. <a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/display/RenderOutputNode.js" translate="no" target="_blank" rel="noopener">src/nodes/display/RenderOutputNode.js</a>
  124. </p>
  125. </article>
  126. </section>
  127. <script src="../scripts/linenumber.js"></script>
  128. <script src="../scripts/page.js"></script>
  129. </body>
  130. </html>
粤ICP备19079148号