Difference between revisions of "mat4"

(Created page with "A matrix with 4x4 floating-point number components. These can be accessed with <code>[0/1/2/3][0/1/2/3]</code>. <source lang="glsl"> mat4 example = mat4(1.0, 0.0, 0.0, 0.0,...")
 
m (Fixed other languages.)
 
Line 23: Line 23:
  
 
== Other Languages ==
 
== Other Languages ==
{{i18n|vec4}}
+
{{i18n|mat4}}

Latest revision as of 18:13, 26 July 2022

A matrix with 4x4 floating-point number components. These can be accessed with [0/1/2/3][0/1/2/3].

mat4 example = mat4(1.0, 0.0, 0.0, 0.0,
                    0.0, 1.0, 0.0, 0.0,
                    0.0, 0.0, 1.0, 0.0,
                    0.0, 0.0, 0.0, 1.0);

float firstValue = example[0][0];
float lastValue  = example[3][3];

Read more:

See Also


Other Languages