PDA

View Full Version : A call to get dimensions of image units in GLSL, just like textureSize



sleap
05-23-2014, 04:27 AM
Not exactly a big suggestion but here goes...

textureSize(sampler, level) (https://www.opengl.org/sdk/docs/man/html/textureSize.xhtml) is a handy function to get texture dimensions in a shader without having to pass them in by hand as uniforms.


It'd be really useful to have this feature for image units from the image_load_store (https://www.opengl.org/registry/specs/ARB/shader_image_load_store.txt) extension too. Does a method already exist and I've missed it or is it useful to enough people to be in this forum?

ScottManDeath
05-24-2014, 07:20 PM
https://www.opengl.org/registry/specs/ARB/shader_image_size.txt