4 * Copyright (C) 2021 Leonid Kostrykin
9uniform mat4 normalsView;
13layout( location = 0 ) 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 );