Skip to content

Commit 6839571

Browse files
Preconvert colors to sRGB
1 parent 171a716 commit 6839571

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

crates/bevy_ui/src/render/gradient.wgsl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ fn fragment(in: GradientVertexOutput) -> @location(0) vec4<f32> {
117117
// Mix colors in sRGB space and convert back to linear for GPU output
118118
fn mix_srgb_colors(a: vec4<f32>, b: vec4<f32>, t: f32) -> vec4<f32> {
119119
let mixed_srgb = mix(a, b, t);
120-
// Convert from sRGB back to linear RGB for GPU output
121120
return vec4(pow(mixed_srgb.rgb, vec3(2.2)), mixed_srgb.a);
122121
}
123122

0 commit comments

Comments
 (0)