summaryrefslogtreecommitdiff
path: root/chart2/opengl/shape3DVertexShaderV300.glsl
diff options
context:
space:
mode:
authorweigao <weigao@multicorewareinc.com>2014-08-03 18:55:54 +0800
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-08-06 20:45:13 +0200
commite3d4a488a0c3eab68d4c77139f8d9b203e1ddafc (patch)
tree5566a8db574c99e0b5b7a1db6376314322d0ce86 /chart2/opengl/shape3DVertexShaderV300.glsl
parent495d53b1dc0f3c32e0b76344775b9fc728e09fe5 (diff)
make GL 3.0 support bars scroll
Change-Id: I71d8d94f410e6c67d0e188ea2e0f79eb151758e0
Diffstat (limited to 'chart2/opengl/shape3DVertexShaderV300.glsl')
-rw-r--r--chart2/opengl/shape3DVertexShaderV300.glsl8
1 files changed, 6 insertions, 2 deletions
diff --git a/chart2/opengl/shape3DVertexShaderV300.glsl b/chart2/opengl/shape3DVertexShaderV300.glsl
index 6737004cb914..a8da294fb3cd 100644
--- a/chart2/opengl/shape3DVertexShaderV300.glsl
+++ b/chart2/opengl/shape3DVertexShaderV300.glsl
@@ -16,12 +16,16 @@ uniform mat4 P;
uniform mat4 M;
uniform mat4 V;
uniform mat3 normalMatrix;
+uniform float minCoordX;
+uniform float maxCoordX;
void main()
{
- gl_Position = P * V * M * vec4(vertexPositionModelspace,1);
+ positionWorldspace = (M * vec4(vertexPositionModelspace,1)).xyz;
- positionWorldspace = (M * vec4(vertexPositionModelspace,1)).xyz;
+ positionWorldspace.x = clamp(positionWorldspace.x, minCoordX, maxCoordX);
+
+ gl_Position = P * V * vec4(positionWorldspace,1);
normalCameraspace = normalize(mat3(V) * normalMatrix * vertexNormalModelspace);
}