public NNedi3HKernelFilter(IShaderFilterSettings <IKernel> settings, IDisposable buffer, int neuronCount, TextureSize textureSize, int[] localWorkSizes, ITextureFilter <IBaseTexture> inputFilter) : base(settings, GlobalWorkSizesHelper.Get(textureSize.Height, textureSize.Width, localWorkSizes), localWorkSizes, inputFilter) { m_Buffer = buffer; m_NeuronCount = neuronCount; m_TextureSize = textureSize; }
protected override void LoadArguments(IList <IBaseTexture> inputs, ITargetTexture output) { var inputTexture = (ITexture2D)inputs[0]; GlobalWorkSizes = GlobalWorkSizesHelper.Get(inputTexture.Width, inputTexture.Height, LocalWorkSizes); // Use the 'temp' texture from first pass as input Shader.SetTempTextureArg(0, inputTexture); // srcImg Shader.SetOutputTextureArg(1, output); // dstImg if (m_ReloadWeights) { Shader.SetBufferArg(2, m_Buffer); // weights Shader.SetArg(3, m_NeuronCount); // nnst } Shader.SetArg(4, m_Horizontal ? inputTexture.Height : inputTexture.Width); // SrcWidth Shader.SetArg(5, m_Horizontal ? inputTexture.Width : inputTexture.Height); // SrcHeight Shader.SetArg(6, m_Horizontal ? 1 : 0); // SwapXy }
public NNedi3VKernelFilter(ShaderFilterSettings <IKernel> settings, TextureSize textureSize, int[] localWorkSizes, IFilter <IBaseTexture> inputFilter) : base(settings, GlobalWorkSizesHelper.Get(textureSize.Width, textureSize.Height, localWorkSizes), localWorkSizes, inputFilter) { m_TextureSize = textureSize; }