WebGLMultipleRenderTargets.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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
  14. textures. This approach is useful for advanced rendering techniques like
  15. post-processing or deferred rendering. Heads up: [name] can only be used
  16. with a WebGL 2 rendering context.
  17. </p>
  18. <h2>Examples</h2>
  19. <p>
  20. [example:webgl2_multiple_rendertargets webgl2 / multiple / rendertargets ]
  21. </p>
  22. <h2>Constructor</h2>
  23. <h3>
  24. [name]([param:Number width], [param:Number height], [param:Number count],
  25. [param:Object options])
  26. </h3>
  27. <p>
  28. [page:Number width] - The width of the render target. Default is `1`.<br />
  29. [page:Number height] - The height of the render target. Default is `1`.<br />
  30. [page:Number count] - The number of render targets. Default is `1`.<br />
  31. options - (optional object that holds texture parameters for an
  32. auto-generated target texture and depthBuffer/stencilBuffer booleans. For
  33. an explanation of the texture parameters see [page:Texture Texture]. For a
  34. list of valid options, see [page:WebGLRenderTarget WebGLRenderTarget]).<br /><br />
  35. </p>
  36. <h2>Properties</h2>
  37. <h3>[property:Boolean isWebGLMultipleRenderTargets]</h3>
  38. <p>Read-only flag to check if a given object is of type [name].</p>
  39. <h3>[property:Array texture]</h3>
  40. <p>
  41. The texture property is overwritten in [name] and replaced with an array.
  42. This array holds the [page:WebGLRenderTarget.texture texture] references
  43. of the respective render targets.
  44. </p>
  45. <p>
  46. [page:WebGLRenderTarget WebGLRenderTarget] properties are available on
  47. this class.
  48. </p>
  49. <h2>Methods</h2>
  50. <p>
  51. [page:WebGLRenderTarget WebGLRenderTarget] methods are available on this
  52. class.
  53. </p>
  54. <h2>Source</h2>
  55. <p>
  56. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  57. </p>
  58. </body>
  59. </html>