bevyengine / bevyengine/bevy

Transparent meshes with nothing opaque behind it don't render parts of it when below sea level with Atmosphere on

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

Description

## Bevy version

0.16

## \[Optional\] Relevant system information

```
2025-05-08T13:05:41.667733Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 4060 Ti", vendor: 4318, device: 10243, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "565.77", backend: Vulkan }
```

## What you did

```rust
use bevy::{
color::palettes,
core_pipeline::bloom::Bloom,
pbr::{Atmosphere, AtmosphereSettings},
prelude::*,
};

fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, setup)
.add_systems(Update, bob)
.run();
}

fn setup(
mut commands: Commands,
mut meshes: ResMut>,
mut materials: ResMut>,
) {
commands.spawn((
Camera3d::default(),
Camera {
hdr: true,
..Default::default()
},
Atmosphere::EARTH,
AtmosphereSettings::default(),
Bloom::NATURAL,
Transform::from_xyz(2.5, 0., 10.).looking_at(Vec3::new(2.5, 0., 0.), Vec3::Y),
));

commands.spawn((
DirectionalLight::default(),
Transform::from_xyz(0., 5., 0.).looking_at(Vec3::ZERO, Vec3::NEG_Z),
));

commands.spawn((
Mesh3d(meshes.add(Plane3d::new(Vec3::Y, Vec2::splat(5.)))),
MeshMaterial3d(materials.add(Color::from(palettes::tailwind::BLUE_400).with_alpha(0.5))),
Transform::from_xyz(0., -3., 0.),
));
commands.spawn((
Mesh3d(meshes.add(Plane3d::new(Vec3::Y, Vec2::splat(5.)))),
MeshMaterial3d(materials.add(Color::from(palettes::tailwind::GREEN_800))),
Transform::from_xyz(0., -4., 0.),
));
commands.spawn((
Mesh3d(meshes.add(Cuboid::new(1., 5., 1.).mesh().build())),
MeshMaterial3d(materials.add(Color::WHITE)),
Transform::from_xyz(2.5, -5., -5.),
));
}

fn bob(mut camera: Single<&mut Transform, With>, time: Res

## What went wrong

Parts of the transparent mesh don't render when below sea level (Y<0) with Atmosphere on

## Additional information

![Image](https://github.com/user-attachments/assets/5c97504f-b840-4b9d-b732-8b31e4cb4095)

![Image](https://github.com/user-attachments/assets/d816a0a3-8cc1-4aea-be3a-90b44a0a3263)

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.