 	if (params.ray_from == 0) {
 		light_total = vec3(0.0);
 	} else {
-		light_total = imageLoad(bounce_accum, ivec3(atlas_pos, params.atlas_slice)).rgb;
+		vec4 accum = imageLoad(bounce_accum, ivec3(atlas_pos, params.atlas_slice));
+		light_total = accum.rgb;
+		active_rays += accum.a;
 	}
 
 	light_total += light_average;

		out float r_distance, out vec3 r_normal
#endif
) {
	/* world coords */

	vec3 rel = p_to - p_from;

			vec4(0.0, 0.0, 0.0, 1.0));
#endif
	vec3 light_average = vec3(0.0);
	float active_rays = 0.0;
	for (uint i = params.ray_from; i < params.ray_to; i++) {
		vec3 ray_dir = normal_mat * vogel_hemisphere(i, params.ray_count, quick_hash(vec2(atlas_pos)));

