Simp module

immediate_vertex

procedure · 1 overloadSource

Adds one corner to the batch. Every three corners make a triangle, and the batch is drawn when it fills or when something forces a flush.

immediate_vertex :: (
    position: Vector3,
    color_scale: Vector4,
    uv: Vector2 = .{},
    normal: Vector3 = .{}
)

Adds one corner to the batch. Every three corners make a triangle, and the batch is drawn when it fills or when something forces a flush.

Parameters

position: Vector3
where the corner is. With the 2D projection z is not used.
color_scale: Vector4
multiplied into the colour the shader finds: the whole colour for set_shader_for_color, the texel for images.
uv: Vector2
which point of the texture this corner takes, from 0 to 1.
normal: Vector3
the direction the surface faces, for shaders that light it.

See also