Add Bloom effect to post-processing and update color space in scene rendering
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { EffectComposer, N8AO, Outline } from "@react-three/postprocessing";
|
import { Bloom, EffectComposer, N8AO, Outline } from "@react-three/postprocessing";
|
||||||
import { BlendFunction } from "postprocessing";
|
import { BlendFunction } from "postprocessing";
|
||||||
import {
|
import {
|
||||||
useDeletableFloorItem,
|
useDeletableFloorItem,
|
||||||
@@ -77,6 +77,12 @@ export default function PostProcessing() {
|
|||||||
denoiseRadius={6}
|
denoiseRadius={6}
|
||||||
denoiseSamples={16}
|
denoiseSamples={16}
|
||||||
/>
|
/>
|
||||||
|
<Bloom
|
||||||
|
intensity={0.1}
|
||||||
|
luminanceThreshold={0.9}
|
||||||
|
luminanceSmoothing={0.025}
|
||||||
|
mipmapBlur={false}
|
||||||
|
/>
|
||||||
{selectedWallAsset && (
|
{selectedWallAsset && (
|
||||||
<Outline
|
<Outline
|
||||||
selection={flattenChildren(selectedWallAsset.children)}
|
selection={flattenChildren(selectedWallAsset.children)}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { useParams } from "react-router-dom";
|
|||||||
import { getAllProjects } from "../../services/dashboard/getAllProjects";
|
import { getAllProjects } from "../../services/dashboard/getAllProjects";
|
||||||
import { getUserData } from "../../functions/getUserData";
|
import { getUserData } from "../../functions/getUserData";
|
||||||
import { useLoadingProgress, useSocketStore } from "../../store/builder/store";
|
import { useLoadingProgress, useSocketStore } from "../../store/builder/store";
|
||||||
import { Color } from "three";
|
import { Color, SRGBColorSpace } from "three";
|
||||||
|
|
||||||
export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Comparison Layout' }) {
|
export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Comparison Layout' }) {
|
||||||
const map = useMemo(() => [
|
const map = useMemo(() => [
|
||||||
@@ -67,7 +67,7 @@ export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Co
|
|||||||
onCreated={(e) => {
|
onCreated={(e) => {
|
||||||
e.scene.background = layout === 'Main Layout' ? null : new Color(0x19191d);
|
e.scene.background = layout === 'Main Layout' ? null : new Color(0x19191d);
|
||||||
}}
|
}}
|
||||||
gl={{ powerPreference: "high-performance", antialias: true, preserveDrawingBuffer: true }}
|
gl={{ outputColorSpace: SRGBColorSpace, powerPreference: "high-performance", antialias: true, preserveDrawingBuffer: true }}
|
||||||
>
|
>
|
||||||
<Setup />
|
<Setup />
|
||||||
<Collaboration />
|
<Collaboration />
|
||||||
@@ -77,4 +77,4 @@ export default function Scene({ layout }: { readonly layout: 'Main Layout' | 'Co
|
|||||||
</Canvas>
|
</Canvas>
|
||||||
</KeyboardControls>
|
</KeyboardControls>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user