DepthTexture.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Texture] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">
  14. Creates a texture for use as a Depth Texture. Require support for the
  15. [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/ WEBGL_depth_texture] extension.
  16. <br /><br />
  17. </div>
  18. <h2>Example</h2>
  19. [example:webgl_depth_texture depth / texture]
  20. <h2>Constructor</h2>
  21. <h3>[name]( [param:Number width], [param:Number height], [param:Constant type], [param:Constant wrapS], [param:Constant wrapT], [param:Constant magFilter], [param:Constant minFilter], [param:Number anisotropy], [param:Constant format] )</h3>
  22. <div>
  23. [page:Number width] -- width of the texture.<br />
  24. [page:Number height] -- height of the texture.<br />
  25. [page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType].
  26. See [page:Textures type constants] for other choices.<br />
  27. [page:Constant mapping] --
  28. See [page:Textures type constants] for details.<br />
  29. [page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping].
  30. See [page:Textures wrap mode constants] for other choices.<br />
  31. [page:Constant wrapT] -- The default is [page:Textures THREE.ClampToEdgeWrapping].
  32. See [page:Textures wrap mode constants] for other choices.<br />
  33. [page:Constant magFilter] -- How the texture is sampled when a texel covers more than one pixel.
  34. The default is [page:Textures THREE.NearestFilter]. See [page:Textures magnification filter constants] for other choices.<br />
  35. [page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel.
  36. The default is [page:Textures THREE.NearestFilter]. See [page:Textures minification filter constants] for other choices.<br />
  37. [page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels.
  38. By default, this value is 1. A higher value gives a less blurry result than a basic mipmap, at the cost of more texture samples being used.
  39. Use [page:WebGLrenderer.getMaxAnisotropy renderer.getMaxAnisotropy]() to find the maximum valid anisotropy value for the GPU; this value is usually a power of 2.<br />
  40. [page:Constant format] -- must be either [page:Textures DepthFormat] (default) or [page:Textures DepthStencilFormat].
  41. See [page:Textures format constants] for details.<br />
  42. </div>
  43. <h2>Properties</h2>
  44. <div>
  45. See the base [page:Texture Texture] class for common properties
  46. - the following are also part of the texture class, but have different defaults here.
  47. </div>
  48. <h3>[page:Texture.format .format]</h3>
  49. <div>
  50. Either [page:Textures DepthFormat] (default) or [page:Textures DepthStencilFormat].
  51. See [page:Textures format constants] for details.<br />
  52. </div>
  53. <h3>[page:Texture.type .type]</h3>
  54. <div>
  55. Default is [page:Textures THREE.UnsignedShortType].
  56. See [page:Textures format constants] for details.<br />
  57. </div>
  58. <h3>[page:Texture.magFilter .magFilter]</h3>
  59. <div>
  60. How the texture is sampled when a texel covers more than one pixel.
  61. The default is [page:Textures THREE.NearestFilter].
  62. See [page:Textures magnification filter constants] for other choices.
  63. </div>
  64. <h3>[page:Texture.minFilter .minFilter]</h3>
  65. <div>
  66. How the texture is sampled when a texel covers less than one pixel.
  67. The default is [page:Textures THREE.NearestFilter].
  68. See [page:Textures magnification filter constants] for other choices.
  69. </div>
  70. <h3>[page:Texture.flipY .flipY]</h3>
  71. <div>
  72. Depth textures do not need to be flipped so this is *false* by default.
  73. </div>
  74. <h3>[page:Texture.generateMipmaps .generateMipmaps]</h3>
  75. <div>
  76. Depth textures do not use mipmaps.
  77. </div>
  78. <h2>Methods</h2>
  79. <div>
  80. See the base [page:Texture Texture] class for common methods.
  81. </div>
  82. <h2>Source</h2>
  83. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  84. </body>
  85. </html>