Initial commit: Minecraft 光追着色器包(从零实现的 path tracing)

This commit is contained in:
WpyQwq
2026-09-19 12:06:22 +08:00
commit 59e30822f8
314 changed files with 9259 additions and 0 deletions
@@ -0,0 +1,19 @@
// 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));
}