#version 300 es precision highp float; in vec4 fragNormal; in vec3 v_surfaceToLight; uniform vec4 u_color; uniform vec3 u_light; uniform vec3 u_lightPos; out vec4 outColor; void main() { float light = max(dot(fragNormal.xyz, normalize(v_surfaceToLight).xyz), u_light.x); outColor = u_color; outColor.rgb *= light; }