Skip to content

Commit

Permalink
fix: make WebGPU shader work again (#12683)
Browse files Browse the repository at this point in the history
# Objective

- Fixes WebGPU UI shader.

<img width="505" alt="image"
src="https://github.com/bevyengine/bevy/assets/106191044/0ae30234-0aae-4f02-95f2-dfb3657d8e67">


## Solution

- Renames a variable to avoid naming conflict.
  • Loading branch information
pietrosophya committed Mar 24, 2024
1 parent 9e09707 commit 99d9cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/render/ui.wgsl
Expand Up @@ -113,9 +113,9 @@ fn sd_inset_rounded_box(point: vec2<f32>, size: vec2<f32>, radius: vec4<f32>, in
r.w = r.w - max(inset.x, inset.w);

let half_size = inner_size * 0.5;
let min = min(half_size.x, half_size.y);
let min_size = min(half_size.x, half_size.y);

r = min(max(r, vec4(0.0)), vec4<f32>(min));
r = min(max(r, vec4(0.0)), vec4<f32>(min_size));

return sd_rounded_box(inner_point, inner_size, r);
}
Expand Down

0 comments on commit 99d9cc1

Please sign in to comment.