bevyengine / bevyengine/bevy

FogVolume floats around when the camera moves

Open
#19,934 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

0.16.1

## Relevant system information

If you cannot get Bevy to build or run on your machine, please include:

- cargo 1.88.0 (873a06493 2025-05-10)
- iOS 15.1 (24B2083)

`AdapterInfo { name: "Apple M4 Pro", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }`

## What you did

The two cuboids should be next to each other. Set the camera FOV to `0.1` to see the effect more
```rs
commands.spawn((
Mesh3d(meshes.add(Mesh::from(Cuboid::new(1.0, 1.0, 1.0).mesh()))),
Transform::from_scale(Vec3::splat(128.0)).with_translation(Vec3::new(192.0, 64.0, -128.0)),
MeshMaterial3d(materials.add(Color::srgb(1.0, 0.0, 0.0))),
));
commands.spawn((
FogVolume {
//density_texture: Some(noise_texture),
density_factor: 0.05,
..default()
},
Transform::from_scale(Vec3::splat(128.0)).with_translation(Vec3::new(64.0, 64.0, -128.0)),
));
```

## What went wrong

- what were you expecting?
- There should be two cubes next to each other in the same pos no matter if the camera moves or not
- what actually happened?
- The fog volume moves around while the camera moves around

## Additional information

https://github.com/user-attachments/assets/ba835e37-9b8e-4414-978d-8755a1584f46

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.