Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #version 330
- in vec3 v_norm;
- in vec4 v_pos;
- in mat4 mv;
- in vec3 v_lightDirection;
- out vec4 outputColor;
- void
- main()
- {
- vec3 ambientColor = vec3(0.1, 0.1, 0.1);
- vec3 lightColor = vec3(0.6, 0.55, 0.55);
- float lambertDiffuse = max(dot(v_norm, v_lightDirection), 0.0);
- outputColor.a = 1.0;
- outputColor.rgb = ambientColor + lightColor * lambertDiffuse;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement