IMAGESTORE(3G)

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

✨ IMAGESTORE(3G) ✨

okay bestie, sit down, hydrate, and let me tell you about imageStore β€” the GLSL function that's literally just "here, take this texel, put it *there". it's in section 3G of the manual, and it's giving very much "I write pixels, that's my whole personality". πŸ’…


🌸 NAME 🌸

imageStore β€” write a single texel into an image

like, one texel. singular. no cap.


πŸŽ€ DECLARATION πŸŽ€

here's the whole friend group. twelve overloads, all named imageStore, all ready to vibe:

void imageStore(gimage1D image, int P, gvec4 data);

void imageStore(gimage2D image, ivec2 P, gvec4 data);

void imageStore(gimage3D image, ivec3 P, gvec4 data);

void imageStore(gimage2DRect image, ivec2 P, gvec4 data);

void imageStore(gimageCube image, ivec3 P, gvec4 data);

void imageStore(gbufferImage image, int P, gvec4 data);

void imageStore(gimage1DArray image, ivec2 P, gvec4 data);

void imageStore(gimage2DArray image, ivec3 P, gvec4 data);

void imageStore(gimageCubeArray image, ivec3 P, gvec4 data);

void imageStore(gimage2DMS image, ivec2 P, int sample, gvec4 data);

void imageStore(gimage2DMSArray image, ivec3 P, int sample, gvec4 data);

notice how the multisample girlies (gimage2DMS, gimage2DMSArray) get an extra int sample in there? yeah. they're built different. πŸ‘‘


πŸ¦‹ PARAMETERS πŸ¦‹

  • image β€” the image unit you're storing a texel into. this is the destination, the final boss, the address on the envelope.
  • P β€” the coordinate where the texel goes. where we're dropping it off. πŸ“
  • sample β€” only shows up sometimes (multisample moment), and it says which sample inside the image you're storing into.
  • data β€” the actual data getting stored into the image. the payload. the gift. 🎁

πŸ’– DESCRIPTION πŸ’–

so imageStore stores data into the texel at coordinate P, in the image specified by image. that's it, that's the whole job. for multi-sample stores, the sample number comes from sample.

when image, P, and sample all identify a valid texel, the bits used to represent data get converted to the format of the image unit β€” in the manner described in the OpenGL Specification β€” and then stored to that specified texel.

⚠️ key phrase alert: valid texel. if those three don't point at something real, that's not a "we'll figure it out" situation, bestie. check your coordinates. πŸ”₯

⭐ VERSION SUPPORT ⭐

the vibe check on when imageStore was even allowed to exist. the table in the original is:

Function Name: imageStore

OpenGL Shading Language Version:

  • 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 yeah. she didn't exist until GLSL 4.20, and then she ate every version after. iconic behavior, honestly. πŸ’…βœ¨


🌈 SEE ALSO 🌈

the whole entourage, go say hi:

  • imageLoad()
  • imageAtomicAdd()
  • imageAtomicMin()
  • imageAtomicMax()
  • imageAtomicAnd()
  • imageAtomicOr()
  • imageAtomicXor()
  • imageAtomicExchange()
  • imageAtomicCompSwap()

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


okay that's the whole page, bestie 🫢 go forth and store texels responsibly. this was [FIXME: source], dated 01/03/2018, and you can find her filed under IMAGESTORE(3G) β€” mwah, love u, bye πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from