fix: fixes for flickering lighting#1288
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe changes introduce a shadow light bitmask mechanism to the lighting system, updating both shader and C++ code to track, store, and utilize shadow light presence via a bitmask. Additionally, the patching logic for the lighting shader's geometry setup is revised to use multiple targeted memory patches, varying by module type. Changes
Sequence Diagram(s)sequenceDiagram
participant RenderPass
participant LightLimitFix
participant Shader
RenderPass->>LightLimitFix: Setup lighting
LightLimitFix->>LightLimitFix: Reset ShadowBitMask
loop For each shadow light
LightLimitFix->>LightLimitFix: Set bit in ShadowBitMask
end
LightLimitFix->>Shader: Update constant buffer with ShadowBitMask
Shader->>Shader: IsLightIgnored(light)
alt Light has Shadow flag
Shader->>Shader: Check ShadowBitMask & (1 << shadowLightIndex)
Shader->>Shader: Return result
else
Shader->>Shader: Continue with existing ignore logic
end
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
Fixes LLF shadow lights properly, using a bitmask.
Fixes weird flickering on 1.5.97 due to optimisations specific to that version breaking hooks.
Cleaned up some things whilst trying to fix issues.
Summary by CodeRabbit