Unveränderter Ausgangsstand inklusive Masterprompt und Konzeptbildern unter assets/. .godot/ und docs/screenshots/ bleiben laut .gitignore unversioniert; letztere sind unter ../backups gesichert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
948 B
Text
22 lines
948 B
Text
shader_type spatial;
|
|
render_mode diffuse_burley, specular_schlick_ggx;
|
|
varying vec3 world;
|
|
float hash(vec2 p) { return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453); }
|
|
float noise(vec2 p) {
|
|
vec2 i=floor(p),f=fract(p); f=f*f*(3.0-2.0*f);
|
|
return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+vec2(1,1)),f.x),f.y);
|
|
}
|
|
void vertex() {
|
|
world=(MODEL_MATRIX*vec4(VERTEX,1.0)).xyz;
|
|
}
|
|
void fragment() {
|
|
vec2 flow=world.xz*.75+vec2(TIME*.037,-TIME*.075);
|
|
float waves=noise(flow)*.6+noise(flow*2.13+vec2(-TIME*.06,0))*.3+noise(flow*4.17)*.1;
|
|
float fresnel=pow(1.0-clamp(dot(normalize(NORMAL),normalize(VIEW)),0.0,1.0),4.0);
|
|
ALBEDO=mix(vec3(.022,.094,.098),vec3(.042,.145,.15),waves)+vec3(.045,.07,.075)*fresnel;
|
|
ROUGHNESS=.32;
|
|
METALLIC=.18;
|
|
vec3 n=NORMAL,dx=dFdx(VERTEX),dy=dFdy(VERTEX);
|
|
vec3 rx=cross(dy,n),ry=cross(n,dx);float det=dot(dx,rx);
|
|
NORMAL=normalize(abs(det)*n-sign(det)*(dFdx(waves)*rx+dFdy(waves)*ry)*.055);
|
|
}
|