mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add normal mapping and parallax occlusion mapping for character models
Extends the WMO normal mapping/POM system to character M2 models with bone-skinned tangents. Auto-generates normal/height maps from diffuse textures using luminance→height, Sobel→normals (same algorithm as WMO). - Expand vertex buffer from M2Vertex (48B) to CharVertexGPU (56B) with tangent vec4 computed via Lengyel's method in setupModelBuffers() - Tangents are bone-transformed and Gram-Schmidt orthogonalized in the vertex shader, output as TBN for fragment shader consumption - Fragment shader gains POM ray marching, normal map blending, and LOD crossfade via dFdx/dFdy (identical to WMO shader) - Descriptor set 1 extended with binding 2 for normal/height sampler - Settings (enable, strength, POM quality) wired from game_screen.cpp to both WMO and character renderers via shared UI controls
This commit is contained in:
parent
3c31c43ca6
commit
9eeb9ce64d
7 changed files with 420 additions and 40 deletions
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue