diff options
| author | prospanclaudebot <[email protected]> | 2026-07-11 01:31:53 +0000 |
|---|---|---|
| committer | prospanclaudebot <[email protected]> | 2026-07-11 01:31:53 +0000 |
| commit | 499266fb5d1da142450280575702153740e14cfb (patch) | |
| tree | b31efa72596a3c3c36663722b70ef3aeab63f308 /serve/index.html | |
| parent | 25b91d080426d81cb7dfbe88bee3cefa347f3ea2 (diff) | |
| download | planeta-zhopa-499266fb5d1da142450280575702153740e14cfb.tar.gz planeta-zhopa-499266fb5d1da142450280575702153740e14cfb.zip | |
carrier: 🌭 палуба без зернистости — только асфальт(rough 0.8) + лужи(rough 0.1)
Diffstat (limited to 'serve/index.html')
| -rw-r--r-- | serve/index.html | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/serve/index.html b/serve/index.html index 69725c6..8041504 100644 --- a/serve/index.html +++ b/serve/index.html @@ -1788,9 +1788,7 @@ function rcTick() { .replace('#include <begin_vertex>', '#include <begin_vertex>\n vWPd=(modelMatrix*vec4(transformed,1.0)).xyz;'); sh.fragmentShader = sh.fragmentShader .replace('#include <common>', '#include <common>\nvarying vec3 vWPd;\nuniform sampler2D uNoise;\nfloat nzd(vec2 p){return texture2D(uNoise,p*0.00390625).r;}\nfloat fbd(vec2 p){float a=0.5,s=0.0;for(int i=0;i<3;i++){s+=a*nzd(p);p=p*2.03+7.0;a*=0.5;}return s;}') - .replace('#include <color_fragment>', '#include <color_fragment>\n diffuseColor.rgb *= 0.72 + 0.55*fbd(vWPd.xz*3.0); diffuseColor.rgb += (fbd(vWPd.xz*9.0)-0.5)*0.05;') - .replace('#include <roughnessmap_fragment>', '#include <roughnessmap_fragment>\n float wet=smoothstep(0.4,0.6,fbd(vWPd.xz*0.5)); roughnessFactor = mix(0.6, 0.12, wet) + (fbd(vWPd.xz*6.0)-0.5)*0.08;') - .replace('#include <normal_fragment_maps>', '#include <normal_fragment_maps>\n { float h=fbd(vWPd.xz*3.5); vec2 dH=vec2(dFdx(h),dFdy(h))*2.2; vec3 Sx=dFdx(-vViewPosition),Sy=dFdy(-vViewPosition); vec3 R1=cross(Sy,normal),R2=cross(normal,Sx); float dtn=dot(Sx,R1); vec3 gr=sign(dtn)*(dH.x*R1+dH.y*R2); normal=normalize(abs(dtn)*normal-gr); }'); + .replace('#include <roughnessmap_fragment>', '#include <roughnessmap_fragment>\n float wet=smoothstep(0.42,0.58,fbd(vWPd.xz*0.5)); roughnessFactor = mix(0.8, 0.1, wet);'); // только асфальт(0.8) + лужи(0.1) }; const lineMat = new THREE.MeshStandardMaterial({ color: 0xe0e0e0, roughness: 0.5, emissive: 0x1a1a1a }); const LEN = 320, WID = 84; |
