Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
LGTM! Change aligns with existing usage patterns.
The change to use
SharedData::DirLightDirection.xyzis consistent with line 584, which already usesSharedData::DirLightDirection.xyzfor the directional light angle calculation in the same shader path.However, please verify whether line 617 (in the
TRUE_PBRpath) should also be updated for consistency:Line 617 passes
DirLightDirection(from the constant buffer) toPBR::GetDirectLightInput. IfSharedData::DirLightDirectionis the canonical source, that call may need the same update.🏁 Script executed:
Length of output: 715
Update line 617 for consistency with GRASS_LIGHTING data sources.
The change at line 645 correctly aligns with line 584's usage of
SharedData::DirLightDirection.xyzwithin theGRASS_LIGHTINGpath. However, line 617 in theTRUE_PBRsub-path still uses the constant bufferDirLightDirectiondirectly.For consistency within the
GRASS_LIGHTINGblock, line 617 should also be updated to useSharedData::DirLightDirection:PBR::GetDirectLightInput(dirDiffuseColor, coatDirDiffuseColor, dirTransmissionColor, dirSpecularColor, normal, normal, viewDirection, viewDirection, SharedData::DirLightDirection, SharedData::DirLightDirection, lightProperties, pbrSurfaceProperties, tbn, input.TexCoord.xy);🤖 Prompt for AI Agents