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.
 
 
 

24 lines
460 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;
out vec3 frag_normal;
layout (std140) uniform matrices
{
mat4 view_xform;
mat4 proj_xform;
mat4 normal_xform;
};
uniform mat4 model_xform;
void main()
{
mat4 screen_xform = proj_xform * view_xform * model_xform;
frag_normal = vec4(screen_xform * vec4(normal, 1)).xyz;
gl_Position = screen_xform * vec4(position, 1);
}