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
ShaderResourceView
struct.There are two constructors here: Both take
tex
andsamp
parameters, but the second additionally takesmip
.Parameters
tex
-
Type:
const ITexture *
The texture to use.
mip
-
Type:
uint32_t
The 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 *texture
Type
const ITexture *
Description
The red channel value. - mipLevel
-
int32_t mipLevel = -1
Type
int32_t
Description
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 samplerType
Type
SamplerType
Description
Which type of sampler to use when sampling the given texture.