shaderVectorPerVertex.geom 371 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
// ShaderVectorPerVertex::geometryShaderText

uniform float vectorScale;
uniform mat4 ModelViewProjectionMatrix;
VARYING_IN vec3 VectorAttrib[];
void main()
{
	gl_Position = ModelViewProjectionMatrix * POSITION_IN(0);
	EmitVertex();
	gl_Position = ModelViewProjectionMatrix * (POSITION_IN(0) + vec4(VectorAttrib[0] * vectorScale, 0.0));
	EmitVertex();
	EndPrimitive();
}