fix(extended translucency): apply extra data and implicit alpha#1365
Conversation
- nif setting should ignore SkinnedMeshOnly - meshes with lightingShaderProperty.alpha < 1 have implicit alpha and should not be ignored for easy testing Also clearified the cpu code for translating nif setting into descriptor
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant ExtendedTranslucency
participant Geometry
participant AlphaProperty
participant LightingShaderProperty
Caller->>ExtendedTranslucency: BSLightingShader_SetupGeometry(pass)
ExtendedTranslucency->>Geometry: Retrieve AlphaProperty and LightingShaderProperty
alt AlphaProperty with blending enabled OR LightingShaderProperty alpha < 0.999
ExtendedTranslucency->>ExtendedTranslucency: SetFeatureDescriptor via lambda
alt ExtraData exists and valid
ExtendedTranslucency->>ExtendedTranslucency: Remap material model and set descriptor
else No ExtraData or invalid
ExtendedTranslucency->>ExtendedTranslucency: Use SkinnedOnly/global defaults
end
else
ExtendedTranslucency->>Caller: Return early (skip effect)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
For testing: |
|
✅ A pre-release build is available for this PR: |
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
|
|
||
| struct Hooks; | ||
|
|
||
| // TODO: Support more material model like glasses or arcylic |
There was a problem hiding this comment.
Note Todos will be assigned to you. So determine if you want this or not.
|
Please explain what you meant by "not working" so we can update the title. |
|
There are 2 case the extra data and the effect not working:
|
|
@coderabbitai please suggest an appropriate commit title based off the description of the issues fixed within our length requirements. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 0 🏁 Script executed: Length of output: 513 🏁 Script executed: Length of output: 29 @alandtse Based on ArcEarth's description of the two issues fixed, I suggest this commit title: This captures both key fixes:
The title is concise at 60 characters and follows the conventional commit format already used in the current title. It's more descriptive than the current title which only mentions "extra data 'AnisotropicAlphaMaterial'" without explaining what was actually fixed. Alternative shorter version if length is a concern: 🧠 Learnings used |
Also clarified the cpu code for translating nif setting into descriptor
Summary by CodeRabbit
Refactor
New Features
Style
Bug Fixes
Chores