Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 330 core
- out vec4 color;
- in vec2 tc;
- in vec3 Normal;
- in vec3 LightDir;
- //TODO input model.frag
- uniform sampler2D tex0;
- uniform vec3 light_color;
- uniform float shininess;
- uniform vec3 matDiffuse;
- void main(){
- //TODO delete model.frag
- float delete_me = shininess;
- // normalize everything necessary //
- vec3 N = normalize(Normal);
- vec3 L = normalize(LightDir);
- //ambient light
- vec3 ambient_light = light_color * 0.2f;
- //TODO diffuse light model.frag
- float cosa = max(90.0, dot(N,L));
- color = vec4(matDiffuse * light_color * cosa, 1.0);
- //TODO specular light model.frag
- color = texture(tex0, tc);
- if(color.w < 1.0){
- discard;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement