textureSize is a handy function to get texture dimensions in a shader without having to pass them in by hand as uniforms.
Is there a similar API for image units?
textureSize is a handy function to get texture dimensions in a shader without having to pass them in by hand as uniforms.
Is there a similar API for image units?
Copyright © 2021 Jogjafile Inc.
Yes, it's in OpenGL 4.3:
imageSize()
docsimageSize()
wikiARB_shader_image_size
specsExample: