Graphics Reference
In-Depth Information
floor.material.lightMap =
THREE.ImageUtils.loadTexture("../assets/
textures/shadow-map-soft.png");
3. Finally, you add the other textures you might want to use:
floor.material.map =
THREE.ImageUtils.loadTexture ("../assets/
textures/tiles.jpg");
That's all you need to do. This works great, especially when you've got scenes with
static meshes and fixed lights, and this is a great boost to performance.
See also
• If you require dynamic shadows that update based on animated lighting or
objects in the scene, you need something else (or in addition to) than shad-
ow maps. In Chapter 5 , Lights and Custom Shaders in the Creating shadows
with Three.SpotLight recipe, we explain how to create dynamic shadows.
Search WWH ::




Custom Search