| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>RenderPass - Three.js Docs</title>
- <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
- <script src="../scripts/highlight.min.js"></script>
- <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
- <link type="text/css" rel="stylesheet" href="../styles/page.css">
- </head>
- <body>
- <p class="inheritance" translate="no"><a href="Pass.html">Pass</a> → </p>
- <h1 translate="no">RenderPass</h1>
- <section>
- <header>
- <div class="class-description"><p>This class represents a render pass. It takes a camera and a scene and produces
- a beauty pass for subsequent post processing effects.</p></div>
- <h2>Code Example</h2>
- <div translate="no"><pre><code class="language-js">const renderPass = new RenderPass( scene, camera );
- composer.addPass( renderPass );
- </code></pre></div>
- </header>
- <article>
- <h2 class="subsection-title">Import</h2>
- <p><span translate="no">RenderPass</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>
- <pre><code class="language-js">import { RenderPass } from 'three/addons/postprocessing/RenderPass.js';</code></pre>
- <div class="container-overview">
- <h2>Constructor</h2>
- <h3 class="name name-method" id="RenderPass" translate="no">new <a href="#RenderPass">RenderPass</a><span class="signature">( scene : <span class="param-type"><a href="Scene.html">Scene</a></span>, camera : <span class="param-type"><a href="Camera.html">Camera</a></span>, overrideMaterial : <span class="param-type"><a href="Material.html">Material</a></span>, clearColor : <span class="param-type">number | <a href="Color.html">Color</a> | string</span>, clearAlpha : <span class="param-type">number</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Constructs a new render pass.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>scene</strong>
- </td>
- <td class="description last">
- <p>The scene to render.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>camera</strong>
- </td>
- <td class="description last">
- <p>The camera.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>overrideMaterial</strong>
- </td>
- <td class="description last">
- <p>The override material. If set, this material is used
- for all objects in the scene.</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>clearColor</strong>
- </td>
- <td class="description last">
- <p>The clear color of the render pass.</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>clearAlpha</strong>
- </td>
- <td class="description last">
- <p>The clear alpha of the render pass.</p>
- <p>Default is <code>null</code>.</p>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <h2 class="subsection-title">Properties</h2>
- <div class="member">
- <h3 class="name" id="camera" translate="no">.<a href="#camera">camera</a><span class="type-signature"> : <a href="Camera.html">Camera</a></span> </h3>
- <div class="description">
- <p>The camera.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="clear" translate="no">.<a href="#clear">clear</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Overwritten to perform a clear operation by default.</p>
- <p>Default is <code>true</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#clear">Pass#clear</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="clearAlpha" translate="no">.<a href="#clearAlpha">clearAlpha</a><span class="type-signature"> : number</span> </h3>
- <div class="description">
- <p>The clear alpha of the render pass.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="clearColor" translate="no">.<a href="#clearColor">clearColor</a><span class="type-signature"> : number | <a href="Color.html">Color</a> | string</span> </h3>
- <div class="description">
- <p>The clear color of the render pass.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="clearDepth" translate="no">.<a href="#clearDepth">clearDepth</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>If set to <code>true</code>, only the depth can be cleared when <code>clear</code> is to <code>false</code>.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="needsSwap" translate="no">.<a href="#needsSwap">needsSwap</a><span class="type-signature"> : boolean</span> </h3>
- <div class="description">
- <p>Overwritten to disable the swap.</p>
- <p>Default is <code>false</code>.</p>
- </div>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#needsSwap">Pass#needsSwap</a></dt>
- </dl>
- </div>
- <div class="member">
- <h3 class="name" id="overrideMaterial" translate="no">.<a href="#overrideMaterial">overrideMaterial</a><span class="type-signature"> : <a href="Material.html">Material</a></span> </h3>
- <div class="description">
- <p>The override material. If set, this material is used
- for all objects in the scene.</p>
- <p>Default is <code>null</code>.</p>
- </div>
- </div>
- <div class="member">
- <h3 class="name" id="scene" translate="no">.<a href="#scene">scene</a><span class="type-signature"> : <a href="Scene.html">Scene</a></span> </h3>
- <div class="description">
- <p>The scene to render.</p>
- </div>
- </div>
- <h2 class="subsection-title">Methods</h2>
- <h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span>, writeBuffer : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span>, readBuffer : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span>, deltaTime : <span class="param-type">number</span>, maskActive : <span class="param-type">boolean</span> )</span> </h3>
- <div class="method">
- <div class="description">
- <p>Performs a beauty pass with the configured scene and camera.</p>
- </div>
- <table class="params">
- <tbody>
- <tr>
- <td class="name">
- <strong>renderer</strong>
- </td>
- <td class="description last">
- <p>The renderer.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>writeBuffer</strong>
- </td>
- <td class="description last">
- <p>The write buffer. This buffer is intended as the rendering
- destination for the pass.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>readBuffer</strong>
- </td>
- <td class="description last">
- <p>The read buffer. The pass can access the result from the
- previous pass from this buffer.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>deltaTime</strong>
- </td>
- <td class="description last">
- <p>The delta time in seconds.</p>
- </td>
- </tr>
- <tr>
- <td class="name">
- <strong>maskActive</strong>
- </td>
- <td class="description last">
- <p>Whether masking is active or not.</p>
- </td>
- </tr>
- </tbody>
- </table>
- <dl class="details">
- <dt class="tag-overrides"><strong>Overrides:</strong> <a href="Pass.html#render">Pass#render</a></dt>
- </dl>
- </div>
- <h2 class="subsection-title">Source</h2>
- <p>
- <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/RenderPass.js" translate="no" target="_blank" rel="noopener">examples/jsm/postprocessing/RenderPass.js</a>
- </p>
- </article>
- </section>
- <script src="../scripts/linenumber.js"></script>
- <script src="../scripts/page.js"></script>
- </body>
- </html>
|