Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //vertexShader.vert
- #version 330 core
- layout (location = 0) in vec3 position;
- layout (location = 1) in vec3 inColor;
- layout (location = 2) in vec2 texCoord;
- out vec2 TexCoord;
- uniform vec4 ourPos2;
- void main()
- {
- gl_Position = vec4(position.x, position.y, position.z, 1.0) / ourPos2;
- TexCoord = texCoord;
- }
- //fragmentShader.frag
- #version 330 core
- in vec2 TexCoord;
- out vec4 color;
- uniform sampler2D ourTexture;
- void main()
- {
- color = texture(ourTexture, TexCoord);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement