Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #VERTEX SHADER
- #version 330
- // Shader adapted from: Florian Boesch
- // http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/
- layout (location = 0) in vec3 VertexPosition;
- in vec4 aColor;
- out vec4 vColor;
- uniform mat4 ModelViewMatrix;
- uniform mat4 MVP;
- uniform vec4 Color;
- void main()
- {
- gl_Position = MVP * vec4(VertexPosition,1.0);
- vColor = Color;
- }
- #FRAGMENT SHADER
- #version 330
- in vec4 vColor;
- layout( location = 0 ) out vec4 FragColor;
- void main(){
- gl_FragColor = vColor;
- }
Advertisement
Add Comment
Please, Sign In to add comment