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,32 @@
// MinecraftPT — Spider Eyes Fragment Shader (emissive eyes)
#include "/Lib/Settings.glsl"
#include "/Lib/Utilities.glsl"
in vec2 texcoord;
in vec3 worldPos;
in vec3 worldNormal;
in vec3 vertexNormal;
in vec4 color;
in vec2 lightmap;
layout(location = 0) out vec4 colortex0Out;
layout(location = 1) out vec4 colortex1Out;
layout(location = 2) out vec4 colortex2Out;
layout(location = 3) out vec4 colortex3Out;
layout(location = 4) out vec4 colortex4Out;
layout(location = 5) out vec4 colortex5Out;
void main(){
vec4 albedo = texture(tex, texcoord) * color;
if (albedo.a < 0.004) discard;
colortex0Out = vec4(albedo.rgb, albedo.r > 0.5 ? 1.0 : 0.0);
colortex1Out = vec4(EncodeNormal(worldNormal), EncodeNormal(vertexNormal));
colortex2Out = vec4(0.0, 0.0, 0.0, 6.0 / 255.0);
colortex3Out = vec4(lightmap, 1.0, 1.0);
colortex4Out = vec4(0.0);
colortex5Out = vec4(0.0);
}