WebGLMultipleRenderTargets.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. Default is `1`.<br />
  25. [page:Number height] - The height of the render target. Default is `1`.<br />
  26. [page:Number count] - The number of render targets. Default is `1`.<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:Boolean isWebGLMultipleRenderTargets]</h3>
  34. <p>
  35. Read-only flag to check if a given object is of type [name].
  36. </p>
  37. <h3>[property:Array texture]</h3>
  38. <p>
  39. The texture property is overwritten in [name] and replaced with an array. This array holds the [page:WebGLRenderTarget.texture texture]
  40. references of the respective render targets.
  41. </p>
  42. <p>[page:WebGLRenderTarget WebGLRenderTarget] properties are available on this class.</p>
  43. <h2>Methods</h2>
  44. <p>[page:WebGLRenderTarget WebGLRenderTarget] methods are available on this class.</p>
  45. <h2>Source</h2>
  46. <p>
  47. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  48. </p>
  49. </body>
  50. </html>