title: ThreeJS: How to render scene to texture and temporarily override materials?
body: <p><strong>Base:</strong>
  I have a scene with normal objects. They cast and receive shadows. The ground is an instance of the THREE.Plane. </p>
  
  <p><strong>Goal:</strong> 
  I would like to get information about shadows by rendering the scene to texture (rtt) and then reading the information back to the js.</p>
  
  <p><strong>Idea:</strong> 
  I am going to render my scene with orthogonal camera looking from top at the scene. Camera near property will be set to render only the part of the object, that touches the ground (I have ensured each object have double sided material). Ground will be rendered with white material color and all other objects with black color. Material should can cast the shadows and ground should be able to receive them. </p>
  
  <p><strong>Problem:</strong></p>
  
  <ol>
  <li><p>How to render my current scene (I don't want to copy it each time I need to get information about shadows) using temporarily different materials for objects? </p>
  
  <pre><code>renderer.render(scene, cameraRTT, rtTexture, true);
  </code></pre></li>
  <li>How to define such materials?</li>
  </ol>