BredaUniversityGames / DXX-Raytracer

DXX Raytracer is a fork of the DXX Retro project for Windows. DXX Raytracer uses modern raytracing techniques to update the graphics of the beloved retro game known as Descent.
Other
216 stars 10 forks source link

Fix for issue with tangents rotating the wrong direction with mirrored uv coordinates. #30

Open Lehm2000 opened 1 month ago

Lehm2000 commented 1 month ago

Discovered an issue when rotating tangents for overlay textures. When the surfaces uv coordinates were mirrored the tangent would rotate in the wrong direction resulting in incorrect lighting and parallax. Added check for mirrored uv coordinates and set orientation correctly when detected.

Incorrect: Mirrored texture on left has inverted normals. scrn0072

Corrected: Mirrored texture on left now has correct normals that match right side. scrn0070