aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java4
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_even.glsl (renamed from src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_allequal.glsl)128
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl87
3 files changed, 153 insertions, 66 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index 090623444..24fa09058 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -167,7 +167,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
}
rsLocal.update(gl, rs, updateLocLocal, renderModes, false, true);
rs.updateUniformDataLoc(gl, updateLocLocal, false /* updateData */, gcu_FboTexUnit, true); // FIXME always update if changing tex-unit
- rs.updateUniformLoc(gl, updateLocLocal, gcu_FboTexSize, true);
+ rs.updateUniformLoc(gl, updateLocLocal, gcu_FboTexSize, sampleCount > 1); // maybe optimized away for sampleCount <= 1
}
}
@@ -576,7 +576,7 @@ public class VBORegion2PVBAAES2 extends GLRegion {
fbo.reset(gl, fboWidth, fboHeight);
// Shall not use bilinear (GL_LINEAR), due to own VBAA. Result is smooth w/o it now!
// FIXME: FXAA requires bilinear filtering!
- // texA = fbo.attachTexture2D(gl, 0, true, GL2ES2.GL_LINEAR, GL2ES2.GL_LINEAR, GL2ES2.GL_CLAMP_TO_EDGE, GL2ES2.GL_CLAMP_TO_EDGE);
+ // texA = fbo.attachTexture2D(gl, 0, true, GL.GL_LINEAR, GL.GL_LINEAR, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
texA = fbo.attachTexture2D(gl, 0, true, GL.GL_NEAREST, GL.GL_NEAREST, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
if( !blendingEnabled ) {
// no depth-buffer w/ blending
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_bforce_even.glsl
index 0272c1f9f..ba7611a06 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_bforce_even.glsl
@@ -13,77 +13,77 @@
vec4 t;
// SampleCount 2 -> 4x
- t = texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, -0.5)))*sample_weight; // NW
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, 0.5)))*sample_weight; // SW
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, 0.5)))*sample_weight; // SE
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, -0.5)))*sample_weight; // NE
+ t = texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, -0.5))*sample_weight; // NW
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, 0.5))*sample_weight; // SW
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, 0.5))*sample_weight; // SE
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, -0.5))*sample_weight; // NE
#if SAMPLE_COUNT > 2
// SampleCount 4 -> +12x = 16p
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, -1.5)))*sample_weight; // NW -> SW Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, -0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, 0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, 1.5)))*sample_weight; // SW -> SE Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, 1.5)))*sample_weight; //
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, 1.5)))*sample_weight; //
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, 1.5)))*sample_weight; // SE -> NE Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, 0.5)))*sample_weight; //
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, -0.5)))*sample_weight; //
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, -1.5)))*sample_weight; // NE -> NW Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, -1.5)))*sample_weight; //
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, -1.5)))*sample_weight; // NW - 1 (closed)
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, -1.5))*sample_weight; // NW -> SW Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, -0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, 0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, 1.5))*sample_weight; // SW -> SE Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, 1.5))*sample_weight; //
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, 1.5))*sample_weight; //
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, 1.5))*sample_weight; // SE -> NE Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, 0.5))*sample_weight; //
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, -0.5))*sample_weight; //
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, -1.5))*sample_weight; // NE -> NW Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, -1.5))*sample_weight; //
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, -1.5))*sample_weight; // NW - 1 (closed)
#if SAMPLE_COUNT > 4
// SampleCount 6 -> +20x = 36p
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, -2.5)))*sample_weight; // NW -> SW Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, -1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, -0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, 0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, 1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, 2.5)))*sample_weight; // SW -> SE Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, 2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, 2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, 2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, 2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, 2.5)))*sample_weight; // SE -> NE Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, 1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, 0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, -0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, -1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, -2.5)))*sample_weight; // NE -> NW Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, -2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, -2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, -2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, -2.5)))*sample_weight; // NW - 1 (closed)
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, -2.5))*sample_weight; // NW -> SW Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, -1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, -0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, 0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, 1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, 2.5))*sample_weight; // SW -> SE Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, 2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, 2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, 2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, 2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, 2.5))*sample_weight; // SE -> NE Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, 1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, 0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, -0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, -1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, -2.5))*sample_weight; // NE -> NW Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, -2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, -2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, -2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, -2.5))*sample_weight; // NW - 1 (closed)
#if SAMPLE_COUNT > 6
// SampleCount 8 -> +28x = 64p
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, -3.5)))*sample_weight; // NW -> SW Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, -2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, -1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, -0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, 0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, 1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, 2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-3.5, 3.5)))*sample_weight; // SW -> SE Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, 3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, 3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, 3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, 3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, 3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, 3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, 3.5)))*sample_weight; // SE -> NE Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, 2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, 1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, 0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, -0.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, -1.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, -2.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 3.5, -3.5)))*sample_weight; // NE -> NW Edge
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 2.5, -3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 1.5, -3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2( 0.5, -3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-0.5, -3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-1.5, -3.5)))*sample_weight;
- t += texture2D(gcu_FboTexUnit, texCoord + psize*(vec2(-2.5, -3.5)))*sample_weight; // NW - 1 (closed)
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, -3.5))*sample_weight; // NW -> SW Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, -2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, -1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, -0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, 0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, 1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, 2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.5, 3.5))*sample_weight; // SW -> SE Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, 3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, 3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, 3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, 3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, 3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, 3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, 3.5))*sample_weight; // SE -> NE Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, 2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, 1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, 0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, -0.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, -1.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, -2.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.5, -3.5))*sample_weight; // NE -> NW Edge
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.5, -3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.5, -3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.5, -3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-0.5, -3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.5, -3.5))*sample_weight;
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.5, -3.5))*sample_weight; // NW - 1 (closed)
#endif
#endif
#endif
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl
new file mode 100644
index 000000000..7adf111d5
--- /dev/null
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass2-vbaa_bforce_odd.glsl
@@ -0,0 +1,87 @@
+ // Pass-2: AA on Texture
+ // Note: gcv_FboTexCoord is in center of sample pixels.
+
+ // 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 vec4 tex_weights = vec4(0.075, 0.06, 0.045, 0.025);
+ vec2 texCoord = gcv_FboTexCoord.st;
+
+ vec4 t;
+
+ // SampleCount 1 -> 1x (raster 1x1)
+ t += texture2D(gcu_FboTexUnit, texCoord)*sample_weight; // CENTER
+
+ #if SAMPLE_COUNT > 1
+ // SampleCount 3 -> +8x = 9p (raster 3x3)
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, -1.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.0, -1.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, -1.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, 0.0))*sample_weight; // Center Left
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, 0.0))*sample_weight; // Center Right
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, 1.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.0, 1.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, 1.0))*sample_weight; // bottom line
+
+ #if SAMPLE_COUNT > 3
+ // SampleCount 5 -> +16x = 25p (raster 5x5)
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, -1.0))*sample_weight; // top line - 1
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, -1.0))*sample_weight; // top line - 1
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, 0.0))*sample_weight; // Center Left
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, 0.0))*sample_weight; // Center Right
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, 1.0))*sample_weight; // bottom line - 1
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, 1.0))*sample_weight; // bottom line - 1
+
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, -2.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, -2.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.0, -2.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, -2.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, -2.0))*sample_weight; // top line
+
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, 2.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, 2.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.0, 2.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, 2.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, 2.0))*sample_weight; // bottom line
+
+ #if SAMPLE_COUNT > 5
+ // SampleCount 7 -> +24x = 49p (raster 7x7)
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, -2.0))*sample_weight; // top line - 1
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, -2.0))*sample_weight; // top line - 1
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, -1.0))*sample_weight; // top line - 2
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, -1.0))*sample_weight; // top line - 2
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, 0.0))*sample_weight; // Center Left
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, 0.0))*sample_weight; // Center Right
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, 1.0))*sample_weight; // bottom line - 2
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, 1.0))*sample_weight; // bottom line - 2
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, 2.0))*sample_weight; // bottom line - 1
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, 2.0))*sample_weight; // bottom line - 1
+
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, -3.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, -3.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, -3.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.0, -3.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, -3.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, -3.0))*sample_weight; // top line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, -3.0))*sample_weight; // top line
+
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-3.0, 3.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-2.0, 3.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2(-1.0, 3.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 0.0, 3.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 1.0, 3.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 2.0, 3.0))*sample_weight; // bottom line
+ t += texture2D(gcu_FboTexUnit, texCoord + psize*vec2( 3.0, 3.0))*sample_weight; // bottom line
+ #endif
+ #endif
+ #endif
+ #if 0
+ if(t.w == 0.0){
+ discard; // discard freezes NV tegra2 compiler
+ }
+ #endif
+
+ mgl_FragColor = t;