Initial commit: Minecraft 光追着色器包(从零实现的 path tracing)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// MinecraftPT — Vanilla Composite helpers
|
||||
// Sky/cloud colors approximating vanilla for transitions and fog.
|
||||
|
||||
#ifndef VANILLA_COMPOSITE_GLSL
|
||||
#define VANILLA_COMPOSITE_GLSL
|
||||
|
||||
vec3 GetVanillaSkyColor(vec3 dir){
|
||||
vec3 skyColor = vec3(0.6, 0.8, 1.0);
|
||||
float horizon = exp(-max(dir.y, 0.0) * 3.0);
|
||||
return mix(skyColor * 0.3, skyColor, 1.0 - horizon);
|
||||
}
|
||||
|
||||
vec3 GetVanillaFogColor(vec3 skyColor, float nightFactor){
|
||||
return mix(skyColor, skyColor * vec3(0.2, 0.25, 0.4), nightFactor);
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user