Uniform

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Uniform(val name: String)

Marks a uniform variable property in ShaderParams-annotated class.

Supports properties of types:

  • numbers: Boolean, Int, Float,

  • vectors: Vec2<Int>, Vec3<Int>, Vec4<Int>, Vec2<Float>, Vec3<Float>, Vec4<Float>,

  • matrices: Mat2<Float>, Mat3<Float>, Mat4<Float>,

  • arrays of these types,

  • buffers: IntUniformBuffer, FloatUniformBuffer.

Since v1.2.0, no longer supports properties of type Texture. Use @Sampler2D instead.

See also

Properties

Link copied to clipboard

Uniform variable name, as defined in the shader.