AcTools.Render.Base.TargetTextures.TargetResourceTexture.Create C# (CSharp) Method

Create() public static method

public static Create ( Format format, SampleDescription sampleDescription = null, int mipLevels = 1 ) : TargetResourceTexture
format Format
sampleDescription SampleDescription
mipLevels int
return TargetResourceTexture
        public static TargetResourceTexture Create(Format format, SampleDescription? sampleDescription = null, int mipLevels = 1) {
            return new TargetResourceTexture(new Texture2DDescription {
                MipLevels = mipLevels,
                ArraySize = 1,
                Format = format,
                SampleDescription = sampleDescription ?? DefaultSampleDescription,
                Usage = ResourceUsage.Default,
                BindFlags = BindFlags.ShaderResource | BindFlags.RenderTarget,
                CpuAccessFlags = CpuAccessFlags.None,
                OptionFlags = ResourceOptionFlags.None
            });
        }
    }