4 * Copyright (C) 2021 Leonid Kostrykin
9 uniform mat4 normalsView;
13 out vec4 gl_FragColor;
16 // ----------------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------------
22 vec3 lightDirection = vec3( 0, 0, -1 );
23 float diffuseLightAmount = max( 0, -dot( normalize( ( normalsView * normal ).xyz ), lightDirection ) );
24 gl_FragColor = vec4( color.rgb * diffuseLightAmount, color.a );