render method

dynamic render(
  1. dynamic renderer
)

Implementation

render(renderer) {
  if (enabled) {
    print("shadowmap view render   ");

    //Because a light's .shadowMap is only initialised after the first render pass
    //we have to make sure the correct map is sent into the shader, otherwise we
    //always end up with the scene's first added shadow casting light's shadowMap
    //in the shader
    //See: https://github.com/mrdoob/three.js/issues/5932
    uniforms["tDiffuse"]["value"] = light.shadow!.map!.texture;

    userAutoClearSetting = renderer.autoClear;
    renderer.autoClear = false; // To allow render overlay
    renderer.clearDepth();
    renderer.render(scene, camera);
    renderer.autoClear = userAutoClearSetting; //Restore user's setting

  }
}