diff options
Diffstat (limited to 'src/quick/scenegraph/shaders/visualization.vert')
-rw-r--r-- | src/quick/scenegraph/shaders/visualization.vert | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/quick/scenegraph/shaders/visualization.vert b/src/quick/scenegraph/shaders/visualization.vert new file mode 100644 index 0000000000..f1892b71da --- /dev/null +++ b/src/quick/scenegraph/shaders/visualization.vert @@ -0,0 +1,22 @@ +attribute highp vec4 v; +uniform highp mat4 matrix; +uniform highp mat4 rotation; + +// w -> apply 3d rotation and projection +uniform lowp vec4 tweak; + +varying mediump vec2 pos; + +void main() +{ + vec4 p = matrix * v; + + if (tweak.w > 0.0) { + vec4 proj = rotation * p; + gl_Position = vec4(proj.x, proj.y, 0, proj.z); + } else { + gl_Position = p; + } + + pos = v.xy * 1.37; +} |