4 * Copyright (C) 2021 Leonid Kostrykin
9uniform mat4 modelTexture;
10uniform bool ignoreColor;
13in vec4 modelSpaceCoordinates;
15layout( location = 0 ) out vec4 _gl_FragColor;
18// ----------------------------------------------------------------------------------
20// ----------------------------------------------------------------------------------
24 if( abs( modelSpaceCoordinates.x ) > 0.5 || abs( modelSpaceCoordinates.y ) > 0.5 || abs( modelSpaceCoordinates.z ) > 0.5 )
29 vec4 textureCoordinates = modelTexture * modelSpaceCoordinates;
30 float intensity = texture( mask, textureCoordinates.xyz ).r;
35 _gl_FragColor = vec4( intensity, 0, 0, 1.0 );
39 _gl_FragColor = vec4( color );