Exemple #1
0
        internal void PrepareShadow()
        {
            ShadowDepth.Prepare(Device.ImmediateContext);
            Device.ImmediateContext.OutputMerger.SetRenderTargets(ShadowDepth.DepthStencilView, (RenderTargetView)null);

            ShadowShader.Prepare();
            ActiveShader = ShadowShader;
        }
Exemple #2
0
        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);
        }