1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00
OpenDX/src/dxvk/shaders/dxvk_copy_depth_stencil_2d.frag

20 lines
468 B
GLSL

#version 450
#extension GL_ARB_shader_stencil_export : enable
layout(set = 0, binding = 0)
uniform sampler2DArray s_depth;
layout(set = 0, binding = 1)
uniform usampler2DArray s_stencil;
layout(push_constant)
uniform u_info_t {
ivec2 offset;
} u_info;
void main() {
ivec3 coord = ivec3(gl_FragCoord.xy + u_info.offset.xy, gl_Layer);
gl_FragDepth = texelFetch(s_depth, coord, 0).r;
gl_FragStencilRefARB = int(texelFetch(s_stencil, coord, 0).r);
}