-
Notifications
You must be signed in to change notification settings - Fork 110
[feature request] Add lod parameter to imageLoad / imageStore #306
Copy link
Copy link
Open
Description
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 ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels