Back to class index

Class ShaderConstant

Summary

Describes a single constant (uniform) variable in a shader program, that can be a vector, matrix, texture or a texture sampler.

Member Reference

ShaderConstantDescribes a single constant (uniform) variable in a shader program, that can be a vector, matrix, texture or a texture sampler.
nameSpecifies the variable name of this constant in the shader code.
boundConstantOffsetBytesSpecifies the byte offset inside the constant buffer this constant lies at.
boundConstantSizeBytesSpecifies the byte size of this constant value inside this buffer.
typeThe type of this variable: ConstantFloat, ConstantFloat2, ConstantFloat3, ..., ConstantTexture2D, ConstantSampler.
shaderProgramIndexSpecifies the uniform constant index in the shader program where this variable can be found at.
textureSlotIf this shader constant is a texture or sampler state, this specifies the texture unit this sampler will be bound to read (this is always fixed at the bind time).
sizeElementsIf this constant is an array, this field specifies the number of elements in the array.
textureIf this shader variable points to a texture variable, then this member variable specifies the texture that is bound to the shader.
textureSampler[const]If this shader variable points to a texture sampler, then this member variable specifies the texture sampling object that is bound to the shader.
ToString()[const]
Back to class index