예제 #1
0
 public void Init(int passId, Matrix viewProjMatrix, MyViewport viewport, MyGBuffer gbuffer)
 {
     m_viewProjMatrix = viewProjMatrix;
     m_viewport       = viewport;
     m_gbuffer        = gbuffer;
     Init(passId, "GBuffer", MyFrustumEnum.MainFrustum, MyPassIdResolver.GetGBufferPassIdx(PassId));
 }
예제 #2
0
 int GetPassId(VRageRender.MyDepthPass oldDepthPass)
 {
     if (oldDepthPass.IsCascade)
     {
         return(MyPassIdResolver.GetCascadeDepthPassId(oldDepthPass.FrustumIndex));
     }
     else
     {
         return(MyPassIdResolver.GetSingleDepthPassId(oldDepthPass.FrustumIndex));
     }
 }
예제 #3
0
        public void Init(int passId, Matrix viewProjMatrix, MyViewport viewport, IDsvBindable dsv, bool isCascade, string debugName)
        {
            m_viewProjMatrix = viewProjMatrix;
            m_viewport       = viewport;
            m_dsv            = dsv;
            m_isCascade      = isCascade;

            if (isCascade)
            {
                Init(passId, debugName, MyFrustumEnum.ShadowCascade, MyPassIdResolver.GetCascadeDepthPassIdx(passId));
            }
            else
            {
                Init(passId, debugName, MyFrustumEnum.ShadowProjection, MyPassIdResolver.GetSingleDepthPassIdx(passId));
            }
        }