private void Prepare(Vector3 lightDirection, ShadowBox box) { updateOrthoProjectionMatrix(box.GetWidth(), box.GetHeight(), box.GetLength()); updateLightViewMatrix(lightDirection, box.GetCenter()); projectionViewMatrix = lightViewMatrix * projectionMatrix; ShadowFrameBuffer.Bind(); GL.Enable(EnableCap.DepthTest); GL.Clear(ClearBufferMask.DepthBufferBit); }
public ShadowMainRenderer(Camera camera) { shadowBox = new ShadowBox(lightViewMatrix, camera); ShadowFrameBuffer = new ShadowFrameBuffer(camera.Width, camera.Height); }