OpenGL2: Remove AGEN_FRESNEL(superceded by cubemap patch), and some small fixes and optimizations.

This commit is contained in:
SmileTheory 2013-09-24 03:29:49 -07:00
parent 82be4e667f
commit acbeca6042
8 changed files with 157 additions and 213 deletions

View file

@ -85,13 +85,13 @@ float CalcFog(vec4 position)
float s = dot(position, u_FogDistance) * 8.0;
float t = dot(position, u_FogDepth);
bool eyeOutside = u_FogEyeT < 0.0;
float t2 = float(t >= float(eyeOutside));
float eyeOutside = step(0.0, -u_FogEyeT);
float fogged = step(eyeOutside, t);
t = max(t, 1e-6);
t *= fogged / (t - u_FogEyeT * eyeOutside);
if (eyeOutside)
t2 *= t / (t - u_FogEyeT);
return s * t2;
return s * t;
}
void main()