Derpius / VisTrace

Garry's Mod binary module for tracing meshes at high speed on the CPU (and much more)
https://derpius.github.io/VisTrace
MIT License
27 stars 1 forks source link

[feature] Correct normals to avoid issues with shading backfaces in TraceResult #24

Closed Derpius closed 2 years ago

Derpius commented 2 years ago

Is your feature request related to a problem? Please describe. When a ray hits the front face of a tri, but the smoothed/mapped normal faces away, an artificial backface hit is generated

Describe the solution you'd like Copy Falcor's method of solving this

Describe alternatives you've considered Should this be a helper function like CalcRayOrigin?

Derpius commented 2 years ago

Added in a962b9cc6c44825eabbf4ab41b127ad9239f0498