Actually i found an issue in the sky shader
you have this in the frag shader
vec3 dir = normalize(direction);
gl_FragColor = Optics_GetEnvColor(m_Texture, direction);
the dir variable is never used….
then in Optics_GetEnvColor you have
// compute 1/2p
// NOTE: this simplification only works if dir is normalized.
float inv_two_p = 1.414 * sqrt(dzplus1);
The problem is if I use the normalized direction, the distortion is worse….
@Momoko_Fan any input on this?