Skip to content

X3DSharedConstantDef

Uncategorized - no domain claims this class yet. Categorize

Class Documentation

Edit documentation

A shared shader constant inside an X3DSharedConstantBufferDef. Its size is the size of its type times Count, and the buffer lays the constants out in list order.

Constants are shared by name. If two buffers declare a constant with the same name, the client keeps one constant that is bound to a place in each buffer.

Properties

Count

U32 = 1
Edit documentation

The number of elements. The constant's size is Count times the element size.

SetManually

Bool = false
Edit documentation

If any constant of a buffer that passes the filters leaves it false, the client keeps a CPU-side copy of that buffer. What else it changes is not yet identified.

StructureLink

Hash = "0x0"
15.7
Edit documentation

For type 10, the structure definition whose size is the element size. Other types do not read it.

name

String = ""
Edit documentation

The name of the constant. Constants with the same name in different buffers are one constant.

type

U32 = 0
Edit documentation

The element type, which sets the element size:

Value Name Size
0 Scalar 4 bytes
1 Vector2 8 bytes
2 Vector3 12 bytes
3 Vector4 16 bytes
4 Scalar (second set) 4 bytes
5 Vector2 (second set) 8 bytes
6 Vector3 (second set) 12 bytes
7 Vector4 (second set) 16 bytes
8 Matrix 4x3 48 bytes
9 Matrix 4x4 64 bytes
10 Structure the size of the structure that StructureLink links

Any other value has size 0. What distinguishes 0-3 from 4-7 is not yet identified.

Referenced by 1 class · 1 property