Repository navigation
fix(wsurf): align parallax tangents with surface and decal UVs - #35
Merged
Merged
Conversation
Keep texinfo tangent directions on BSP back-plane faces and mirror the corresponding tangent for decal horizontal and vertical UV flips. Exercise the production basis builders and fragment shader across all six faces. Co-Authored-By: Codex <codex@openai.com>
This was referenced Nov 12, 2026
fix(renderer): correct parallax direction on back faces and flipped decals
MetaHookSv/MetaHookSv#973
Merged
hzqst
added a commit
to MetaHookSv/MetaHookSv
that referenced
this pull request
Nov 12, 2026
Update Renderer to merged PR MetaHookSv/Renderer#35. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Parallax displacement reverses on
SURF_PLANEBACKfaces because the face builder negates both texture tangents while leaving UVs in their originaltexinfodirections. Keep the outward-normal correction, preserve the UV tangent directions, and mirror the corresponding tangent when a decal usesFDECAL_HFLIPorFDECAL_VFLIP.The production basis builders are shared with the existing real-OpenGL regression suite. It now checks the attached cube's six face orientations and all four decal flip combinations against independent world-ray/height-plane intersections, including five heights, positive/negative/zero scale, and frontal/oblique views. Existing midpoint and material-alignment coverage is retained.
Refs MetaHookSv/MetaHookSv#972. Root-cause investigation. Aggregator gitlink update: MetaHookSv/MetaHookSv#973; merge this component PR first.
Validation:
-Yworld U expected0.394000, actual0.406006; after fixing face orientation alone,+Y/HFLIP decal U expected0.406000, actual0.393982.git diff --checkpasses; independent read-only review found no blocking issue.The GPU regressions use the production basis builders and fragment shader with a test vertex shader. Full in-game visual acceptance has not been performed. This change also corrects the shared basis consumed by normal mapping.