GPU_LUTINPUT_CP
(= "cos(phi)") is used for anisotropic reflection, based on Schlick's model. According to the paper, the input value should be T * H'
, where T is the tangent vector, and H' is the projection of half-angle vector on to the tangent plane.
Here are some (strange) details:
GPU_LUTINPUT_CP
is only available under configuration 7- H' is not normalized. This is found when replicating the output from 3ds in citra. Unormalized H' produces the same result, while normalized H' doesn't. This means the angle phi is not the angle between T and H' anymore. On Schlick's paper, it is unclear whether this is the case.
- Also found when implementing in citra: when using normal mapping, it seems that the tangent vector stays (1, 0, 0) in surface-local space, instead of rotating with the normal vector. This means the normal and tangent vectors are not perpendicular anymore
- Dispite the point above,