1717#import bevy_pbr :: mesh_functions :: {get_world_from_local , mesh_position_local_to_clip }
1818#import bevy_pbr :: mesh_view_bindings :: {globals , lights , view , clusterable_objects }
1919#import bevy_pbr :: mesh_view_types :: {
20- DIRECTIONAL_LIGHT_FLAGS_VOLUMETRIC_BIT ,
21- POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT ,
20+ DIRECTIONAL_LIGHT_FLAGS_VOLUMETRIC_BIT ,
21+ POINT_LIGHT_FLAGS_SHADOWS_ENABLED_BIT ,
2222 POINT_LIGHT_FLAGS_VOLUMETRIC_BIT ,
2323 POINT_LIGHT_FLAGS_SPOT_LIGHT_Y_NEGATIVE ,
2424 ClusterableObject
2525}
2626#import bevy_pbr :: shadow_sampling :: {
27- sample_shadow_map_hardware ,
27+ sample_shadow_map_hardware ,
2828 sample_shadow_cubemap ,
2929 sample_shadow_map ,
3030 SPOT_SHADOW_TEXEL_SIZE
@@ -371,7 +371,7 @@ fn fragment(@builtin(position) position: vec4<f32>) -> @location(0) vec4<f32> {
371371 }
372372 local_light_attenuation *= spot_attenuation * shadow ;
373373 }
374-
374+
375375 // Calculate absorption (amount of light absorbed by the fog) and
376376 // out-scattering (amount of light the fog scattered away).
377377 let sample_attenuation = exp (- step_size_world * density * (absorption + scattering ));
@@ -381,7 +381,7 @@ fn fragment(@builtin(position) position: vec4<f32>) -> @location(0) vec4<f32> {
381381
382382 let light_attenuation = exp (- density * bounding_radius * (absorption + scattering ));
383383 let light_factors_per_step = fog_color * light_tint * light_attenuation *
384- scattering * density * step_size_world * light_intensity * 0 .1 ;
384+ scattering * density * step_size_world * light_intensity * exposure ;
385385
386386 // Modulate the factor we calculated above by the phase, fog color,
387387 // light color, light tint.
0 commit comments