Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////////////////////////////////
- // Pixel shader for the final pass
- //
- // Copyright 2013 DigiPen Institute of Technology
- ////////////////////////////////////////////////////////////////////////
- #version 330
- uniform vec3 phongDiffuse;
- uniform bool useTexture;
- uniform sampler2D groundColor;
- in vec3 normalVec;
- in vec4 pos;
- out vec4 f_vertexPos;
- out vec4 f_vertexNormal;
- out vec4 f_vertexDiffuse;
- in vec2 texCoord;
- void main()
- {
- vec3 Kd = phongDiffuse;
- if (useTexture)
- {
- Kd = texture(groundColor,2.0*texCoord.st).xyz;
- }
- f_vertexPos.xyz = pos.xyz;
- f_vertexPos.w = 1.0f;
- f_vertexNormal.xyz = normalVec;
- f_vertexNormal.w = 1.0f;
- f_vertexDiffuse.xyz = Kd;
- }
Advertisement
Add Comment
Please, Sign In to add comment