Source

gltut / Tut 06 Objects in Motion / data / PosColorLocalTransform.vert

Full commit
Jason McKesson c689e4d 
Jason McKesson a6c11fc 
Jason McKesson c689e4d 

Jason McKesson a6c11fc 










#version 330

layout(location = 0) in vec4 position;
layout(location = 1) in vec4 color;

smooth out vec4 theColor;

uniform mat4 cameraToClipMatrix;
uniform mat4 modelToCameraMatrix;

void main()
{
	vec4 cameraPos = modelToCameraMatrix * position;
	gl_Position = cameraToClipMatrix * cameraPos;
	theColor = color;
}