예제 #1
0
        protected override void Init(PipelineResources resources)
        {
            aoEvents          = RenderPipeline.GetEvent <AOEvents>(renderingPath);
            probeBuffer       = new ComputeBuffer(maximumProbe, sizeof(ReflectionData));
            lightingEvents    = RenderPipeline.GetEvent <LightingEvent>(renderingPath);
            reflectionIndices = new ComputeBuffer(CBDRSharedData.XRES * CBDRSharedData.YRES * CBDRSharedData.ZRES * (maximumProbe + 1), sizeof(int));
            string old    = "_ReflectionCubeMap";
            string newStr = new string(' ', old.Length + 1);

            reflectionCubemapIDs = new NativeList <int>(maximumProbe, maximumProbe, Allocator.Persistent);
            fixed(char *ctr = old)
            {
                fixed(char *newCtr = newStr)
                {
                    for (int i = 0; i < old.Length; ++i)
                    {
                        newCtr[i] = ctr[i];
                    }
                    for (int i = 0; i < reflectionCubemapIDs.Length; ++i)
                    {
                        newCtr[old.Length]      = (char)(i + 48);
                        reflectionCubemapIDs[i] = Shader.PropertyToID(newStr);
                    }
                }
            }
        }
 protected override void Init(PipelineResources resources)
 {
     linearMat       = new Material(resources.shaders.linearDepthShader);
     linearDrawerMat = new Material(resources.shaders.linearDrawerShader);
     motionVecMat    = new Material(resources.shaders.motionVectorShader);
     if (useHiZ)
     {
         hizDepth.InitHiZ(resources, new Vector2(Screen.width, Screen.height));
         clusterMat = new Material(resources.shaders.clusterRenderShader);
     }
     ao            = RenderPipeline.GetEvent <AOEvents>();
     reflection    = RenderPipeline.GetEvent <ReflectionEvent>();
     proper        = RenderPipeline.GetEvent <PropertySetEvent>();
     downSampleMat = new Material(resources.shaders.depthDownSample);
 }
예제 #3
0
        protected override void Init(PipelineResources resources)
        {
            decalEvt.Init(resources);
            linearMat       = new Material(resources.shaders.linearDepthShader);
            linearDrawerMat = new Material(resources.shaders.linearDrawerShader);
            if (useHiZ)
            {
#if UNITY_EDITOR
                if (Application.isPlaying)
                {
#endif
                hizDepth.InitHiZ(resources);
                clusterMat = new Material(resources.shaders.clusterRenderShader);
#if UNITY_EDITOR
            }
#endif
            }
            ao         = RenderPipeline.GetEvent <AOEvents>();
            reflection = RenderPipeline.GetEvent <ReflectionEvent>();
            proper     = RenderPipeline.GetEvent <PropertySetEvent>();
        }
        protected override void Init(PipelineResources resources)
        {
            decalEvt.Init(resources);
            linearMat       = new Material(resources.shaders.linearDepthShader);
            linearDrawerMat = new Material(resources.shaders.linearDrawerShader);
            motionVecMat    = new Material(resources.shaders.motionVectorShader);
            if (useHiZ)
            {
#if UNITY_EDITOR
                if (Application.isPlaying)
                {
#endif
                hizDepth.InitHiZ(resources, new Vector2(Screen.width, Screen.height));
                clusterMat = new Material(resources.shaders.clusterRenderShader);
#if UNITY_EDITOR
            }
#endif
            }
            ao            = RenderPipeline.GetEvent <AOEvents>();
            reflection    = RenderPipeline.GetEvent <ReflectionEvent>();
            proper        = RenderPipeline.GetEvent <PropertySetEvent>();
            downSampleMat = new Material(resources.shaders.depthDownSample);
        }