style: misc cleanup
This commit is contained in:
+1
-31
@@ -614,23 +614,6 @@ const SealCube = forwardRef<Mesh>((props, ref) => {
|
||||
SealCube.displayName = 'SealCube';
|
||||
|
||||
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);
|
||||
|
||||
return (
|
||||
@@ -651,20 +634,7 @@ export default function Home() {
|
||||
/>
|
||||
<SMAA />
|
||||
|
||||
{/* {sealMesh ? (
|
||||
<GodRays
|
||||
sun={sealMesh}
|
||||
samples={16}
|
||||
density={1}
|
||||
decay={0.99}
|
||||
weight={0.1}
|
||||
exposure={0.2}
|
||||
clampMax={1}
|
||||
blur={true}
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
)} */}
|
||||
|
||||
</EffectComposer>
|
||||
|
||||
<Environment files={'hdr/sky.hdr'} environmentIntensity={1} background />
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
// Fake Ambient Occlusion
|
||||
// Darken root (vGrassUv.y near 0) substantially
|
||||
float ao = smoothstep(0.0, 0.4, vGrassUv.y);
|
||||
ao = mix(0.2, 1.0, ao); // Roots are 20% brightness
|
||||
|
||||
// Base mixing
|
||||
vec3 rootColor = diffuseColor.rgb * 0.4;
|
||||
vec3 tipColor = diffuseColor.rgb * 1.3 + vec3(0.1, 0.1, 0.0);
|
||||
|
||||
vec3 grassColor = mix(rootColor, tipColor, vGrassUv.y);
|
||||
grassColor *= ao;
|
||||
|
||||
// Fake Translucency / Backlighting (Simple rim light effect)
|
||||
// Simulating light passing through blades
|
||||
float translucency = pow(vGrassUv.y, 2.0) * 0.5;
|
||||
grassColor += vec3(0.1, 0.2, 0.0) * translucency;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user