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.
- position: where the corner is. With the 2D projection
zis not used. - color_scale: multiplied into the colour the shader finds: the whole colour for
set_shader_for_color, the texel for images. - uv: which point of the texture this corner takes, from 0 to 1.
- normal: the direction the surface faces, for shaders that light it.
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
zis 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.