1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00
This commit is contained in:
Emil Ernerfeldt
2021-11-13 12:55:48 +01:00
parent 008a971e73
commit b5cb2b2c0d
8 changed files with 54 additions and 44 deletions

View File

@@ -18,9 +18,9 @@ vec4 srgba_from_linear(vec4 rgba) {
void main() {
gl_FragColor = texture2D(u_sampler, v_tc);
gl_FragColor = srgba_from_linear(gl_FragColor) / 255.;
#ifdef WEBKITGTK_WORKAROUND
//this is better than double apply
gl_FragColor = vec4(pow(gl_FragColor.rgb,vec3(1.0/2.2)),gl_FragColor.a);
gl_FragColor = srgba_from_linear(gl_FragColor) / 255.0;
#ifdef APPLY_BRIGHTENING_GAMMA
gl_FragColor = vec4(pow(gl_FragColor.rgb, vec3(1.0/2.2)), gl_FragColor.a);
#endif
}