123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>Shadowing Type Constants</h1>
- <p>These define the shadow map types used by the WebGLRenderer.</p>
- <h2>Shadow Map Types</h2>
- <code>
- THREE.BasicShadowMap
- </code>
- <p>Unfiltered shadow maps - fastest, but lowest quality.</p>
- <code>
- THREE.PCFShadowMap
- </code>
- <p>Shadow maps filtered using the Percentage-Closer Filtering (PCF) algorithm (default).</p>
- <code>
- THREE.PCFSoftShadowMap
- </code>
- <p>Shadow maps filtered using the Percentage-Closer Soft Shadows (PCSS) algorithm.</p>
- <h2>Usage</h2>
- <code>
- var renderer = new THREE.WebGLRenderer();
- renderer.shadowMap.enabled = true;
- renderer.shadowMap.type = THREE.PCFShadowMap; //default
- </code>
- Note that this just enables shadows in the renderer and sets the shadow map type. <br />
- To actually cast shadows you will have to set up shadows for the any light you want to cast shadows, and for meshes you want to cast / receive shadows. <br />
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/constants.js src/constants.js]
- </body>
- </html>
|