diff options
author | Sven Gothel <[email protected]> | 2014-04-01 16:31:05 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-04-01 16:31:05 +0200 |
commit | b935d5248aef79e2386a284b32f5888348a382d6 (patch) | |
tree | 6b661210ee531968fcf7d5c75ded4ed58bd3b0fc /src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp | |
parent | 07d1c5a272e528d130daf37b9aa7077aac8d748e (diff) |
Bug 801: WIP 1/2 - Add color attribute; Switch Shader instead of branching in shader; Update attributes and uniforms manually, drop ShaderState;
- ShaderCode
- add int insertShaderSource(int shaderIdx, int position, Class<?> context, String path)
- insertShaderSource(..): pos==-1 -> append code
- VectorUtil
- add isVec3InTriangle3(..., float epsilon)
- add testSeg2SegIntersection(..., float epsilon)
- add testTri2SegIntersection(..., float epsilon)
- AffineTransform: Return result for chaining
- Font
- Add pixel precise 'getPointsBounds(final AffineTransform transform, CharSequence string, float pixelSize)'
- Rename getString*() -> getMetric*()
- OTGlyph: Release _points field, no more used
-
- Graph Triangulation
- Count additional vertices in: Triangulator, CDTriangulator2D
- OutlineShape:
- Allow skipping of 'transformOutlines2Quadratic', i.e. allow tagging
OutlineShape to be quadratic_nurbs via 'setIsQuadraticNurbs()'
- Clarify cleanup ot outlines in same method 'cleanupOutlines()'
- Count additional vertices ..
- Graph Shader:
- Start splitting and segmenting shader code for:
- pass1 / pass2
- features, i.e. sampleCont, color-channel, ..
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp | 30 |
1 files changed, 30 insertions, 0 deletions
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 new file mode 100644 index 000000000..7598c23f8 --- /dev/null +++ b/src/jogl/classes/jogamp/graph/curve/opengl/shader/curverenderer01-single.vp @@ -0,0 +1,30 @@ +//Copyright 2010 JogAmp Community. All rights reserved. + +#if __VERSION__ >= 130 + #define attribute in + #define varying out +#endif + +#include uniforms.glsl +#include attributes.glsl +#include varyings.glsl + +void main(void) +{ + // gl_Position = gcu_PMVMatrix01[0] * gcu_PMVMatrix01[1] * vec4(gca_Vertices, 1); + gl_Position = gcu_PMVMatrix01[0] * gcu_PMVMatrix01[1] * gca_Vertices; +#if 1 + gcv_CurveParam = gca_CurveParams; +#else + if( gcv_CurveParams.x <= -10.0 ) { + // vec4 tc = gcu_PMVMatrix01[0] * gcu_PMVMatrix01[1] * vec4(gca_CurveParams.xy, gca_Vertices.z, 1); + // gcv_CurveParams = vec3(tc.xy, gca_CurveParams.z); + gcv_CurveParam = gca_CurveParams; + } else { + gcv_CurveParam = gca_CurveParams; + } +#endif +#ifdef USE_COLOR_CHANNEL + gcv_Color = gca_Colors; +#endif +} |