You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is in how the brightness is wrongly applied to the alpha channel, so the fix is the correct one; however your fix also makes it impossible to do transparent backgrouns when that is desired, because the alpha channel is now hardcoded to 1.
The following patch resolves that issue (not tested):
diff --git a/crates/bevy_core_pipeline/src/skybox/skybox.wgsl b/crates/bevy_core_pipeline/src/skybox/skybox.wgsl
index 593b440ee..37a66cfba 100644
--- a/crates/bevy_core_pipeline/src/skybox/skybox.wgsl+++ b/crates/bevy_core_pipeline/src/skybox/skybox.wgsl@@ -72,5 +72,5 @@ fn skybox_fragment(in: VertexOutput) -> @location(0) vec4<f32> {
let ray_direction = coords_to_ray_direction(in.position.xy, view.viewport);
// Cube maps are left-handed so we negate the z coordinate.
- return textureSample(skybox, skybox_sampler, ray_direction * vec3(1.0, 1.0, -1.0)) * uniforms.brightness;+ let out = textureSample(skybox, skybox_sampler, ray_direction * vec3(1.0, 1.0, -1.0));+ out.rgb *= uniforms.brightness;+ return out;
}
Bevy version
0.13.1, main
Relevant system information
What you did
wasm-server-runner
examples/3d/skybox.rs
to100.
.cargo run --example skybox --target=wasm32-unknown-unknown
body
:What went wrong
Page background can be seen through the skybox.
Additional information
The following patch seems to fix the problem, but I'm not sure if it's proper.
The text was updated successfully, but these errors were encountered: