style: misc cleanup

This commit is contained in:
neru
2026-01-02 03:51:45 -03:00
parent 57c064ea00
commit f0a0e188fc
2 changed files with 1 additions and 36 deletions
+1 -31
View File
@@ -614,23 +614,6 @@ const SealCube = forwardRef<Mesh>((props, ref) => {
SealCube.displayName = 'SealCube'; SealCube.displayName = 'SealCube';
export default function Home() { export default function Home() {
// const { chunks, chunkSize, chunkRes, terrainScale, hillScale, hillHeight, detailScale, detailHeight, wireframe, grassCount, grassSize, grassLOD } = useControls(
// {
// chunks: 8,
// chunkSize: 10,
// chunkRes: { value: 8, min: 2, max: 64, step: 1 },
// terrainScale: 1,
// hillScale: 0.1,
// hillHeight: 6.0,
// detailScale: 1.0,
// detailHeight: 0.1,
// wireframe: false,
// grassCount: { value: 6000, min: 0, max: 10000, step: 100 },
// grassSize: { value: 0.6, min: 0.01, max: 1.0, step: 0.01 },
// grassLOD: { value: 40, min: 10, max: 100, step: 5, label: 'Grass LOD Distance' },
// }
// );
const [sealMesh, setSealMesh] = useState<Mesh | null>(null); const [sealMesh, setSealMesh] = useState<Mesh | null>(null);
return ( return (
@@ -651,20 +634,7 @@ export default function Home() {
/> />
<SMAA /> <SMAA />
{/* {sealMesh ? (
<GodRays
sun={sealMesh}
samples={16}
density={1}
decay={0.99}
weight={0.1}
exposure={0.2}
clampMax={1}
blur={true}
/>
) : (
<></>
)} */}
</EffectComposer> </EffectComposer>
<Environment files={'hdr/sky.hdr'} environmentIntensity={1} background /> <Environment files={'hdr/sky.hdr'} environmentIntensity={1} background />
-5
View File
@@ -1,17 +1,12 @@
// Fake Ambient Occlusion
// Darken root (vGrassUv.y near 0) substantially
float ao = smoothstep(0.0, 0.4, vGrassUv.y); float ao = smoothstep(0.0, 0.4, vGrassUv.y);
ao = mix(0.2, 1.0, ao); // Roots are 20% brightness ao = mix(0.2, 1.0, ao); // Roots are 20% brightness
// Base mixing
vec3 rootColor = diffuseColor.rgb * 0.4; vec3 rootColor = diffuseColor.rgb * 0.4;
vec3 tipColor = diffuseColor.rgb * 1.3 + vec3(0.1, 0.1, 0.0); vec3 tipColor = diffuseColor.rgb * 1.3 + vec3(0.1, 0.1, 0.0);
vec3 grassColor = mix(rootColor, tipColor, vGrassUv.y); vec3 grassColor = mix(rootColor, tipColor, vGrassUv.y);
grassColor *= ao; grassColor *= ao;
// Fake Translucency / Backlighting (Simple rim light effect)
// Simulating light passing through blades
float translucency = pow(vGrassUv.y, 2.0) * 0.5; float translucency = pow(vGrassUv.y, 2.0) * 0.5;
grassColor += vec3(0.1, 0.2, 0.0) * translucency; grassColor += vec3(0.1, 0.2, 0.0) * translucency;