示例#1
0
        /////////////////////////////////////////////////////////////////////////////////////////////
        // Unity MonoBehavior Messages
        /////////////////////////////////////////////////////////////////////////////////////////////
        internal void Enable(RenderPipeline renderPipeline)
        {
            _renderTextureFormat = Compatibility.CheckSupportedRenderTextureFormat();

            _renderPipeline = renderPipeline;
            _sourceContext  = new RenderContext[1] {
                new RenderContext()
            };
            _renderContext = new RenderContext[PipelineProperties.renderBufferSize];
            for (int i = 0; i < PipelineProperties.renderBufferSize; i++)
            {
                _renderContext[i] = new RenderContext();
            }
            _selectiveRenderContext = new RenderContext();

            _renderMaterialNoGeometry = new Material(_resources.sm40Shader)
            {
                hideFlags = HideFlags.HideAndDontSave
            };

            _renderTargetsBundle  = new List <RenderTarget>();
            _renderKeywordsBundle = new List <MaterialKeywords>();

            //create buffers
            _bloomDownsampleBuffer = new MipBuffer(PipelineProperties.CommandBufferProperties.bloomDownsampleBuffer, _renderPipeline);
            _bloomUpsampleBuffer   = new MipBuffer(PipelineProperties.CommandBufferProperties.bloomUpsampleBuffer, _renderPipeline);
        }
示例#2
0
 /////////////////////////////////////////////////////////////////////////////////////////////
 // CommandBuffer creation
 /////////////////////////////////////////////////////////////////////////////////////////////
 /// <summary>
 /// Enable or disable all supported / unsupported shaders based on the platform
 /// </summary>
 private void CheckFeatureSupport()
 {
     _renderTextureFormat = Compatibility.CheckSupportedRenderTextureFormat();
 }