Skip to content

Commit 9584c62

Browse files
committed
Fix wgsl build error (rerun-io#8377)
1 parent af3312a commit 9584c62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/viewer/re_renderer/shader/point_cloud.wgsl

+3-3
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)