OUTERPRODUCT(3G)
β¨ OUTERPRODUCT(3G) β¨
okay bestie, so this page is OUTERPRODUCT(3G) β like, section 3G of the manual, the GLSL-adjacent corner of the universe. and it's literally just one function, but it comes in so many flavors. buckle up π
πΈ NAME πΈ
outerProduct β calculate the outer product of a pair of vectors
π DECLARATION π
here's the whole roster, every single one, no skips:
mat2 outerProduct(vec2 c, vec2 r);
mat3 outerProduct(vec3 c, vec3 r);
mat4 outerProduct(vec4 c, vec4 r);
mat2x3 outerProduct(vec3 c, vec2 r);
mat3x2 outerProduct(vec2 c, vec3 r);
mat2x4 outerProduct(vec4 c, vec2 r);
mat4x2 outerProduct(vec2 c, vec4 r);
mat3x4 outerProduct(vec4 c, vec3 r);
mat4x3 outerProduct(vec3 c, vec4 r);
dmat2 outerProduct(dvec2 c, dvec2 r);
dmat3 outerProduct(dvec3 c, dvec3 r);
dmat4 outerProduct(dvec4 c, dvec4 r);
dmat2x3 outerProduct(dvec3 c, dvec2 r);
dmat3x2 outerProduct(dvec2 c, dvec3 r);
dmat2x4 outerProduct(dvec4 c, dvec2 r);
dmat4x2 outerProduct(dvec2 c, dvec4 r);
dmat3x4 outerProduct(dvec4 c, dvec3 r);
dmat4x3 outerProduct(dvec3 c, dvec4 r);
π¦ PARAMETERS π¦
cβ this one is the parameter that gets treated as a column vector. she's vertical, she's the lewk πrβ and this one gets treated as a row vector. horizontal icon behavior β¨
π DESCRIPTION π
so here's the tea. outerProduct takes the first parameter, c, and treats it as a column vector β think a matrix with exactly one column. then it takes the second parameter, r, and treats it as a row vector β a matrix with exactly one row. then it does a linear algebraic matrix multiply c * r.
and what you get out the other side is a matrix where:
- the number of rows equals the number of components in
c, and - the number of columns equals the number of components in
r.
that's it, that's the whole vibe. math said "you two? kiss." ππ
π VERSION SUPPORT π
the original had a big cute grid here, so let me lay it out for you. columns are OpenGL Shading Language versions: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50.
outerProduct (float):
1.10β nope, a-π1.20β β1.30β β1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
outerProduct (double):
1.10β-1.20β-1.30β-1.40β-1.50β-3.30β-4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
so the double version lowkey showed up late to the party β nothing before 4.00, periodt. the float one has been here since 1.20 and never left π«Ά
π₯ SEE ALSO π₯
dot()
(yes, that's the whole list. she's short but she's got range.)
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group
k byeee π this page was sourced as[FIXME: source]and stamped01/03/2018, and it's theOUTERPRODUCT(3G)moment. go forth and multiply your vectors, bestie. no cap. πβ¨π¦
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms