diff options
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02-xxx.fp')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02-xxx.fp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02-xxx.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02-xxx.fp index 3ba4c8d40..4f66cb41e 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02-xxx.fp +++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer02-xxx.fp @@ -3,22 +3,22 @@ #include uniforms.glsl
#include varyings.glsl
-const GRAPHP vec3 b_color = vec3(0.0, 0.0, 0.0);
-const GRAPHP vec4 tex_weights = vec4(0.075, 0.06, 0.045, 0.025);
+const vec3 b_color = vec3(0.0, 0.0, 0.0);
+const vec4 tex_weights = vec4(0.075, 0.06, 0.045, 0.025);
void main (void)
{
- GRAPHP vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
- GRAPHP vec3 c = gcu_ColorStatic.rgb;
+ vec2 rtex = vec2(abs(gcv_TexCoord.x),abs(gcv_TexCoord.y));
+ vec3 c = gcu_ColorStatic.rgb;
- GRAPHP float alpha = 0.0;
+ float alpha = 0.0;
if((gcv_TexCoord.x == 0.0) && (gcv_TexCoord.y == 0.0)) {
alpha = gcu_Alpha;
}
else if((gcv_TexCoord.x >= 5.0)) {
- GRAPHP vec2 dfx = dFdx(gcv_TexCoord);
- GRAPHP vec2 dfy = dFdy(gcv_TexCoord);
+ vec2 dfx = dFdx(gcv_TexCoord);
+ vec2 dfy = dFdy(gcv_TexCoord);
// vec2 size;
//#if __VERSION__ < 130
@@ -27,7 +27,7 @@ void main (void) // size = 1.0/textureSize(gcu_TextureUnit,0);
//#endif
rtex -= 5.0;
- GRAPHP vec4 t = texture2D(gcu_TextureUnit, rtex)* 0.18;
+ vec4 t = texture2D(gcu_TextureUnit, rtex)* 0.18;
t += texture2D(gcu_TextureUnit, rtex + size*(vec2(1, 0)))*tex_weights.x;
t += texture2D(gcu_TextureUnit, rtex - size*(vec2(1, 0)))*tex_weights.x;
@@ -67,20 +67,20 @@ void main (void) rtex.y = 0.0;
}
}
- GRAPHP vec2 dtx = dFdx(rtex);
- GRAPHP vec2 dty = dFdy(rtex);
+ vec2 dtx = dFdx(rtex);
+ vec2 dty = dFdy(rtex);
- GRAPHP float w = gcu_Weight;
- GRAPHP float pd = ((2.0 - (2.0*w))*rtex.x*rtex.x) + 2.0*(w-1.0)*rtex.x + 1.0;
- GRAPHP float position = rtex.y - ((w*rtex.x*(1.0 - rtex.x))/pd);
+ float w = gcu_Weight;
+ float pd = ((2.0 - (2.0*w))*rtex.x*rtex.x) + 2.0*(w-1.0)*rtex.x + 1.0;
+ float position = rtex.y - ((w*rtex.x*(1.0 - rtex.x))/pd);
- GRAPHP float aph = 2.0 - 2.0*w;
+ float aph = 2.0 - 2.0*w;
- GRAPHP float gd = (aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0)*(aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0);
- GRAPHP vec2 f = vec2((dtx.y - (w*dtx.x*(1.0 - 2.0*rtex.x))/gd), (dty.y - (w*dty.x*(1.0 - 2.0*rtex.x))/gd));
+ float gd = (aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0)*(aph*rtex.x*rtex.x + 2.0*rtex.x + 1.0);
+ vec2 f = vec2((dtx.y - (w*dtx.x*(1.0 - 2.0*rtex.x))/gd), (dty.y - (w*dty.x*(1.0 - 2.0*rtex.x))/gd));
- GRAPHP float d = position/(length(f));
- GRAPHP float a = (0.5 - d * sign(gcv_TexCoord.y));
+ float d = position/(length(f));
+ float a = (0.5 - d * sign(gcv_TexCoord.y));
if (a >= 1.0) {
alpha = gcu_Alpha;
} else if (a <= 0.0) {
|