/// <summary> /// Crea un`istanza del MasterRenderer /// </summary> /// <param name="camera">La camper usata nella scena</param> /// <param name="width">Larghezza in pixel della finestra</param> /// <param name="height">Altezza in pixel della finestra</param> public ShadowMapMasterRenderer(Camera camera, int width, int height) { shader = new ShadowShader(); shadowBox = new ShadowBox(lightViewMatrix, camera, width, height); shadowFbo = new ShadowFrameBuffer(SHADOW_MAP_SIZE, SHADOW_MAP_SIZE); entityRenderer = new ShadowMapEntityRenderer(shader, projectionViewMatrix); }
/// <summary> /// /// </summary> /// <param name="shader">Shader usato per il rendering</param> /// <param name="projectionViewMatrix">La projection matrix moltiplicata per la view matrix della luce</param> public ShadowMapEntityRenderer(ShadowShader shader, Matrix4 projectionViewMatrix) { this.shader = shader; this.projectionViewMatrix = projectionViewMatrix; }