Skip to content

Commit

Permalink
Fix skybox wrong alpha (#12888)
Browse files Browse the repository at this point in the history
Fix #12740
  • Loading branch information
JMS55 authored Apr 6, 2024
1 parent ac91b19 commit 9264850
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_core_pipeline/src/skybox/skybox.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ 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));
return vec4(out.rgb * uniforms.brightness, out.a);
}

0 comments on commit 9264850

Please sign in to comment.