Advertisement
Guest User

Untitled

a guest
Sep 20th, 2020
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.55 KB | None | 0 0
  1. //fragment
  2. #version 400 core
  3. out vec4 FragColor;
  4.  
  5. in vec2 TexCoord;
  6.  
  7. uniform sampler2D Texture;
  8.  
  9. void main()
  10. {
  11.     FragColor = texture(Texture, TexCoord);
  12.     //FragColor = vec4(1.0f, 1.0f, 1.0f, 1.0f);
  13. }
  14.  
  15. //vertex
  16. #version 400 core
  17. layout (location = 0) in vec3 aPos;
  18. layout (location = 1) in vec2 aTexCoord;
  19. layout (location = 2) in vec2 aNormals;
  20.  
  21. out vec2 TexCoord;
  22.  
  23. uniform mat4 model;
  24. uniform mat4 view;
  25. uniform mat4 projection;
  26.  
  27. void main()
  28. {
  29.     gl_Position = projection * view * model * vec4(aPos, 1.0f);
  30.     TexCoord = aTexCoord;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement