1111//! | `A` / `S` | Decrease / Increase Thickness |
1212//! | `Z` / `X` | Decrease / Increase IOR |
1313//! | `E` / `R` | Decrease / Increase Perceptual Roughness |
14- //! | `U` / `I` | Decrease / Increase Reflectance |
14+ //! | `U` / `I` | Decrease / Increase Specular strength |
1515//! | Arrow Keys | Control Camera |
1616//! | `C` | Randomize Colors |
1717//! | `H` | Toggle HDR + Bloom |
@@ -226,14 +226,14 @@ fn setup(
226226 // Chessboard Plane
227227 let black_material = materials. add ( StandardMaterial {
228228 base_color : Color :: BLACK ,
229- reflectance : 0.3 ,
229+ specular : 0.85 ,
230230 perceptual_roughness : 0.8 ,
231231 ..default ( )
232232 } ) ;
233233
234234 let white_material = materials. add ( StandardMaterial {
235235 base_color : Color :: WHITE ,
236- reflectance : 0.3 ,
236+ specular : 0.85 ,
237237 perceptual_roughness : 0.8 ,
238238 ..default ( )
239239 } ) ;
@@ -264,7 +264,7 @@ fn setup(
264264 base_color : Color :: WHITE ,
265265 diffuse_transmission : 0.6 ,
266266 perceptual_roughness : 0.8 ,
267- reflectance : 1.0 ,
267+ specular_tint : Color :: linear_rgb ( 4.0 , 4.0 , 4.0 ) ,
268268 double_sided : true ,
269269 cull_mode : None ,
270270 ..default ( )
@@ -351,7 +351,7 @@ struct ExampleState {
351351 thickness : f32 ,
352352 ior : f32 ,
353353 perceptual_roughness : f32 ,
354- reflectance : f32 ,
354+ specular : f32 ,
355355 auto_camera : bool ,
356356}
357357
@@ -366,7 +366,7 @@ impl Default for ExampleState {
366366 thickness : 1.8 ,
367367 ior : 1.5 ,
368368 perceptual_roughness : 0.12 ,
369- reflectance : 0.5 ,
369+ specular : 1.0 ,
370370 auto_camera : true ,
371371 }
372372 }
@@ -417,9 +417,9 @@ fn example_control_system(
417417 }
418418
419419 if input. pressed ( KeyCode :: KeyI ) {
420- state. reflectance = ( state. reflectance + time. delta_secs ( ) ) . min ( 1.0 ) ;
420+ state. specular = ( state. specular + time. delta_secs ( ) ) . min ( 1.0 ) ;
421421 } else if input. pressed ( KeyCode :: KeyU ) {
422- state. reflectance = ( state. reflectance - time. delta_secs ( ) ) . max ( 0.0 ) ;
422+ state. specular = ( state. specular - time. delta_secs ( ) ) . max ( 0.0 ) ;
423423 }
424424
425425 if input. pressed ( KeyCode :: KeyR ) {
@@ -437,7 +437,7 @@ fn example_control_system(
437437 material. thickness = state. thickness ;
438438 material. ior = state. ior ;
439439 material. perceptual_roughness = state. perceptual_roughness ;
440- material. reflectance = state. reflectance ;
440+ material. specular = state. specular ;
441441 }
442442
443443 if controls. diffuse_transmission {
@@ -550,7 +550,7 @@ fn example_control_system(
550550 " A / S Thickness: {:.2}\n " ,
551551 " Z / X IOR: {:.2}\n " ,
552552 " E / R Perceptual Roughness: {:.2}\n " ,
553- " U / I Reflectance : {:.2}\n " ,
553+ " U / I Specular : {:.2}\n " ,
554554 " Arrow Keys Control Camera\n " ,
555555 " C Randomize Colors\n " ,
556556 " H HDR + Bloom: {}\n " ,
@@ -564,7 +564,7 @@ fn example_control_system(
564564 state. thickness,
565565 state. ior,
566566 state. perceptual_roughness,
567- state. reflectance ,
567+ state. specular ,
568568 if hdr { "ON " } else { "OFF" } ,
569569 if cfg!( any( feature = "webgpu" , not( target_arch = "wasm32" ) ) ) {
570570 if depth_prepass. is_some( ) {
0 commit comments