public override void ExecutePostProcessBuffer(CommandBuffer _buffer, RenderTargetIdentifier _src, RenderTargetIdentifier _dst, RenderTextureDescriptor _descriptor, PPData_VolumetricLight ppData)
        {
            _descriptor.width          /= ppData.m_DownSample;
            _descriptor.height         /= ppData.m_DownSample;
            _descriptor.colorFormat     = RenderTextureFormat.R8;
            _descriptor.depthBufferBits = 0;
            _buffer.GetTemporaryRT(RT_ID_Sample, _descriptor, FilterMode.Bilinear);

            if (!ppData.m_EnableBlur)
            {
                _buffer.Blit(_src, RT_ID_Sample, m_Material, 0);
            }
            else
            {
                _buffer.GetTemporaryRT(RT_ID_Blur, _descriptor, FilterMode.Bilinear);
                _buffer.Blit(_src, RT_ID_Blur, m_Material, 0);
                m_CoreBlur.ExecutePostProcessBuffer(_buffer, RT_ID_Blur, RT_ID_Sample, _descriptor, ppData.m_BlurParam);
                _buffer.ReleaseTemporaryRT(RT_ID_Blur);
            }

            if (ppData.m_Debug)
            {
                _buffer.Blit(RT_ID_Sample, _dst);
            }
            else
            {
                _buffer.Blit(_src, _dst, m_Material, 1);
            }

            _buffer.ReleaseTemporaryRT(RT_ID_Sample);
        }
 public override void ExecutePostProcessBuffer(CommandBuffer _buffer, RenderTargetIdentifier _src, RenderTargetIdentifier _dst, RenderTextureDescriptor _descriptor, PPData_DepthOfField _data)
 {
     base.ExecutePostProcessBuffer(_buffer, _src, _dst, _descriptor, _data);
     _buffer.GetTemporaryRT(RT_ID_Blur, _descriptor.width, _descriptor.height, 0, FilterMode.Bilinear, _descriptor.colorFormat);
     _mCoreBlur.ExecutePostProcessBuffer(_buffer, _src, RT_ID_Blur, _descriptor, _data.m_BlurParams);
     _buffer.Blit(_src, _dst, m_Material);
     _buffer.ReleaseTemporaryRT(RT_ID_Blur);
 }
        public override void ExecutePostProcessBuffer(CommandBuffer _buffer, RenderTargetIdentifier _src, RenderTargetIdentifier _dst, RenderTextureDescriptor _descriptor, PPData_Bloom _data)
        {
            var rtW = _descriptor.width;
            var rtH = _descriptor.height;

            _buffer.GetTemporaryRT(RT_ID_Blur, rtW, rtH, 0, FilterMode.Bilinear, _descriptor.colorFormat);
            _buffer.GetTemporaryRT(RT_ID_Sample, rtW, rtH, 0, FilterMode.Bilinear, _descriptor.colorFormat);

            _buffer.Blit(_src, RT_Sample, m_Material, (int)enum_Pass.SampleLight);

            _mCoreBlur.ExecutePostProcessBuffer(_buffer, RT_Sample, RT_Blur, _descriptor, _data.m_BlurParams);

            _buffer.Blit(_src, _dst, m_Material, (int)enum_Pass.AddBloomTex);

            _buffer.ReleaseTemporaryRT(RT_ID_Sample);
            _buffer.ReleaseTemporaryRT(RT_ID_Blur);
        }
Esempio n. 4
0
        public override void ExecutePostProcessBuffer(CommandBuffer _buffer, RenderTargetIdentifier _src, RenderTargetIdentifier _dst, RenderTextureDescriptor _descriptor, PPData_Outline _data)
        {
            switch (_data.m_Type)
            {
            case enum_OutlineType.EdgeDetect:
            {
                _buffer.Blit(_src, _dst, m_Material, 0);
            }
            break;

            case enum_OutlineType.MaskBlur:
            {
                _mCoreBlur.ExecutePostProcessBuffer(_buffer, RT_ID_MaskRender, RT_ID_MaskRenderBlur, m_Descriptor, _data.m_OutlineBlur);
                _buffer.Blit(_src, _dst, m_Material, 1);
            }
            break;
            }
        }