diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-04-20 14:32:41 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-04-20 14:36:51 +0300 |
commit | f93a8fb1fefc4498746111a0b42c7cd4955aaf2b (patch) | |
tree | 075e12638a820f793a4b46fdcf1d7c6b6d31bd13 /shaders-no-opt | |
parent | 3cb8e7c223a36a769fd76c104398d196674dbe0f (diff) |
GLSL: Support GL_EXT_shader_image_load_formatted.
Diffstat (limited to 'shaders-no-opt')
-rw-r--r-- | shaders-no-opt/comp/image-load-formatted.comp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shaders-no-opt/comp/image-load-formatted.comp b/shaders-no-opt/comp/image-load-formatted.comp new file mode 100644 index 00000000..7fd587d9 --- /dev/null +++ b/shaders-no-opt/comp/image-load-formatted.comp @@ -0,0 +1,11 @@ +#version 450 +#extension GL_EXT_shader_image_load_formatted : require +layout(local_size_x = 8, local_size_y = 8) in; + +layout(binding = 0) uniform image2D img; + +void main() +{ + vec4 v = imageLoad(img, ivec2(gl_GlobalInvocationID.xy)); + imageStore(img, ivec2(gl_GlobalInvocationID.xy), v + 1.0); +} |