Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 330
- uniform mat4 viewMatrix;
- uniform mat4 projectionMatrix;
- uniform mat4 modelMatrix;
- uniform mat3 normalMatrix;
- uniform mat3 normalModelMatrix;
- uniform vec4 modelColor;
- layout (location = 0) in vec3 position;
- layout (location = 1) in vec3 normal;
- layout (location = 2) in vec2 texCoords;
- layout (location = 3) in vec4 in_Color;
- out vec3 vNormal;
- out vec2 vTexCoords;
- out vec4 vColor;
- out vec3 vEyePosition;
- void main(){
- vEyePosition = (viewMatrix * modelMatrix * vec4(position, 1.0)).xyz;
- gl_Position = projectionMatrix * vec4(vEyePosition, 1.0);
- vNormal = normalMatrix * normalModelMatrix * normal;
- vTexCoords = texCoords;
- vColor = in_Color * modelColor;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement