class
render::BlitMat
Shader that copies a source texture into a render target, and optionally resolves it.
Public
Constructors
BlitMat
Methods
staticInitMetaDataInternal
Initialize
Initializes the material.
Use this instead of the constructor to perform any one-time setup before using the material.
Prepare
Creates a new GpuParameterSet and assigns the provided texture.
Execute
Executes the blit operation using pre-configured GPU parameters.
- commandBuffer
- Command buffer to record draw commands into. A render pass must already be active.
- gpuParameters
- GPU parameters containing the configured source texture. Should be obtained via Prepare().
- area
- Area to use for UV coordinates when drawing the fullscreen quad. For unfiltered blits, this controls the sampled region. For filtered blits, normalized (0,1) UVs are used.
- flipUV
- If true, vertical texture coordinates are flipped.
staticGetVariation
Returns the material variation matching the provided parameters.
- msaaCount
- Number of MSAA samples in the input texture. If larger than 1 the texture will be resolved before written to the destination.
- isColor
- If true the input is assumed to be a 4-component color texture. If false it is assumed the input is a 1-component depth texture. This controls how is the texture resolve and is only relevant if > 1. Color texture MSAA samples will be averaged, while for depth textures the minimum of all samples will be used.
- isFiltered
- True if to apply bilinear filtering to the sampled texture. Only relevant for color textures with no multiple samples.
- blend
- If true blit source will be blended with the target image, rather than overwriting it, using the alpha value from the source.
- writeAlpha
- If true, alpha value from the source will be passed to the destination. Only relevant when in enabled.
~RendererMaterial<T>
staticGet
Retrieves an instance of this renderer material.
If material has multiple variations the first available variation will be returned.
staticGetShaderPath
Returns the path to the built-in (non-overriden) shader used by this material.
staticGetShaderDefines
Returns a set of dynamically defined defines used when compiling this shader.
CreateGpuParameterSet
Creates a new instance of GPU parameters for this material.
Protected
Methods
InitializeInternal
Initializes the renderer material.
To be called right after construction.
staticIsShaderInitialized
Checks if the Shader object has been created.
Not variations of the material can be compiled until the shader is created first.
staticIsRendereMaterialVariationCompiled
Checks if a particular variation has been compiled and initialized.
staticInitializeShader
Initializes the Shader object.
This needs to be done before attempting to compile any instances for the material.
staticCompileRendererMaterialVariation
Compiles and initializes a particular variation of the renderer material.
staticCompileShaderVariation
Compiles a particular shader variation.