mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 19:18:13 +02:00
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: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
4d5b2f3410
commit
391f513c36
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue