// MinecraftPT — DepthCopy_CS // Copies the current frame depth to prevDepth2D at the end of the frame, // so temporal filters in the next frame have the previous depth for // reprojection validation. #include "/Lib/Settings.glsl" #include "/Lib/Utilities.glsl" const ivec3 workGroups = ivec3(int(ceil(viewWidth * 0.0625)), int(ceil(viewHeight * 0.0625)), 1); layout (local_size_x = 8, local_size_y = 8) in; layout (r32f) uniform writeonly image2D img_prevDepth2D; uniform sampler2D depthtex0; void main(){ ivec2 texel = ivec2(gl_GlobalInvocationID.xy); imageStore(img_prevDepth2D, texel, vec4(texelFetch(depthtex0, texel * 2, 0).r)); }