Repository navigation
fix(wsurf): center parallax and align material UVs - #34
Merged
Merged
Conversation
Co-Authored-By: Codex <codex@openai.com>
hzqst
added a commit
to MetaHookSv/MetaHookSv
that referenced
this pull request
Nov 11, 2026
Update Renderer to merged PR MetaHookSv/Renderer#34. Co-Authored-By: Codex <codex@openai.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.
Mid-gray pixels in the bundled bullet-hole height map currently receive roughly half the full parallax offset, making the effect appear displaced into the wall. Use a fixed height reference of 0.5 so mid-gray stays on the surface, and share the resulting UVs across diffuse, detail, normal and specular textures while preserving lightmap coordinates.
Start the ray at the top of the height field relative to the new reference plane, retaining the existing 20–40-layer search, scale and full height range. Correct the alpha-solid glow branch to sample the shared UVs without an undefined coordinate or duplicate variable declaration. Update the English and Chinese authoring documentation, including the behavior change for custom maps authored against the old white reference.
Fixes MetaHookSv/MetaHookSv#972
Validation:
wsurf_parallax_shader_tests: each passed 24 production VS/GS/FS variant compile/link checks and 432 GPU readback cases on an NVIDIA RTX 5060 / OpenGL 4.4. Cases cover brush/decal paths, parallax on/off, black/mid-gray/white heights, a linear height field with an analytic intersection, positive/negative/zero scale, viewing angles, material UV alignment and unchanged lightmaps. Variants include glow, alpha-solid, shadow and multiview paths.Renderer-format-check: 104 files, no differences;git diff --checkpassed.The test executable was built in both configurations. No game deployment or in-game visual acceptance was performed; the GPU checks do not establish full-game visual compatibility.