Skip to content

Commit

Permalink
fix: frustrum culling
Browse files Browse the repository at this point in the history
  • Loading branch information
Cygnusfear committed Oct 16, 2023
1 parent c74e560 commit 1d7a107
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/client/src/game/entities/background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MeshStandardMaterial } from "three";
function Background() {
return (
<group>
<Environment preset="forest" />
<Environment preset="forest" far={50} />
<Clouds material={MeshStandardMaterial}>
<Cloud
bounds={[200, 10, 200]}
Expand All @@ -14,6 +14,7 @@ function Background() {
position={[0, -2, 0]}
fade={120}
opacity={0.09}
frustumCulled={false}
/>
<Cloud
bounds={[100, 2, 100]}
Expand All @@ -26,6 +27,7 @@ function Background() {
opacity={0.3}
speed={0.02}
concentrate={"inside"}
frustumCulled={false}
/>
</Clouds>
</group>
Expand Down
1 change: 1 addition & 0 deletions packages/client/src/game/entities/plants/plantInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function PlantInstance(props: IFacility) {
position={position}
scale={[scales[index], scales[index], scales[index]]}
rotation={rotations[index]}
frustumCulled={false}
/>
);
})}
Expand Down
1 change: 1 addition & 0 deletions packages/client/src/game/entities/plants/vineInstance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export function VineInstance(facilityProps: IFacility) {
scale={props.scales}
rotation={props.rotations[i]}
visible={i < amt}
frustumCulled={false}
/>
);
})}
Expand Down

0 comments on commit 1d7a107

Please sign in to comment.