Beispiel #1
0
        public DBufferRenderPass(Material dBufferClear, DBufferSettings settings, DecalDrawDBufferSystem drawSystem)
        {
            renderPassEvent = RenderPassEvent.AfterRenderingPrePasses + 1;
            ConfigureInput(ScriptableRenderPassInput.Normal); // Require depth

            m_DrawSystem        = drawSystem;
            m_Settings          = settings;
            m_DBufferClear      = dBufferClear;
            m_ProfilingSampler  = new ProfilingSampler("DBuffer Render");
            m_FilteringSettings = new FilteringSettings(RenderQueueRange.opaque, -1);

            m_ShaderTagIdList = new List <ShaderTagId>();
            m_ShaderTagIdList.Add(new ShaderTagId(DecalShaderPassNames.DBufferMesh));

            int dBufferCount = (int)settings.surfaceData + 1;

            dBufferColorIndentifiers = new RenderTargetIdentifier[dBufferCount];
            for (int dbufferIndex = 0; dbufferIndex < dBufferCount; ++dbufferIndex)
            {
                dBufferColorIndentifiers[dbufferIndex] = new RenderTargetIdentifier(s_DBufferNames[dbufferIndex]);
            }
            m_DBufferCount = dBufferCount;

            dBufferDepthIndentifier          = new RenderTargetIdentifier(s_DBufferDepthName);
            cameraDepthTextureIndentifier    = new RenderTargetIdentifier("_CameraDepthTexture");
            cameraDepthAttachmentIndentifier = new RenderTargetIdentifier("_CameraDepthAttachment");
        }
Beispiel #2
0
        public DBufferRenderPass(Material dBufferClear, DBufferSettings settings, DecalDrawDBufferSystem drawSystem)
        {
            renderPassEvent = RenderPassEvent.AfterRenderingPrePasses + 1;
            ConfigureInput(ScriptableRenderPassInput.Normal); // Require depth

            m_DrawSystem        = drawSystem;
            m_Settings          = settings;
            m_DBufferClear      = dBufferClear;
            m_ProfilingSampler  = new ProfilingSampler("DBuffer Render");
            m_FilteringSettings = new FilteringSettings(RenderQueueRange.opaque, -1);

            m_ShaderTagIdList = new List <ShaderTagId>();
            m_ShaderTagIdList.Add(new ShaderTagId(DecalShaderPassNames.DBufferMesh));

            int dBufferCount = (int)settings.surfaceData + 1;

            dBufferColorHandles = new RTHandle[dBufferCount];
            m_DBufferCount      = dBufferCount;
        }