diff options
author | Sven Göthel <[email protected]> | 2024-01-09 03:37:00 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-09 03:37:00 +0100 |
commit | 335dd0a493fff1435cad1cd22e4ac5a20d7df03a (patch) | |
tree | a848055c1f3bc6f8d9ab630816a3e3e0c0f6149a /src/jogl/classes/jogamp | |
parent | bb11c498b7d4fe269e7273a1b164e46f3c7a3b50 (diff) |
Graph Clipping: Add missing Modelview-Matrix (Mv) Multiplication / Consideration
- GLSL vertex shader sets smooth varying 'gcv_ClipBBoxCoord' w/ Mv multiplied vertex-coord
- RegionRenderer.setClipBBox(AABBox) expects a pre-multiplied Mv AABBox covering an independent area, not per Shape/Region.
- This works as expected with moving/scaling of each Shape/Region etc
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp | 2 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp index 6956529f7..b9974b97d 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp +++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-pass1.vp @@ -24,7 +24,7 @@ void main(void) } #endif #ifdef USE_AABBOX_CLIPPING - gcv_ClipBBoxCoord = gca_Vertices.xyz; + gcv_ClipBBoxCoord = (gcu_PMVMatrix02[1] * gca_Vertices).xyz; // Mv #endif #ifdef USE_COLOR_TEXTURE diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp index aebf8c147..9518834b0 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp +++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp @@ -24,7 +24,7 @@ void main(void) } #endif #ifdef USE_AABBOX_CLIPPING - gcv_ClipBBoxCoord = gca_Vertices.xyz; + gcv_ClipBBoxCoord = (gcu_PMVMatrix01[1] * gca_Vertices).xyz; // Mv #endif #ifdef USE_COLOR_TEXTURE |