Пример #1
0
        public void SetupShadowBaseEffect(MyEffectShadowBase effect)
        {
            effect.SetLightViewProjMatrices(m_lightViewProjectionMatrices);
            effect.SetClipPlanes(m_lightClipPlanes);

            effect.SetShadowMapSize(new Vector4(ShadowMapCascadeSize * NumSplits, ShadowMapCascadeSize, m_shadowMapCascadeSizeInv.X, m_shadowMapCascadeSizeInv.Y));
            effect.SetShadowMap(MyRender.GetRenderTarget(m_shadowRenderTarget));
        }
Пример #2
0
        public void SetupShadowBaseEffect(MyEffectShadowBase effect)
        {
            //Matrix cameraTransform = Matrix.Invert(MyCamera.ViewMatrix);
            //effect.SetInvViewMatrix(cameraTransform);

            effect.SetLightViewProjMatrices(m_lightViewProjectionMatrices);
            effect.SetClipPlanes(m_lightClipPlanes);

            effect.SetShadowMapSize(new Vector4(ShadowMapCascadeSize * NumSplits, ShadowMapCascadeSize, m_shadowMapCascadeSizeInv.X, m_shadowMapCascadeSizeInv.Y));
            effect.SetShadowMap(MyRender.GetRenderTarget(m_shadowRenderTarget));
        }