Skip to content

Commit

Permalink
Disable frustum culling for instanced bullets and asteroids
Browse files Browse the repository at this point in the history
  • Loading branch information
jure committed Jul 8, 2023
1 parent d20071f commit 7a4b253
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/demo/src/entities/Asteroids.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Asteroids = () => {
const rand = InstanceRNG()

return (
<InstancedParticles capacity={20000}>
<InstancedParticles capacity={20000} frustumCulled={false}>
<icosahedronGeometry />

<Composable.MeshStandardMaterial metalness={0.1} roughness={0.8}>
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/entities/Bullets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const players = ECS.world.with("isPlayer")
const bullets = ECS.world.with("isBullet")

export const Bullets = () => (
<InstancedParticles>
<InstancedParticles frustumCulled={false}>
<planeGeometry args={[0.15, 0.5]} />
<meshStandardMaterial color={new Color("orange").multiplyScalar(5)} />

Expand Down

0 comments on commit 7a4b253

Please sign in to comment.