summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-11 01:29:30 +0200
committerSven Gothel <[email protected]>2014-06-11 01:29:30 +0200
commit3b6e6caeb24a112a2b1fbee5f54bbdc0bbf865c0 (patch)
treec3c2e36c4d208d3f78a07ab5afaadef330d959a5 /src/jogl/classes/jogamp/graph
parentbc905a107d83d291f6ea34391768d16a9842bfc1 (diff)
Graph: Fix GLSL issue w/ ES3, add 'const float sample_count', since define SAMPLE_COUNT is of type 'int'
Diffstat (limited to 'src/jogl/classes/jogamp/graph')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allequal.glsl4
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allequal.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allequal.glsl
index da7feeaa7..0272c1f9f 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allequal.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allequal.glsl
@@ -1,11 +1,11 @@
// Pass-2: AA on Texture
// Note: gcv_FboTexCoord is in center of sample pixels.
- // float sampleCount = gcu_FboTexSize.z;
+ // float sample_count = gcu_FboTexSize.z;
vec2 psize = 1.0 / gcu_FboTexSize.xy; // pixel size
// Not only the poles (NW, SW, ..) but the whole edge!
- const float sample_weight = 1.0 / ( SAMPLE_COUNT * SAMPLE_COUNT );
+ const float sample_weight = 1.0 / ( sample_count * sample_count );
// const vec4 tex_weights = vec4(0.075, 0.06, 0.045, 0.025);
vec2 texCoord = gcv_FboTexCoord.st;
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl
index 7a2cb0358..8cc108bd1 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_flipquad3.glsl
@@ -4,7 +4,7 @@
//
// Same as flipquad - but w/ rgss coordinates
- // float sampleCount = gcu_FboTexSize.z;
+ // float sample_count = gcu_FboTexSize.z;
vec2 psize = 1.0 / gcu_FboTexSize.xy; // pixel size
vec2 normFragCoord = gl_FragCoord.xy - vec2(0.5, 0.5); // normalize center 0.5/0.5 -> 0/0
@@ -24,7 +24,7 @@
// SampleCount 2 -> 2p
const float weight = 1.0 / 2.0;
- const float edge = ( SAMPLE_COUNT / 2.0 ) - 1.0;
+ const float edge = ( sample_count / 2.0 ) - 1.0;
t = GetSample(gcu_FboTexUnit, texCoord, psize, -edge, edge, -0.5, 0.5)*weight; // center
t += GetSample(gcu_FboTexUnit, texCoord, psize, edge, -edge, 0.5, -0.5)*weight; // center
@@ -33,7 +33,7 @@
// SampleCount 4 -> 4p
const float weight = 1.0 / 4.0;
- const float edgeS4_1Q = ( SAMPLE_COUNT / 2.0 ) - 1.0;
+ const float edgeS4_1Q = ( sample_count / 2.0 ) - 1.0;
if( 0.0 == orient ) {
// SWIPE LEFT -> RIGHT