From 82218726163775c6819636826ca8f5a885cb12c4 Mon Sep 17 00:00:00 2001 From: prospanclaudebot Date: Fri, 10 Jul 2026 23:16:03 +0000 Subject: земля: увеличил scale процедурного шума (частоты /2) по фидбеку MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- serve/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'serve') diff --git a/serve/index.html b/serve/index.html index 2bf24fc..46b6c60 100644 --- a/serve/index.html +++ b/serve/index.html @@ -1268,10 +1268,10 @@ terrainMat.onBeforeCompile = (sh) => { 'float h21T(vec2 p){ return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453); }\n' + 'float vnT(vec2 p){ vec2 i=floor(p),f=fract(p); f=f*f*(3.0-2.0*f); return mix(mix(h21T(i),h21T(i+vec2(1.0,0.0)),f.x),mix(h21T(i+vec2(0.0,1.0)),h21T(i+vec2(1.0,1.0)),f.x),f.y); }\n' + 'float fbmT(vec2 p){ float a=0.5,s=0.0; for(int i=0;i<4;i++){ s+=a*vnT(p); p=p*2.03+17.1; a*=0.5; } return s; }\n') - .replace('#include ', '#include \n diffuseColor.rgb *= 0.9 + 0.18*fbmT(vWPosT.xz*0.6);') - .replace('#include ', '#include \n roughnessFactor *= 0.5 + 0.65*fbmT(vWPosT.xz*0.32);') + .replace('#include ', '#include \n diffuseColor.rgb *= 0.9 + 0.18*fbmT(vWPosT.xz*0.3);') + .replace('#include ', '#include \n roughnessFactor *= 0.5 + 0.65*fbmT(vWPosT.xz*0.16);') .replace('#include ', '#include \n' + - ' { float hh=fbmT(vWPosT.xz*0.30); vec2 dH=vec2(dFdx(hh),dFdy(hh))*5.5;' + + ' { float hh=fbmT(vWPosT.xz*0.15); vec2 dH=vec2(dFdx(hh),dFdy(hh))*5.5;' + ' vec3 Sx=dFdx(-vViewPosition), Sy=dFdy(-vViewPosition);' + ' vec3 R1=cross(Sy,normal), R2=cross(normal,Sx); float det=dot(Sx,R1);' + ' vec3 grad=sign(det)*(dH.x*R1+dH.y*R2); normal=normalize(abs(det)*normal-grad); }'); -- cgit v1.2.3