aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-14 09:59:22 +0200
committerSven Gothel <[email protected]>2012-10-14 09:59:22 +0200
commite658ab1e427a7957b9dbfa4a396506de6c6582fd (patch)
treecb3d8156a694dc763372e59e4abc3dc8907533db /src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders
parent842e9feefc9d1a885a92ad8f0068cbcbcdd0e3c4 (diff)
FixedFuncPipeline: Use ES2/GL2 prelude and set default precision. Shader code: Remove precision for default precision types.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders')
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColor.fp2
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorTexture.fp10
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl22
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_const.glsl2
-rw-r--r--src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl6
5 files changed, 21 insertions, 21 deletions
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColor.fp b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColor.fp
index bd7f2bdb2..bb0ca0123 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColor.fp
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColor.fp
@@ -7,7 +7,7 @@
void main (void)
{
- HIGHP vec4 color = frontColor;
+ vec4 color = frontColor;
if( mgl_CullFace > 0 &&
( ( MGL_FRONT == mgl_CullFace && gl_FrontFacing ) ||
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorTexture.fp b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorTexture.fp
index 9d02a0f6c..2593dc750 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorTexture.fp
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/FixedFuncColorTexture.fp
@@ -8,12 +8,12 @@
#include mgl_alphatest.fp
-const HIGHP float gamma = 1.5; // FIXME
-const HIGHP vec3 igammav = vec3(1.0 / gamma); // FIXME
+const float gamma = 1.5; // FIXME
+const vec3 igammav = vec3(1.0 / gamma); // FIXME
const vec4 texEnvColor = vec4(0.0); // FIXME
-const HIGHP vec4 zerov4 = vec4(0.0);
-const HIGHP vec4 onev4 = vec4(1.0);
+const vec4 zerov4 = vec4(0.0);
+const vec4 onev4 = vec4(1.0);
void calcTexColor(inout vec4 color, vec4 texColor, in int texFormat, in int texEnvMode) {
if(MGL_MODULATE == texEnvMode) { // default
@@ -51,7 +51,7 @@ void calcTexColor(inout vec4 color, vec4 texColor, in int texFormat, in int texE
void main (void)
{
- HIGHP vec4 color = frontColor;
+ vec4 color = frontColor;
if( mgl_CullFace > 0 &&
( ( MGL_FRONT == mgl_CullFace && gl_FrontFacing ) ||
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl
index 59dcb626f..f670f7b77 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_attribute.glsl
@@ -4,22 +4,22 @@
#include es_precision.glsl
-attribute HIGHP vec4 mgl_Vertex;
-attribute HIGHP vec4 mgl_Normal;
-attribute HIGHP vec4 mgl_Color;
+attribute vec4 mgl_Vertex;
+attribute vec4 mgl_Normal;
+attribute vec4 mgl_Color;
#if MAX_TEXTURE_UNITS >= 2
-attribute HIGHP vec4 mgl_MultiTexCoord0;
-attribute HIGHP vec4 mgl_MultiTexCoord1;
+attribute vec4 mgl_MultiTexCoord0;
+attribute vec4 mgl_MultiTexCoord1;
#endif
#if MAX_TEXTURE_UNITS >= 4
-attribute HIGHP vec4 mgl_MultiTexCoord2;
-attribute HIGHP vec4 mgl_MultiTexCoord3;
+attribute vec4 mgl_MultiTexCoord2;
+attribute vec4 mgl_MultiTexCoord3;
#endif
#if MAX_TEXTURE_UNITS >= 8
-attribute HIGHP vec4 mgl_MultiTexCoord4;
-attribute HIGHP vec4 mgl_MultiTexCoord5;
-attribute HIGHP vec4 mgl_MultiTexCoord6;
-attribute HIGHP vec4 mgl_MultiTexCoord7;
+attribute vec4 mgl_MultiTexCoord4;
+attribute vec4 mgl_MultiTexCoord5;
+attribute vec4 mgl_MultiTexCoord6;
+attribute vec4 mgl_MultiTexCoord7;
#endif
#endif // mgl_attribute_glsl
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_const.glsl b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_const.glsl
index e8b7d5d41..4f97292e3 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_const.glsl
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_const.glsl
@@ -7,7 +7,7 @@
// will be defined at runtime: MAX_TEXTURE_UNITS [0|2|4|8]
const LOWP int MAX_LIGHTS = 8;
-const HIGHP float EPSILON = 0.0000001; // FIXME: determine proper hw-precision
+const float EPSILON = 0.0000001; // FIXME: determine proper hw-precision
// discard freezes NV tegra2 compiler (STILL TRUE?)
// #define DISCARD(c) (c.a = 0.0)
diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl
index a2d91aa73..b92037ef9 100644
--- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl
+++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/shaders/mgl_uniform.glsl
@@ -6,11 +6,11 @@
#include mgl_const.glsl
-uniform HIGHP mat4 mgl_PMVMatrix[4]; // P, Mv, Mvi and Mvit (transpose(inverse(ModelView)) == normalMatrix)
+uniform mat4 mgl_PMVMatrix[4]; // P, Mv, Mvi and Mvit (transpose(inverse(ModelView)) == normalMatrix)
uniform LOWP int mgl_ColorEnabled;
-uniform HIGHP vec4 mgl_ColorStatic;
+uniform vec4 mgl_ColorStatic;
uniform LOWP int mgl_AlphaTestFunc;
-uniform HIGHP float mgl_AlphaTestRef;
+uniform float mgl_AlphaTestRef;
#if MAX_TEXTURE_UNITS > 0
uniform LOWP int mgl_TextureEnabled[MAX_TEXTURE_UNITS];
uniform LOWP int mgl_TexCoordEnabled[MAX_TEXTURE_UNITS];