Hello!
First, thanks for the awesome work on LTC! Very cool!
I noticed there seem to be three different versions of the WebGL demos, which is causing me a little grief when using them as an implementation reference.
One's here:
https://blog.selfshadow.com/sandbox/ltc.html
Which is linked to from here: https://blogs.unity3d.com/2016/05/26/real-time-polygonal-light-shading-with-linearly-transformed-cosines/
That version uses
mat3 Minv = mat3(
vec3( 1, 0, t.y),
vec3( 0, t.z, 0),
vec3(t.w, 0, t.x)
);
Then there are the demos linked to by the readme on this repository which are here:
https://blog.selfshadow.com/ltc/webgl/ltc_quad.html
Those use the following for MinV:
mat3 Minv = mat3(
vec3(t1.x, 0, t1.y),
vec3( 0, t1.z, 0),
vec3(t1.w, 0, t2.x)
);
Then finally there is the official implementation implemented within the WebGL folder of this repository, which use this for MinV:
mat3 Minv = mat3(
vec3(t1.x, 0, t1.y),
vec3( 0, 1, 0),
vec3(t1.z, 0, t1.w)
);
This is really confusing. I ran into an issue where I was using the newer lookup table from this repository with an out of date linear transformation scheme from the Unity blog post. Is there a way we could get these three sets of WebGL demos updated and consistent?