Merge pull request #519 from Geenz/master

Tweak atmospheric shaders assuming the values are intended to be linear to give them a seemingly "softer" appearance.
This commit is contained in:
ZappoMan 2013-06-09 21:21:45 -07:00
commit 537e7902f0
2 changed files with 108 additions and 106 deletions

View file

@ -103,4 +103,5 @@ void main (void)
float fMiePhase = 1.5 * ((1.0 - g2) / (2.0 + g2)) * (1.0 + fCos*fCos) / pow(1.0 + g2 - 2.0*g*fCos, 1.5);
gl_FragColor.rgb = frontColor.rgb + fMiePhase * secondaryFrontColor.rgb;
gl_FragColor.a = gl_FragColor.b;
gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0/2.2));
}

View file

@ -110,4 +110,5 @@ void main (void)
vec3 secondaryColor = v3FrontColor * fKmESun;
gl_FragColor.rgb = color + fMiePhase * secondaryColor;
gl_FragColor.a = gl_FragColor.b;
gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0/2.2));
}