Struct ShaderDescription

Nested Relationships

Nested Types

Struct Documentation

struct ShaderDescription

Shader inputs and behavior description.

Public Types

enum class Type

The type of object a shader is for.

Values:

enumerator Opaque3D

3D opaque geometry in the world

enumerator NonOpaque3D

3D potentially non-opaque geometry in the world

enumerator Surface2D

2D object rendered on a surface

enum class VertexInputBits : uint32_t

Bits of used vertex input attributes.

Values:

enumerator Position

Position in local space.

enumerator TexCoords

Texture coordinates.

enumerator Normal

Surface normal vector.

enumerator Tangent

Surface tangent vector.

enumerator Bitangent

Surface bitangent vector.

Public Members

enum Cacao::ShaderDescription::Type type

Type of this shader.

VertexInputBits vertexInputs

Vertex input values used by the shader, represented as a bitmask of VertexInputBits.

bool transformUsed

If the shader uses the transformation matrix.

bool globalsUsed

If the shader uses the globals buffer.

std::vector<MaterialParamInfo> materialParams

Material parameters list.

struct MaterialParamInfo

Info about a material parameter.

Public Types

enum class DataType

Type of data.

Values:

Non-opaque types:
enumerator Int

32-bit signed integer

enumerator UInt

32-bit unsigned integer

enumerator Float

Single-precision floating point number (32-bit)

enumerator Bool

Boolean.

enumerator Float2

2-component float vector

enumerator Float3

3-component float vector

enumerator Float4

4-component float vector

enumerator Int2

2-component int vector

enumerator Int3

3-component int vector

enumerator Int4

4-component int vector

enumerator UInt2

2-component unsigned int vector

enumerator UInt3

3-component unsigned int vector

enumerator UInt4

4-component unsigned int vector

enumerator Float2x2

2x2 matrix of floats

enumerator Float3x3

3x3 matrix of floats

enumerator Float4x4

4x4 matrix of floats

Opaque types:
enumerator Tex2D

Tex2D.

enumerator TexCube

Cubemap.

Public Members

enum Cacao::ShaderDescription::MaterialParamInfo::DataType type

Type of stored data.

std::string name

Parameter name.

unsigned int bufferOffset

For non-opaque types: offset into the parameters constant buffer

unsigned int binding

For opaque types: descriptor binding number