Initial commit: Minecraft 光追着色器包(从零实现的 path tracing)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// MinecraftPT — Ripple
|
||||
// Rain-induced ripple normal map for water surfaces.
|
||||
|
||||
#ifndef RIPPLE_GLSL
|
||||
uniform sampler2D ripple2D;
|
||||
#define RIPPLE_GLSL
|
||||
|
||||
vec2 GetRippleNormal(vec3 worldPos, float time){
|
||||
vec2 coord = worldPos.xz * 0.1;
|
||||
vec2 ripple = textureLod(ripple2D, fract(coord + time * 0.02), 0.0).rg;
|
||||
return ripple * 2.0 - 1.0;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user