示例#1
0
 public RenderStageModelFactory(IFrameworkMessenger frameworkMessenger,
                                IStartupPropertiesCache startUpPropertiesCache,
                                ISystemComponents veldridComponents,
                                IVeldridWindowUpdater windowUpdater,
                                IDrawQueueGroupFactory drawQueueGroupFactory,
                                IDrawStageBatcherFactory drawStageBatcherFactory,
                                IGpuSurfaceManager gpuSurfaceManager,
                                IPipelineFactory pipelineFactory,
                                IGaussianBlurWeightsAndOffsetsCache gaussianWeightsAndOffsetsCache,
                                IQuadMeshBuilder quadMeshBuilder,
                                IBlendStateConverter blendStateConverter,
                                IShaderLoader shaderTools)
 {
     _frameworkMessenger             = frameworkMessenger;
     _startUpPropertiesCache         = startUpPropertiesCache;
     _systemComponents               = veldridComponents;
     _windowUpdater                  = windowUpdater;
     _drawQueueGroupFactory          = drawQueueGroupFactory;
     _drawStageBatcherFactory        = drawStageBatcherFactory;
     _gpuSurfaceManager              = gpuSurfaceManager;
     _pipelineFactory                = pipelineFactory;
     _gaussianWeightsAndOffsetsCache = gaussianWeightsAndOffsetsCache;
     _quadMeshBuilder                = quadMeshBuilder;
     _blendStateConverter            = blendStateConverter;
     _shaderTools = shaderTools;
 }
示例#2
0
        public BlurStageModel(IFrameworkMessenger frameworkMessenger,
                              IStartupPropertiesCache startUpPropertiesCache,
                              ISystemComponents systemComponents,
                              IGpuSurfaceManager surfaceManager,
                              IGaussianBlurWeightsAndOffsetsCache gaussianWeightsAndOffsetsCache,
                              uint sampleSurfaceWidth,
                              uint sampleSurfaceHeight)
        {
            _frameworkMessenger             = frameworkMessenger;
            _startUpPropertiesCache         = startUpPropertiesCache;
            _systemComponents               = systemComponents;
            _surfaceManager                 = surfaceManager;
            _gaussianWeightsAndOffsetsCache = gaussianWeightsAndOffsetsCache;
            _sampleSurfaceWidth             = sampleSurfaceWidth;
            _sampleSurfaceHeight            = sampleSurfaceHeight;

            TexelShiftSize = new Vector2(1.0f / (1.0f * _sampleSurfaceWidth), 1.0f / (1.0f * _sampleSurfaceHeight));

            CreateSurfaces();

            _current = new BlurEffectConfiguration()
            {
                MixAmount           = 0.0f,
                NumberOfBlurSamples = 4,
                ReSamplerType       = ResizeSamplerType.NearestNeighbour
            };

            _isTransitioning = false;
        }
        public SinglePassGaussianBlurRenderer(ISystemComponents systemComponents,
                                              IShaderLoader shaderLoader,
                                              IPipelineFactory pipelineFactory,
                                              IFullNdcSpaceQuadVertexBuffer ndcQuadVertexBuffer,
                                              IGaussianBlurWeightsAndOffsetsCache gaussianWeightsAndOffsetsCache)
        {
            _systemComponents               = systemComponents;
            _shaderLoader                   = shaderLoader;
            _pipelineFactory                = pipelineFactory;
            _ndcQuadVertexBuffer            = ndcQuadVertexBuffer;
            _gaussianWeightsAndOffsetsCache = gaussianWeightsAndOffsetsCache;

            Initialise();
        }