Skip to content
Shmellyorc edited this page Aug 31, 2026 · 2 revisions

Vect3 is a 3D vector structure with floating-point components primarily used for shader uniforms and 3D spatial calculations.


Fields

Field Type Description
X float The X-component of the vector
Y float The Y-component of the vector
Z float The Z-component of the vector

Constructors

// Create from X, Y, and Z components
var v1 = new Vect3(10f, 20f, 5f);

Properties

Property Description
X The X-component of the vector
Y The Y-component of the vector
Z The Z-component of the vector

Shader Usage

Vect3 is commonly used for shader uniforms that require 3D vectors.

// Set a vec3 uniform in a shader
shader.SetUniform("uColor", new Vect3(1f, 0.5f, 0f));
shader.SetUniform("uPosition", new Vect3(10f, 20f, 5f));
shader.SetUniform("uDirection", new Vect3(0f, 1f, 0f));

Back to Math Library

Clone this wiki locally