Ensure that the alpha channel of our pixels is clamped within 0.0 to 1.0 in the default shader. It seems that some drivers fail at that, so we do it for them.

master
AnotherCommander 2020-05-10 00:05:32 +02:00
parent 9049ab9a54
commit 1fcfbb89f7
1 changed files with 3 additions and 0 deletions

View File

@ -414,6 +414,9 @@ void main(void)
totalColor += specularLight * gl_LightSource[1].specular;
#endif
// apparently some drivers fail to clamp alpha properly, so let's do it for them
totalColor.a = clamp(totalColor.a, 0.0, 1.0);
// gamma correction
// using Jim Hejl's filmic tonemapping and gamma correction approximation.
// Normally this would require HDR, but I think it works extremely well in Oolite.