This commit is contained in:
1 parent
2fa64106c8
commit
2054fa2558
21 files changed
+711
-159
No files matched your search
@@ -29,7 +29,6 @@ pub enum GiPath {
|
||||
#[reflect(Debug, PartialEq)]
|
||||
pub enum RenderFallbackReason {
|
||||
RtUnsupported,
|
||||
LocalShadowLights,
|
||||
}
|
||||
|
||||
/// Unified render-stack decision consumed by game, editor, and diagnostics.
|
||||
@@ -204,10 +203,6 @@ pub fn resolve_effective_render_stack(
|
||||
GiPath::SolariDeferred if !caps.rt_supported => {
|
||||
(GiPath::Forward, Some(RenderFallbackReason::RtUnsupported))
|
||||
}
|
||||
GiPath::SolariDeferred if local_shadow_lights => (
|
||||
GiPath::Forward,
|
||||
Some(RenderFallbackReason::LocalShadowLights),
|
||||
),
|
||||
GiPath::SolariDeferred => (GiPath::SolariDeferred, None),
|
||||
};
|
||||
|
||||
@@ -246,7 +241,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn effective_stack_falls_back_for_local_shadow_lights() {
|
||||
fn effective_stack_keeps_solari_when_local_shadow_lights_exist() {
|
||||
let caps = RenderingCapabilities {
|
||||
rt_supported: true,
|
||||
..Default::default()
|
||||
@@ -254,10 +249,8 @@ mod tests {
|
||||
|
||||
let stack = resolve_effective_render_stack(GiPath::SolariDeferred, &caps, true, true);
|
||||
|
||||
assert_eq!(stack.effective_gi_path, GiPath::Forward);
|
||||
assert_eq!(
|
||||
stack.fallback_reason,
|
||||
Some(RenderFallbackReason::LocalShadowLights)
|
||||
);
|
||||
assert_eq!(stack.effective_gi_path, GiPath::SolariDeferred);
|
||||
assert_eq!(stack.fallback_reason, None);
|
||||
assert!(stack.local_shadow_lights);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user