Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vertex shader:
- #version 330 core
- layout (location = 0) in vec2 vertex_position;
- layout (location = 1) in vec2 vertex_UV;
- out vec2 fragment_UV;
- uniform mat3 MVP;
- void main(){
- gl_Position = vec4(MVP*vec3(vertex_position, 1.0),1.0);
- fragment_UV = vertex_UV;
- }
- fragment shader:
- #version 330 core
- in vec2 fragment_UV;
- out vec3 color;
- uniform sampler2D Texture;
- void main(){
- color = texture2D(Texture, fragment_UV).rgb;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement