summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/shaders/positionmap.frag
blob: 9a277ab8b36dc503541805af3654c14cda61bf81 (plain)
1
2
3
4
5
6
7
8
9
10
11
varying highp vec3 pos;

void main() {
    // This shader encodes the axis position into the vertex color, assuming the object
    // is a cube filling the entire data area of the graph
    gl_FragColor = vec4((pos.x + 1.0) / 2.0,
                        (pos.y + 1.0) / 2.0,
                        (-pos.z + 1.0) / 2.0,
                        0.0);
}