Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // each shader begins with a declaration of its version
- #version 330 core
- layout (location = 0) in vec3 position_in; // we declare input vertex attribues, we only a single one (position) now
- layout (location = 1) in vec2 texture_coordinates_in;
- uniform mat4 model;
- uniform mat4 view;
- uniform mat4 projection;
- out vec2 texture_coordinates;
- void main()
- {
- gl_Position = projection * view * model * vec4(position_in, 1.0); // gl_Position is the output position of each vertex
- texture_coordinates = texture_coordinates_in;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement