Small program to quickly test OpenGL GLSL shaders.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
550 B (Stored with Git LFS)

#version 330 core
layout (location = 0) in vec3 position;
layout (location = 1) in vec3 normal;
layout (location = 2) in vec3 uv;
layout (location = 3) in vec3 color;
out vec3 frag_vertex;
out vec3 frag_normal;
out vec3 frag_uv;
out vec3 frag_color;
layout (std140) uniform matrices
{
mat4 view_xform;
mat4 proj_xform;
mat4 normal_xform;
};
uniform mat4 model_xform;
void main()
{
frag_vertex = position;
frag_normal = normal;
frag_uv = uv;
frag_color = color;
gl_Position = proj_xform * view_xform * model_xform * vec4(position, 1);
}