diff options
author | Sven Göthel <[email protected]> | 2024-01-31 12:01:15 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-31 12:01:15 +0100 |
commit | fe8f67563aa0bf2ff8f6e242c13f1d267c18b7f5 (patch) | |
tree | 596e1ca8f3b2645c74de8ba5392fa58ec090ce9e /src/jogl/classes/jogamp/graph/curve | |
parent | db2daee62669ee649a6cb1d8d99731c6b3d3a250 (diff) |
Graph shader (pass1 simple): USE_COLOR_TEXTURE: Clip to vec4(0) color using alpha 0 instead of the debug color white vec4(1), which leads to the white seam if out of gcu_ColorTexBBox
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1-curve_simple.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1-curve_simple.glsl b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1-curve_simple.glsl index edb3b553b..032ca9228 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1-curve_simple.glsl +++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1-curve_simple.glsl @@ -12,12 +12,12 @@ if( gcv_CurveParam.x == 0.0 && gcv_CurveParam.y == 0.0 ) { // pass-1: Lines #if defined(USE_COLOR_TEXTURE) && defined(USE_COLOR_CHANNEL) - vec4 t = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(1), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]); + vec4 t = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(0), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]); mgl_FragColor = vec4( mix( t.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ), mix( t.a * gcu_ColorStatic.a, 1, gcv_Color.a) ); #elif defined(USE_COLOR_TEXTURE) - mgl_FragColor = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(1), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]) + mgl_FragColor = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(0), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]) * gcu_ColorStatic; #elif defined(USE_COLOR_CHANNEL) mgl_FragColor = gcv_Color * gcu_ColorStatic; @@ -36,12 +36,12 @@ float a = clamp(0.5 - ( position/length(f) ) * sign(gcv_CurveParam.y), 0.0, 1.0); #if defined(USE_COLOR_TEXTURE) && defined(USE_COLOR_CHANNEL) - vec4 t = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(1), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]); + vec4 t = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(0), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]); mgl_FragColor = vec4( mix( t.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ), a * mix( t.a * gcu_ColorStatic.a, 1, gcv_Color.a) ); #elif defined(USE_COLOR_TEXTURE) - vec4 t = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(1), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]); + vec4 t = clip_coord(gcuTexture2D(gcu_ColorTexUnit, gcv_ColorTexCoord.st), vec4(0), gcv_ColorTexCoord, vec2(0), gcu_ColorTexBBox[2]); mgl_FragColor = vec4(t.rgb * gcu_ColorStatic.rgb, t.a * gcu_ColorStatic.a * a); #elif defined(USE_COLOR_CHANNEL) |