Closed gottfriedleibniz closed 3 weeks ago
Believe the current refract implementation is mixing up the signs. Referencing GLSL: $K = 1.0 - \mu^2 (1.0 - (N \boldsymbol{\cdot} I)^2)$, which would imply 1.0f - eta * eta + eni * eni; in code.
K = 1.0 - \mu^2 (1.0 - (N \boldsymbol{\cdot} I)^2)
1.0f - eta * eta + eni * eni;
Hi @gottfriedleibniz,
Sorry for the delay, thanks for the catch 🤗
https://github.com/recp/cglm/commit/48839a38a14a653c233693fa911348ce58d57167 should fix that
Believe the current refract implementation is mixing up the signs. Referencing GLSL: $
K = 1.0 - \mu^2 (1.0 - (N \boldsymbol{\cdot} I)^2)
$, which would imply1.0f - eta * eta + eni * eni;
in code.