File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -280,13 +280,11 @@ impl CascadeShadowConfig {
280280 ) -> Self {
281281 assert ! (
282282 num_cascades > 0 ,
283- "num_cascades must be positive, but was {}" ,
284- num_cascades
283+ "num_cascades must be positive, but was {num_cascades}" ,
285284 ) ;
286285 assert ! (
287286 ( 0.0 ..1.0 ) . contains( & overlap_proportion) ,
288- "overlap_proportion must be in [0.0, 1.0) but was {}" ,
289- overlap_proportion
287+ "overlap_proportion must be in [0.0, 1.0) but was {overlap_proportion}" ,
290288 ) ;
291289 Self {
292290 bounds : calculate_cascade_bounds ( num_cascades, nearest_bound, shadow_maximum_distance) ,
@@ -397,8 +395,8 @@ fn calculate_cascade(
397395 z_near : f32 ,
398396 z_far : f32 ,
399397) -> Cascade {
400- debug_assert ! ( z_near <= 0.0 , "z_near {} must be <= 0.0" , z_near ) ;
401- debug_assert ! ( z_far <= 0.0 , "z_far {} must be <= 0.0" , z_far ) ;
398+ debug_assert ! ( z_near <= 0.0 , "z_near {z_near } must be <= 0.0" ) ;
399+ debug_assert ! ( z_far <= 0.0 , "z_far {z_far } must be <= 0.0" ) ;
402400 // NOTE: This whole function is very sensitive to floating point precision and instability and
403401 // has followed instructions to avoid view dependence from the section on cascade shadow maps in
404402 // Eric Lengyel's Foundations of Game Engine Development 2: Rendering. Be very careful when
You can’t perform that action at this time.
0 commit comments