WebGLMultipleRenderTargets.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:WebGLRenderTarget] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. A special render target that enables a fragment shader to write to several textures.
  14. This approach is useful for advanced rendering techniques like post-processing or deferred rendering.
  15. Heads up: [name] can only be used with a WebGL 2 rendering context.
  16. </p>
  17. <h2>Examples</h2>
  18. <p>
  19. [example:webgl2_multiple_rendertargets webgl2 / multiple / rendertargets ]
  20. </p>
  21. <h2>Constructor</h2>
  22. <h3>[name]([param:Number width], [param:Number height], [param:Number count], [param:Object options])</h3>
  23. <p>
  24. [page:Number width] - The width of the render target. <br />
  25. [page:Number height] - The height of the render target.<br />
  26. [page:Number count] - The number of render targets.<br />
  27. options - (optional object that holds texture parameters for an auto-generated target
  28. texture and depthBuffer/stencilBuffer booleans.
  29. For an explanation of the texture parameters see [page:Texture Texture].
  30. For a list of valid options, see [page:WebGLRenderTarget WebGLRenderTarget].<br /><br />
  31. </p>
  32. <h2>Properties</h2>
  33. <h3>[property:Array texture]</h3>
  34. <p>
  35. The texture property is overwritten in [name] and replaced with an array. This array holds the [page:WebGLRenderTarget.texture texture]
  36. references of the respective render targets.
  37. </p>
  38. <p>[page:WebGLRenderTarget WebGLRenderTarget] properties are available on this class.</p>
  39. <h2>Methods</h2>
  40. <p>[page:WebGLRenderTarget WebGLRenderTarget] methods are available on this class.</p>
  41. <h2>Source</h2>
  42. <p>
  43. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  44. </p>
  45. </body>
  46. </html>