Initializes a new instance of the
Uniform struct.
Namespace:
Internal.SharpBgfx
Assembly:
NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax public Uniform(
string name,
UniformType type,
int arraySize = 1
)
Parameters
- name
- Type: SystemString
The name of the uniform. - type
- Type: Internal.SharpBgfxUniformType
The type of data represented by the uniform. - arraySize (Optional)
- Type: SystemInt32
Size of the array, if the uniform is an array type.
Remarks
Predefined uniform names:
u_viewRect vec4(x, y, width, height) - view rectangle for current view.
u_viewTexel vec4 (1.0/width, 1.0/height, undef, undef) - inverse width and height
u_view mat4 - view matrix
u_invView mat4 - inverted view matrix
u_proj mat4 - projection matrix
u_invProj mat4 - inverted projection matrix
u_viewProj mat4 - concatenated view projection matrix
u_invViewProj mat4 - concatenated inverted view projection matrix
u_model mat4[BGFX_CONFIG_MAX_BONES] - array of model matrices.
u_modelView mat4 - concatenated model view matrix, only first model matrix from array is used.
u_modelViewProj mat4 - concatenated model view projection matrix.
u_alphaRef float - alpha reference value for alpha test.
See Also