コード例 #1
0
        private void SetLegacyCameraFlags(PostProcessRenderContext context)
        {
            DepthTextureMode depthTextureMode = context.camera.depthTextureMode;

            foreach (KeyValuePair <Type, PostProcessBundle> bundle in m_Bundles)
            {
                if (bundle.Value.settings.IsEnabledAndSupported(context))
                {
                    depthTextureMode |= bundle.Value.renderer.GetCameraFlags();
                }
            }
            if (context.IsTemporalAntialiasingActive())
            {
                depthTextureMode |= temporalAntialiasing.GetCameraFlags();
            }
            if (fog.IsEnabledAndSupported(context))
            {
                depthTextureMode |= fog.GetCameraFlags();
            }
            if (debugLayer.debugOverlay != 0)
            {
                depthTextureMode |= debugLayer.GetCameraFlags();
            }
            context.camera.depthTextureMode = depthTextureMode;
        }
コード例 #2
0
        // In the legacy render loop you have to explicitely set flags on camera to tell that you
        // need depth, depth+normals or motion vectors... This won't have any effect with most
        // scriptable render pipelines.
        void SetLegacyCameraFlags(PostProcessRenderContext context)
        {
            var flags = context.camera.depthTextureMode;

            foreach (var bundle in m_Bundles)
            {
                if (bundle.Value.settings.IsEnabledAndSupported(context))
                {
                    flags |= bundle.Value.renderer.GetCameraFlags();
                }
            }

            // Special case for AA & lighting effects
            if (context.IsTemporalAntialiasingActive())
            {
                flags |= temporalAntialiasing.GetCameraFlags();
            }

            if (fog.IsEnabledAndSupported(context))
            {
                flags |= fog.GetCameraFlags();
            }

            if (debugLayer.debugOverlay != DebugOverlay.None)
            {
                flags |= debugLayer.GetCameraFlags();
            }

            context.camera.depthTextureMode = flags;
        }
コード例 #3
0
ファイル: PostProcessLayer.cs プロジェクト: Rinsunsama/StoRin
        // In the legacy render loop you have to explicitely set flags on camera to tell that you
        // need depth, depth+normals or motion vectors... This won't have any effect with most
        // scriptable render pipelines.
        void SetLegacyCameraFlags(PostProcessRenderContext context)
        {
            var flags = context.camera.depthTextureMode;

            foreach (var bundle in m_Bundles)
            {
                if (bundle.Value.settings.IsEnabledAndSupported(context))
                {
                    flags |= bundle.Value.renderer.GetCameraFlags();
                }
            }

            // Special case for AA & lighting effects
            if (context.IsTemporalAntialiasingActive())
            {
                flags |= temporalAntialiasing.GetCameraFlags();
            }

            if (ambientOcclusion.IsEnabledAndSupported(context) && !ambientOcclusion.IsAmbientOnly(context))
            {
                flags |= ambientOcclusion.GetCameraFlags();
            }

            if (fog.IsEnabledAndSupported(context))
            {
                flags |= fog.GetCameraFlags();
            }

            context.camera.depthTextureMode = flags;
        }