Ambient Lightning
This commit is contained in:
parent
666d3e1ea2
commit
ce75297105
@ -14,7 +14,7 @@ void main(void) {
|
|||||||
vec3 unitToLightVector = normalize(toLightVector);
|
vec3 unitToLightVector = normalize(toLightVector);
|
||||||
|
|
||||||
float nDotl = dot(unitNormal, unitToLightVector);
|
float nDotl = dot(unitNormal, unitToLightVector);
|
||||||
float brightness = max(nDotl, 0.0);
|
float brightness = max(nDotl, 0.2);
|
||||||
vec3 diffusde = brightness * lightColor;
|
vec3 diffusde = brightness * lightColor;
|
||||||
|
|
||||||
out_Color = vec4(diffusde, 1.0) * texture(textureSampler, pass_textureCoords);
|
out_Color = vec4(diffusde, 1.0) * texture(textureSampler, pass_textureCoords);
|
||||||
|
Loading…
Reference in New Issue
Block a user