diff options
author | Sven Gothel <[email protected]> | 2014-07-29 21:12:23 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-29 21:12:23 +0200 |
commit | c391da73631aa551ad73d88068efebdb1e67e650 (patch) | |
tree | f0d7ae633d9af4e7567e8c2425e6d240a178522d /src/jogl/classes/com/jogamp | |
parent | 323fd68b6cce41de4980a909ef55273a98a8aad9 (diff) |
Fix ShaderCode.es3_default_precision_fp: ES 3.x requires same precision for uniforms -> re-use es3_default_precision_vp; Fixes PointsDemoES2
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java index 29dce40f5..574fc4205 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderCode.java @@ -874,8 +874,12 @@ public class ShaderCode { /** Default precision of {@link GL#isGLES3() ES3} for {@link GL2ES2#GL_VERTEX_SHADER vertex-shader}: {@value #es3_default_precision_vp} */ public static final String es3_default_precision_vp = es2_default_precision_vp; - /** Default precision of {@link GL#isGLES3() ES3} for {@link GL2ES2#GL_FRAGMENT_SHADER fragment-shader}: {@value #es3_default_precision_fp} */ - public static final String es3_default_precision_fp = es2_default_precision_fp; + /** + * Default precision of {@link GL#isGLES3() ES3} for {@link GL2ES2#GL_FRAGMENT_SHADER fragment-shader}: {@value #es3_default_precision_fp}, + * same as for {@link GL2ES2#GL_VERTEX_SHADER vertex-shader}, i.e {@link #es3_default_precision_vp}, + * due to ES 3.x requirements of using same precision for uniforms! + */ + public static final String es3_default_precision_fp = es3_default_precision_vp; /** Default precision of GLSL ≥ 1.30 as required until < 1.50 for {@link GL2ES2#GL_VERTEX_SHADER vertex-shader} or {@link GL3#GL_GEOMETRY_SHADER geometry-shader}: {@value #gl3_default_precision_vp_gp}. See GLSL Spec 1.30-1.50 Section 4.5.3. */ public static final String gl3_default_precision_vp_gp = "\nprecision highp float;\nprecision highp int;\n"; |