git-svn-id: svn://db.shs.com.ru/libs@51 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-11-30 14:45:48 +00:00
parent 8f3506b4a0
commit fc0b593329
15 changed files with 294 additions and 284 deletions

View File

@@ -16,12 +16,14 @@ vec3 Uncharted2Tonemap(vec3 x) {
}
void main(void) {
qgl_FragData[0].rgb = texelFetch(t0, ivec2(gl_FragCoord.xy), 0).rgb;
return;
vec3 inColor = texelFetch(t0, ivec2(gl_FragCoord.xy), 0).rgb;
inColor *= exposure;
float ExposureBias = 1;
vec3 curr = Uncharted2Tonemap(ExposureBias*inColor);
vec3 whiteScale = 1 / Uncharted2Tonemap(vec3(tW));
vec3 color = curr * whiteScale;
vec3 retColor = pow(color, vec3(1 / 2.2));
vec3 retColor = pow(color, vec3(1 / 1.2));
qgl_FragData[0].rgb = retColor;
}