blob: e017145df8940e76dbc7e463ad0b38d022efc56d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#version 450
#extension GL_ARB_shader_stencil_export : enable
layout(set = 0, binding = 0)
uniform sampler1DArray s_depth;
layout(set = 0, binding = 1)
uniform usampler1DArray s_stencil;
layout(push_constant)
uniform u_info_t {
ivec2 offset;
} u_info;
void main() {
ivec2 coord = ivec2(gl_FragCoord.x + u_info.offset.x, gl_Layer);
gl_FragDepth = texelFetch(s_depth, coord, 0).r;
gl_FragStencilRefARB = int(texelFetch(s_stencil, coord, 0).r);
}
|