feat: add godrays
This commit is contained in:
+14
-1
@@ -28,7 +28,8 @@ import {
|
|||||||
Noise,
|
Noise,
|
||||||
Pixelation,
|
Pixelation,
|
||||||
Vignette,
|
Vignette,
|
||||||
DepthOfField
|
DepthOfField,
|
||||||
|
GodRays
|
||||||
} from '@react-three/postprocessing';
|
} from '@react-three/postprocessing';
|
||||||
|
|
||||||
interface Shader {
|
interface Shader {
|
||||||
@@ -618,6 +619,18 @@ export default function Home() {
|
|||||||
luminanceThreshold={0.5}
|
luminanceThreshold={0.5}
|
||||||
luminanceSmoothing={0.1}
|
luminanceSmoothing={0.1}
|
||||||
/>
|
/>
|
||||||
|
{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 />
|
||||||
|
|||||||
Reference in New Issue
Block a user