feat: add LUT + CC
This commit is contained in:
+13
-2
@@ -28,6 +28,7 @@ import {
|
||||
MeshStandardMaterial,
|
||||
FogExp2
|
||||
} from 'three';
|
||||
import { LUTCubeLoader } from 'three/examples/jsm/loaders/LUTCubeLoader';
|
||||
|
||||
import './page.css';
|
||||
import { createNoise2D } from 'simplex-noise';
|
||||
@@ -39,11 +40,13 @@ import {
|
||||
Bloom,
|
||||
EffectComposer,
|
||||
Noise,
|
||||
Pixelation,
|
||||
Vignette,
|
||||
DepthOfField,
|
||||
GodRays,
|
||||
SMAA
|
||||
SMAA,
|
||||
HueSaturation,
|
||||
BrightnessContrast,
|
||||
LUT
|
||||
} from '@react-three/postprocessing';
|
||||
|
||||
interface Shader {
|
||||
@@ -633,6 +636,11 @@ function Loader() {
|
||||
);
|
||||
}
|
||||
|
||||
function LutEffect() {
|
||||
const lutTexture = useLoader(LUTCubeLoader, '/lut/Moody3.cube');
|
||||
return <LUT lut={lutTexture.texture3D} />;
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
const [sealMesh, setSealMesh] = useState<Mesh | null>(null);
|
||||
|
||||
@@ -655,6 +663,9 @@ export default function Home() {
|
||||
luminanceSmoothing={0.1}
|
||||
/>
|
||||
<SMAA />
|
||||
<HueSaturation saturation={0.3} />
|
||||
<BrightnessContrast brightness={0.1} contrast={-0.1} />
|
||||
<LutEffect />
|
||||
</EffectComposer>
|
||||
|
||||
<Environment
|
||||
|
||||
Reference in New Issue
Block a user