SPIRV-Cross/shaders-msl/frag/buffer-read-write.frag
Hans-Kristian Arntzen fc4f39b11f MSL: Support native texture_buffer type, throw error on atomics.
Atomics are not supported on images or texture_buffers in MSL.
Properly throw an error if OpImageTexelPointer is used (since it can
only be used for atomic operations anyways).
2019-04-23 12:21:43 +02:00

13 lines
284 B
GLSL

#version 450
layout(rgba8, binding = 0) uniform readonly imageBuffer buf;
layout(rgba8, binding = 1) uniform writeonly imageBuffer bufOut;
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = imageLoad(buf, 0);
imageStore(bufOut, int(gl_FragCoord.x), FragColor);
}