Skip to content

Commit 592c4aa

Browse files
authored
Fix wgsl build error (#9152)
1 parent ea8a894 commit 592c4aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/viewer/re_renderer/shader/point_cloud.wgsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ fn vs_main(@builtin(vertex_index) vertex_idx: u32) -> VertexOut {
131131
/// 2D primitives are always facing the camera - the difference to sphere_quad_coverage is that
132132
/// perspective projection is not taken into account.
133133
fn circle_quad_coverage(world_position: vec3f, radius: f32, circle_center: vec3f) -> f32 {
134-
let distance = distance(circle_center, world_position);
135-
let feathering_radius = fwidth(distance) * 0.5;
136-
return smoothstep(radius + feathering_radius, radius - feathering_radius, distance);
134+
let circle_distance = distance(circle_center, world_position);
135+
let feathering_radius = fwidth(circle_distance) * 0.5;
136+
return smoothstep(radius + feathering_radius, radius - feathering_radius, circle_distance);
137137
}
138138

139139
fn coverage(world_position: vec3f, radius: f32, point_center: vec3f) -> f32 {

0 commit comments

Comments
 (0)