MATRIXCOMPMULT(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

πŸ’– MATRIXCOMPMULT πŸ’–

okay bestie, gather round, because we're about to talk about matrixCompMult from the 3G manual section, and it's genuinely so much simpler than it sounds. no cap. πŸ¦‹


✨ NAME ✨

matrixCompMult β€” do a component-wise multiplication of two matrices. that's it. that's the whole vibe. πŸ’…


🌸 DECLARATION 🌸

here's the tea, exactly as written:

mat matrixCompMult(mat x, mat y);

dmat matrixCompMult(dmat x, dmat y);

two flavors, two moods, same energy. πŸŽ€


🫢 PARAMETERS 🫢

  • x β€” the first matrix multiplicand. yeah she's the first one up. πŸ‘‘
  • y β€” the second matrix multiplicand. and she's the second. iconic duo fr fr.

πŸ’€ DESCRIPTION πŸ’€

so matrixCompMult performs a component-wise multiplication of two matrices, and what you get back is a result matrix where every single component, result[i][j], is computed as the scalar product of x[i][j] and y[i][j].

like… it's not the fancy matrix-times-matrix thing you might be picturing, bestie. it's element by element. position by position. x[i][j] times y[i][j], slotted right into result[i][j]. literally just that. and honestly? she ate. ✨


πŸ‘‘ VERSION SUPPORT πŸ‘‘

bestie the original had a whole big grid here, so let me translate it into a format your eyeballs can actually survive. every ✘-free row, every version, all of it. no skipping. πŸ’œ

matrixCompMult (genType) β€” supported in every single one of these, she's been here since day one:

  • OpenGL Shading Language Version 1.10 β€” βœ”
  • OpenGL Shading Language Version 1.20 β€” βœ”
  • OpenGL Shading Language Version 1.30 β€” βœ”
  • OpenGL Shading Language Version 1.40 β€” βœ”
  • OpenGL Shading Language Version 1.50 β€” βœ”
  • OpenGL Shading Language Version 3.30 β€” βœ”
  • OpenGL Shading Language Version 4.00 β€” βœ”
  • OpenGL Shading Language Version 4.10 β€” βœ”
  • OpenGL Shading Language Version 4.20 β€” βœ”
  • OpenGL Shading Language Version 4.30 β€” βœ”
  • OpenGL Shading Language Version 4.40 β€” βœ”
  • OpenGL Shading Language Version 4.50 β€” βœ”

matrixCompMult (genDType) β€” the double-precision girlie showed up fashionably late, but she's been thriving ever since:

  • OpenGL Shading Language Version 1.10 β€” -
  • OpenGL Shading Language Version 1.20 β€” -
  • OpenGL Shading Language Version 1.30 β€” -
  • OpenGL Shading Language Version 1.40 β€” -
  • OpenGL Shading Language Version 1.50 β€” -
  • OpenGL Shading Language Version 3.30 β€” -
  • OpenGL Shading Language Version 4.00 β€” βœ”
  • OpenGL Shading Language Version 4.10 β€” βœ”
  • OpenGL Shading Language Version 4.20 β€” βœ”
  • OpenGL Shading Language Version 4.30 β€” βœ”
  • OpenGL Shading Language Version 4.40 β€” βœ”
  • OpenGL Shading Language Version 4.50 β€” βœ”

so basically: genType = always been there, genDType = 4.00 and onward only. iykyk. 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

  • dot()
  • reflect()

go read those too, they're lowkey a vibe. πŸ“


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 Β© 2011-2014 Khronos Group


and that's a wrap bestie!! πŸŽ€ this page came to you from [FIXME: source], dated 01/03/2018, and it lives in the 3G manual section β€” mwah, kisses, go multiply some matrix components component-wise πŸ’–βœ¨

πŸ“¦ where this page comes from