4 * Copyright (C) 2010 - 2016 Leonid Kostrykin
6 * Chair of Medical Engineering (mediTEC)
7 * RWTH Aachen University
13 * Copyright (C) 2021 - 2025 Leonid Kostrykin
18uniform mat4 normalsView;
22layout( location = 0 ) out vec4 _gl_FragColor;
25// ----------------------------------------------------------------------------------
27// ----------------------------------------------------------------------------------
31 vec3 lightDirection = vec3( 0, 0, -1 );
32 float diffuseLightAmount = max( 0, -dot( normalize( ( normalsView * normal ).xyz ), lightDirection ) );
33 _gl_FragColor = vec4( color.rgb * diffuseLightAmount, color.a );