Sectional color grading gives the shadows→midtones blend to the highlights, a hard step at level 0.1
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 92/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- computer-graphics
Línea de trabajo
Lee sectional_color_grading en crates/bevy_core_pipeline/src/tonemapping.wesl, especialmente la rama de sombras a medios tonos identificada en el informe. Comprueba cómo cambian sus tres pesos de sección a lo largo de la banda de transición y compáralos con la rama siguiente, de medios tonos a altas luces. La tarea estará terminada cuando la mezcla de sombras a medios tonos asigne el peso restante a las sombras y se elimine el salto brusco señalado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bevy version and features
- 0.20.0, default features. The same code is on
mainat 526f9e4.
[Optional] Relevant system information
- macOS 26 (Darwin 25.6), Apple M1 Pro, Metal. This is a logic bug in the shader, so it should not depend on the platform.
What you did
I graded the shadows and midtones of a camera and left the highlights at their defaults:
let section = ColorGradingSection { gain: 1.12, gamma: 0.74, ..default() };
let grading = ColorGrading {
global: ColorGradingGlobal::default(), // midtones_range: 0.2..0.7
shadows: section,
midtones: section,
highlights: ColorGradingSection::default(),
};
Then I looked at a smooth gradient whose brightness passes 0.1 (mean linear RGB before tone mapping). In my case this was the sky round the sun just after sunset with Atmosphere. Any smooth gradient over that brightness shows it.
What went wrong
- Expected: the grade fades smoothly from the shadows' setting into the midtones', as the comment in
sectional_color_gradingsays ("blend between the two to avoid sharp color discontinuities"). - Actual: there is a hard step along the contour where the level is 0.1. Below it the full shadows grade applies. Just above it the highlights grade applies, which here means no grade. In my scene this drew a sharp pale ellipse round the dusk glow. Adjacent rows read sRGB (77, 60, 60) and (99, 83, 83).
The cause is in sectional_color_grading in crates/bevy_core_pipeline/src/tonemapping.wesl:
} else if (level < midtone_range.x + LEVEL_MARGIN) {
levels.y = ((level - midtone_range.x) * LEVEL_MARGIN_DIV) + 0.5;
levels.z = 1.0 - levels.y; // gives the rest to the highlights
In the shadows-to-midtones band the weight the midtones don't take goes to levels.z (highlights) instead of levels.x (shadows). At the bottom of the band (level = midtone_range.x - LEVEL_MARGIN) the weights jump from (1, 0, 0) to (0, 0, 1). The midtones-to-highlights branch below it is correct.
The fix is one line:
levels.x = 1.0 - levels.y;
The step is visible with any setting where the shadows differ from the highlights (contrast, gain, gamma, lift, saturation). The color_grading example probably hides it because its scene has few colours near a level of 0.1.
Additional information
Workaround: if the shadows and midtones can share one ColorGradingSection, start midtones_range below -LEVEL_MARGIN, for example -0.2..0.7, so no colour falls in the broken band. With that change our dusk sky grades smoothly.
- Lenguaje dominante
- Rust
- Estrellas
- 49.5k
- Forks
- 5k
- Merge medio
- 5 d 11 h
- PR fusionados (30 d)
- 138
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bevyengine/bevy
-
Feathers list box scrollbar has gutter padding on the wrong sidePosiblemente ocupada @Tatsuya0330 la tomó hace 2 días. AbiertoA-UI C-Bug D-Trivial S-Needs-Review
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
bevyengine/bevy#26447 ·
Los mantenedores suelen responder en 2 días
-
A-UI C-Bug D-Modest S-Needs-Design
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bevyengine/bevy#26445 ·
Los mantenedores suelen responder en 2 días
-
A-UI C-Bug D-Modest S-Ready-For-Implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bevyengine/bevy#26444 ·
Los mantenedores suelen responder en 2 días
-
Focus outlines should not be pickablePosiblemente ocupada @Aravind-Sathesh la tomó hace 1 día. AbiertoA-Picking A-UI C-Bug D-Trivial S-Needs-Review
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
bevyengine/bevy#26435 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Mention `asset_value` helper in `bsn!` macro docs.Posiblemente ocupada @darshpatel1052 la tomó hace 6 días. AbiertoA-Scenes C-Docs D-Straightforward S-Ready-For-Implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bevyengine/bevy#26406 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 2 días
Todos los issues de bevyengine/bevy
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
bytecodealliance/rustix#1736 ·
Los mantenedores suelen responder en 1 día
-
area:models enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
fix v1 repository metadataAbiertogood first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
servo/rust-smallvec#864 ·
-
bug frontend ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día