internal void PrepareShadow() { ShadowDepth.Prepare(Device.ImmediateContext); Device.ImmediateContext.OutputMerger.SetRenderTargets(ShadowDepth.DepthStencilView, (RenderTargetView)null); ShadowShader.Prepare(); ActiveShader = ShadowShader; }
internal RenderTargetView PrepareCamera(RawColor4 Background) { CameraDepth.Prepare(Device.ImmediateContext); var TargetView = new RenderTargetView(Device, AntiAliasedBackBuffer); Device.ImmediateContext.OutputMerger.SetRenderTargets(CameraDepth.DepthStencilView, TargetView); Device.ImmediateContext.ClearRenderTargetView(TargetView, Background); CameraShader.VertexLight.LightVP = ShadowShader.LightVP; CameraShader.Prepare(); ActiveShader = CameraShader; return(TargetView); }