RetroPassNode.html 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>RetroPassNode - 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> → <a href="PassNode.html">PassNode</a> → </p>
  13. <h1 translate="no">RetroPassNode</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>A post-processing pass that applies a retro PS1-style effect to the scene.</p>
  17. <p>This node renders the scene with classic PlayStation 1 visual characteristics:</p>
  18. <ul>
  19. <li><strong>Vertex snapping</strong>: Vertices are snapped to screen pixels, creating the iconic &quot;wobbly&quot; geometry</li>
  20. <li><strong>Affine texture mapping</strong>: Textures are sampled without perspective correction, resulting in distortion effects</li>
  21. <li><strong>Low resolution</strong>: Default 0.25 scale (typical 320x240 equivalent)</li>
  22. <li><strong>Nearest-neighbor filtering</strong>: Sharp pixelated textures without smoothing</li>
  23. </ul></div>
  24. </header>
  25. <article>
  26. <div class="container-overview">
  27. <h2>Constructor</h2>
  28. <h3 class="name name-method" id="RetroPassNode" translate="no">new <a href="#RetroPassNode">RetroPassNode</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>, options : <span class="param-type">Object</span> )</span> </h3>
  29. <div class="method">
  30. <div class="description">
  31. <p>Creates a new RetroPassNode instance.</p>
  32. </div>
  33. <table class="params">
  34. <tbody>
  35. <tr>
  36. <td class="name">
  37. <strong translate="no">scene</strong>
  38. </td>
  39. <td class="description last">
  40. <p>The scene to render.</p>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td class="name">
  45. <strong translate="no">camera</strong>
  46. </td>
  47. <td class="description last">
  48. <p>The camera to render from.</p>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="name">
  53. <strong translate="no">options</strong>
  54. </td>
  55. <td class="description last">
  56. <p>Additional options for the retro pass.</p>
  57. <p>Default is <code>{}</code>.</p>
  58. <table class="params">
  59. <tbody>
  60. <tr>
  61. <td class="name">
  62. <strong translate="no">affineDistortion</strong>
  63. </td>
  64. <td class="description last">
  65. <p>An optional node to apply affine distortion to UVs.</p>
  66. <p>Default is <code>null</code>.</p>
  67. </td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. </td>
  72. </tr>
  73. </tbody>
  74. </table>
  75. </div>
  76. </div>
  77. <h2 class="subsection-title">Source</h2>
  78. <p>
  79. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/tsl/display/RetroPassNode.js" translate="no" target="_blank" rel="noopener">examples/jsm/tsl/display/RetroPassNode.js</a>
  80. </p>
  81. </article>
  82. </section>
  83. <script src="../scripts/linenumber.js"></script>
  84. <script src="../scripts/page.js"></script>
  85. </body>
  86. </html>
粤ICP备19079148号