Exemple #1
0
 public DirectComputeFilter(ShaderFilterSettings <IShader11> settings, int threadGroupX, int threadGroupY,
                            int threadGroupZ, params IBaseFilter[] inputFilters)
     : base(settings, inputFilters)
 {
     ThreadGroupX = threadGroupX;
     ThreadGroupY = threadGroupY;
     ThreadGroupZ = threadGroupZ;
 }
Exemple #2
0
        protected GenericShaderFilter(ShaderFilterSettings <T> settings, params IBaseFilter[] inputFilters)
            : base(inputFilters)
        {
            Shader         = settings.Shader;
            LinearSampling = settings.PerTextureLinearSampling
                             .Concat(Enumerable.Repeat(settings.LinearSampling, inputFilters.Length - settings.PerTextureLinearSampling.Length))
                             .ToArray();

            Transform = settings.Transform;
            Format    = settings.Format;
            SizeIndex = settings.SizeIndex;

            if (SizeIndex < 0 || SizeIndex >= inputFilters.Length || inputFilters[SizeIndex] == null)
            {
                throw new IndexOutOfRangeException(String.Format("No valid input filter at index {0}", SizeIndex));
            }

            var arguments = settings.Args ?? new float[0];

            Args = new float[4 * ((arguments.Length + 3) / 4)];
            arguments.CopyTo(Args, 0);
        }
Exemple #3
0
 public ClKernelFilter(ShaderFilterSettings <IKernel> settings, int[] globalWorkSizes, int[] localWorkSizes, params IBaseFilter[] inputFilters)
     : base(settings, inputFilters)
 {
     GlobalWorkSizes = globalWorkSizes;
     LocalWorkSizes  = localWorkSizes;
 }
Exemple #4
0
 public Shader11Filter(ShaderFilterSettings <IShader11> settings, params IBaseFilter[] inputFilters)
     : base(settings, inputFilters)
 {
 }