diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-05-21 15:21:13 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2021-05-21 15:22:57 +0300 |
commit | 26a4986009a269fb3064b2aef5e06b9872da476e (patch) | |
tree | 413bfaa78fbb22ba6ef08741846978e7fc17945f /shaders-no-opt | |
parent | 418542eaefdb609f548d25a1e3962fb69d80da63 (diff) |
GLSL: Implement noncoherent framebuffer fetch.
Diffstat (limited to 'shaders-no-opt')
2 files changed, 24 insertions, 0 deletions
diff --git a/shaders-no-opt/frag/subpass-input.framebuffer-fetch.nocompat.framebuffer-fetch-noncoherent.frag b/shaders-no-opt/frag/subpass-input.framebuffer-fetch.nocompat.framebuffer-fetch-noncoherent.frag new file mode 100644 index 00000000..621457a1 --- /dev/null +++ b/shaders-no-opt/frag/subpass-input.framebuffer-fetch.nocompat.framebuffer-fetch-noncoherent.frag @@ -0,0 +1,12 @@ +#version 310 es +precision mediump float; + +layout(input_attachment_index = 0, set = 0, binding = 0) uniform mediump subpassInput uSubpass0; +layout(input_attachment_index = 1, set = 0, binding = 1) uniform mediump subpassInput uSubpass1; +layout(location = 0) out vec3 FragColor; +layout(location = 1) out vec4 FragColor2; + +void main() +{ + FragColor.rgb = subpassLoad(uSubpass0).rgb + subpassLoad(uSubpass1).rgb; +} diff --git a/shaders-no-opt/frag/subpass-input.framebuffer-fetch.nocompat.legacy.framebuffer-fetch-noncoherent.frag b/shaders-no-opt/frag/subpass-input.framebuffer-fetch.nocompat.legacy.framebuffer-fetch-noncoherent.frag new file mode 100644 index 00000000..621457a1 --- /dev/null +++ b/shaders-no-opt/frag/subpass-input.framebuffer-fetch.nocompat.legacy.framebuffer-fetch-noncoherent.frag @@ -0,0 +1,12 @@ +#version 310 es +precision mediump float; + +layout(input_attachment_index = 0, set = 0, binding = 0) uniform mediump subpassInput uSubpass0; +layout(input_attachment_index = 1, set = 0, binding = 1) uniform mediump subpassInput uSubpass1; +layout(location = 0) out vec3 FragColor; +layout(location = 1) out vec4 FragColor2; + +void main() +{ + FragColor.rgb = subpassLoad(uSubpass0).rgb + subpassLoad(uSubpass1).rgb; +} |