ContrastAdaptiveSharpening fails on WebGL2: its 4-byte uniform isn't padded to 16 bytes
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust, wasm
- Área
- computer-graphics
Línea de trabajo
Empieza con CasUniform en crates/bevy_anti_alias/src/contrast_adaptive_sharpening/mod.rs y con la struct CASUniforms en robust_contrast_adaptive_sharpening.wesl. Copia el patrón de padding de WebGL2 que usa SkyboxUniforms (los campos _webgl2_padding_*b detrás del mismo cfg) y refléjalo en la struct del shader. Está terminado cuando el pipeline de CAS compila en un build wasm32 con WebGL2 sin el error de validación de alineación de 16 bytes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bevy version and features
- 0.20.1.
CasUniformis unchanged onmain. default-features = false, features2d,3d,ui(which pull inwebgl2), built forwasm32-unknown-unknown.
[Optional] Relevant system information
- Rust 1.97.1, Chromium 156 on Linux.
AdapterInfo { name: "ANGLE (AMD, AMD Radeon RX 6650 XT (radeonsi navi23 ACO), OpenGL ES 3.2)", vendor: 4098, device: 0, device_type: Other, driver_info: "WebGL 2.0 (OpenGL ES 3.0 Chromium)", backend: Gl, .. }
What you did
Added ContrastAdaptiveSharpening::default() to a camera in a WebGL2 build.
What went wrong
Expected: the camera's output is sharpened, as it is natively.
Actual: creating the CAS pipeline fails validation, and Bevy quits:
Caught rendering error: Validation Error
Caused by:
In Device::create_render_pipeline, label = 'contrast_adaptive_sharpening'
In the provided shader, the type given for group 0 binding 2 has a size of 4. As the device does not support `DownlevelFlags::BUFFER_BINDINGS_NOT_16_BYTE_ALIGNED`, the type must have a size that is a multiple of 16 bytes.
Caught rendering error: Validation Error
Caused by:
In a CommandEncoder ...
In a set_pipeline command
RenderPipeline with 'contrast_adaptive_sharpening' label is invalid
Quitting the application due to Validation RenderError
Additional information
CasUniform (crates/bevy_anti_alias/src/contrast_adaptive_sharpening/mod.rs) and CASUniforms in robust_contrast_adaptive_sharpening.wesl hold a single f32. Other uniforms are padded for WebGL2 behind cfg(all(feature = "webgl", target_arch = "wasm32", not(feature = "webgpu"))); SkyboxUniforms is one example, with its _webgl2_padding_*b fields. The same padding here, mirrored in the shader struct, should fix it.
Workaround: we run the same RCAS math in our own Material2d, with a vec4 uniform.
- Lenguaje dominante
- Rust
- Estrellas
- 49.8k
- Forks
- 5.1k
- Merge medio
- 3 d 4 h
- PR fusionados (30 d)
- 136
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
bevyengine/bevy#26642 ·
Los mantenedores suelen responder en 2 días
-
A-Animation AI-Assisted C-Bug D-Trivial S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bevyengine/bevy#26637 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bevyengine/bevy#26635 ·
Los mantenedores suelen responder en 2 días
-
Feathers checkbox outline should have flex_shrink: 0Posiblemente ocupada @Tatsuya0330 la tomó hoy. AbiertoC-Bug S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bevyengine/bevy#26630 ·
Los mantenedores suelen responder en 2 días
-
Remove full_ui testbedAbiertoA-UI C-Examples C-Refinement D-Straightforward S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
bevyengine/bevy#26584 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de bevyengine/bevy
Issues similares
-
go good first issue test
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
bug triaged tui ux wontfix
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día