When an image is binded to a shader as a sampled image, you can access the mip levels of the image by specifying the desired mip level in the texture access call:
uniform sampler2D sampledImage;
void main() {
ivec2 p = ...;
int lod = ...;
vec4 v = texelFetch(sampledImage, p, lod);
}
However, if the image is binded as a storage, you cannot access the different mip levels directly and have to resort to binding the mip levels individually in an array of images:
uniform image2D storageImage[];
void main() {
ivec2 p = ...;
int lod = ...;
vec4 v = imageLoad(storageImage[lod], p);
}
This works, but it would be much nicer to just be able to specify the desired lod inside the imageLoad / imageStore call, like you can for sampled images: imageLoad(storageImage, p, lod). Would it be possible to add this, or am I missing something ?
When an image is binded to a shader as a sampled image, you can access the mip levels of the image by specifying the desired mip level in the texture access call:
However, if the image is binded as a storage, you cannot access the different mip levels directly and have to resort to binding the mip levels individually in an array of images:
This works, but it would be much nicer to just be able to specify the desired lod inside the imageLoad / imageStore call, like you can for sampled images:
imageLoad(storageImage, p, lod). Would it be possible to add this, or am I missing something ?