22
33use serde:: { Deserialize , Serialize } ;
44
5- use crate :: reflection_probes :: specular :: MAX_LOCAL_PROBES ;
5+ use crate :: render_contract :: MAX_LOCAL_REFLECTION_PROBES ;
66
77/// Feature flags for renderer behavior that is still experimental.
88#[ derive( Clone , Copy , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
@@ -19,7 +19,7 @@ pub struct ExperimentalSettings {
1919impl Default for ExperimentalSettings {
2020 fn default ( ) -> Self {
2121 Self {
22- max_local_reflection_probes : MAX_LOCAL_PROBES ,
22+ max_local_reflection_probes : MAX_LOCAL_REFLECTION_PROBES ,
2323 reflection_probe_sh2_enabled : false ,
2424 material_shader_hot_reload_enabled : false ,
2525 }
@@ -30,7 +30,8 @@ impl ExperimentalSettings {
3030 /// Returns the local reflection-probe count clamped to the fixed per-draw packing capacity.
3131 #[ must_use]
3232 pub fn effective_max_local_reflection_probes ( self ) -> usize {
33- self . max_local_reflection_probes . min ( MAX_LOCAL_PROBES )
33+ self . max_local_reflection_probes
34+ . min ( MAX_LOCAL_REFLECTION_PROBES )
3435 }
3536}
3637
@@ -42,23 +43,26 @@ mod tests {
4243 fn default_local_reflection_probe_limit_matches_packed_capacity ( ) {
4344 let settings = ExperimentalSettings :: default ( ) ;
4445
45- assert_eq ! ( settings. max_local_reflection_probes, MAX_LOCAL_PROBES ) ;
46+ assert_eq ! (
47+ settings. max_local_reflection_probes,
48+ MAX_LOCAL_REFLECTION_PROBES
49+ ) ;
4650 assert_eq ! (
4751 settings. effective_max_local_reflection_probes( ) ,
48- MAX_LOCAL_PROBES
52+ MAX_LOCAL_REFLECTION_PROBES
4953 ) ;
5054 }
5155
5256 #[ test]
5357 fn effective_local_reflection_probe_limit_clamps_to_packed_capacity ( ) {
5458 let settings = ExperimentalSettings {
55- max_local_reflection_probes : MAX_LOCAL_PROBES + 10 ,
59+ max_local_reflection_probes : MAX_LOCAL_REFLECTION_PROBES + 10 ,
5660 ..Default :: default ( )
5761 } ;
5862
5963 assert_eq ! (
6064 settings. effective_max_local_reflection_probes( ) ,
61- MAX_LOCAL_PROBES
65+ MAX_LOCAL_REFLECTION_PROBES
6266 ) ;
6367 }
6468}
0 commit comments