CathodeRetro::ShaderResourceView
This represents a view to the input to a shader - it has a texture, a sampler type, and an optional mipmap level.
If the mipmap level is specified, the sampling of the texture should be restricted to only that level, otherwise all mip levels should be samplable (using linear or, more ideally, anisotropic mip level filtering).
This is used as an input parameter to
IGraphicsDevice::.
Index
Members
- (constructors)
-
ShaderResourceView( const ITexture *tex, SamplerType samp) ShaderResourceView( const ITexture *tex, uint32_t mip, SamplerType samp)Description
Construct a new instance of a
ShaderResourceViewstruct.There are two constructors here: Both take
texandsampparameters, but the second additionally takesmip.Parameters
tex-
Type:
const ITexture *The texture to use.
mip-
Type:
uint32_tThe mipmap level to use for this view.
This value should not exceed the mipmap level count of the given texture.
samp-
Type:
SamplerType
- texture
-
const ITexture *textureType
const ITexture *Description
The red channel value. - mipLevel
-
int32_t mipLevel = -1Type
int32_tDescription
The mipmap level to use when sampling this texture.
A negative value means "sample from all levels using linear or anisotropic level filtering."
If the value is non-negative, it should not exceed the mipmap level count of the given texture.
- samplerType
-
SamplerType samplerTypeType
SamplerTypeDescription
Which type of sampler to use when sampling the given texture.