DepthTexture.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. <p 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. </p>
  17. <h2>Example</h2>
  18. [example:webgl_depth_texture depth / texture]
  19. <h2>Constructor</h2>
  20. <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>
  21. <p>
  22. [page:Number width] -- width of the texture.<br />
  23. [page:Number height] -- height of the texture.<br />
  24. [page:Constant type] -- Default is [page:Textures THREE.UnsignedShortType].
  25. See [page:Textures type constants] for other choices.<br />
  26. [page:Constant mapping] --
  27. See [page:Textures type constants] for details.<br />
  28. [page:Constant wrapS] -- The default is [page:Textures THREE.ClampToEdgeWrapping].
  29. See [page:Textures wrap mode constants] for other choices.<br />
  30. [page:Constant wrapT] -- The default is [page:Textures THREE.ClampToEdgeWrapping].
  31. See [page:Textures wrap mode constants] for other choices.<br />
  32. [page:Constant magFilter] -- How the texture is sampled when a texel covers more than one pixel.
  33. The default is [page:Textures THREE.NearestFilter]. See [page:Textures magnification filter constants] for other choices.<br />
  34. [page:Constant minFilter] -- How the texture is sampled when a texel covers less than one pixel.
  35. The default is [page:Textures THREE.NearestFilter]. See [page:Textures minification filter constants] for other choices.<br />
  36. [page:Number anisotropy] -- The number of samples taken along the axis through the pixel that has the highest density of texels.
  37. 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.
  38. 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 />
  39. [page:Constant format] -- must be either [page:Textures DepthFormat] (default) or [page:Textures DepthStencilFormat].
  40. See [page:Textures format constants] for details.<br />
  41. </p>
  42. <h2>Properties</h2>
  43. <p>
  44. See the base [page:Texture Texture] class for common properties
  45. - the following are also part of the texture class, but have different defaults here.
  46. </p>
  47. <h3>[page:Texture.format .format]</h3>
  48. <p>
  49. Either [page:Textures DepthFormat] (default) or [page:Textures DepthStencilFormat].
  50. See [page:Textures format constants] for details.<br />
  51. </p>
  52. <h3>[page:Texture.type .type]</h3>
  53. <p>
  54. Default is [page:Textures THREE.UnsignedShortType].
  55. See [page:Textures format constants] for details.<br />
  56. </p>
  57. <h3>[page:Texture.magFilter .magFilter]</h3>
  58. <p>
  59. How the texture is sampled when a texel covers more than one pixel.
  60. The default is [page:Textures THREE.NearestFilter].
  61. See [page:Textures magnification filter constants] for other choices.
  62. </p>
  63. <h3>[page:Texture.minFilter .minFilter]</h3>
  64. <p>
  65. How the texture is sampled when a texel covers less than one pixel.
  66. The default is [page:Textures THREE.NearestFilter].
  67. See [page:Textures magnification filter constants] for other choices.
  68. </p>
  69. <h3>[page:Texture.flipY .flipY]</h3>
  70. <p>
  71. Depth textures do not need to be flipped so this is *false* by default.
  72. </p>
  73. <h3>[page:Texture.generateMipmaps .generateMipmaps]</h3>
  74. <p>
  75. Depth textures do not use mipmaps.
  76. </p>
  77. <h2>Methods</h2>
  78. <p>
  79. See the base [page:Texture Texture] class for common methods.
  80. </p>
  81. <h2>Source</h2>
  82. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  83. </body>
  84. </html>