Skip to content

Commit 3b13f86

Browse files
committed
bevy_pbr: Fix point light count in CLUSTERED_FORWARD_DEBUG_CLUSTER_LIGHT_COMPLEXITY
1 parent 04c6124 commit 3b13f86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/bevy_pbr/src/render/pbr.wgsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,9 @@ fn fragment(in: FragmentInput) -> [[location(0)]] vec4<f32> {
635635
let cluster_overlay_alpha = 0.1;
636636
let max_light_complexity_per_cluster = 64.0;
637637
output_color.r = (1.0 - cluster_overlay_alpha) * output_color.r
638-
+ cluster_overlay_alpha * smoothStep(0.0, max_light_complexity_per_cluster, f32(offset_and_count.count));
638+
+ cluster_overlay_alpha * smoothStep(0.0, max_light_complexity_per_cluster, f32(offset_and_count[1]));
639639
output_color.g = (1.0 - cluster_overlay_alpha) * output_color.g
640-
+ cluster_overlay_alpha * (1.0 - smoothStep(0.0, max_light_complexity_per_cluster, f32(offset_and_count.count)));
640+
+ cluster_overlay_alpha * (1.0 - smoothStep(0.0, max_light_complexity_per_cluster, f32(offset_and_count[1])));
641641
#endif // CLUSTERED_FORWARD_DEBUG_CLUSTER_LIGHT_COMPLEXITY
642642
#ifdef CLUSTERED_FORWARD_DEBUG_CLUSTER_COHERENCY
643643
// NOTE: Visualizes the cluster to which the fragment belongs

0 commit comments

Comments
 (0)