Skip to content
Snippets Groups Projects
Commit 391f513c authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Pekka Paalanen
Browse files

gl-renderer: fragment shader precision to high


Always when supported, make the fragment shader default floating point
precision high. The medium precision is roughly like half-floats, which
can be surprisingly bad. High precision does not reach even normal
32-bit float precision (by specification), but it's better. GL ES
implementations are allowed to exceed the minimum precision requirements
given in the specification.

This is an advance attempt to avoid nasty surprises from poor shader
precision.

Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent 4d5b2f34
No related branches found
No related tags found
2 merge requests!905color-lcms: Introduction and implementation of LCMS plugin,!596Gamma correct blending with sRGB
......@@ -46,7 +46,13 @@
#extension GL_OES_EGL_image_external : require
#endif
precision mediump float;
#ifdef GL_FRAGMENT_PRECISION_HIGH
#define HIGHPRECISION highp
#else
#define HIGHPRECISION mediump
#endif
precision HIGHPRECISION float;
/*
* These undeclared identifiers will be #defined by a runtime generated code
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment