aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-30 01:28:59 +0200
committerSven Gothel <[email protected]>2023-09-30 01:28:59 +0200
commit297c48f4fefd1ab59800524ea5f0dd56684d6786 (patch)
tree02c1b8f65de349c9af3bc2a5b94e04e90d75c684 /src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp
parent2e46eb1bf06ef07801062122716aa99a6c871646 (diff)
Bug 1465 - Graph / GraphUI: Render a Region's ColorTexture in proper aspect-ratio, letter-boxed or zoomed (config) + Bug 1466 Fix color mixing
Bug 1465: Region currently simply bloats a given texture to its region AABBox, which renders textures with the wrong aspect ratio. Add facility to program the texture-coordinates to either letter-box or scaled-up (and cut) true aspect-ratio. Default shall be zoom (scale-up and cut), but user shall be able to set a flag in the Region for letter-box. Have the shader clip texture coordinates properly, best w/o branching to soothe performance. See functions.glsl +++ Bug 1466: Current color mix: texture * color_channel * color_static is useless in GraphUI. color_static shall modulate the texture, which works. But in case of color_channel (attribute/varying) we want it to be mixed so it can become the more dominant color for e.g. a border. Desired is: color = vec4( mix( tex.rgb * gcu_ColorStatic.rgb, gcv_Color.rgb, gcv_Color.a ), mix( tex.a * gcu_ColorStatic.a, 1, gcv_Color.a) );
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp
index 05407a4e6..c88619154 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-segment-head.fp
@@ -1,4 +1,4 @@
-//Copyright 2010 JogAmp Community. All rights reserved.
+// Copyright 2010-2023 JogAmp Community. All rights reserved.
//
// 2-pass shader w/o weight
@@ -13,4 +13,3 @@
#endif
#define GetSample(texUnit, texCoord, psize, cx, cy, offX, offY) texture2D(texUnit, texCoord + psize * vec2(cx+offX, cy+offY))
-