4 * Copyright (C) 2010 - 2016 Leonid Kostrykin
6 * Chair of Medical Engineering (mediTEC)
7 * RWTH Aachen University
13 * Copyright (C) 2021 - 2025 Leonid Kostrykin
17uniform sampler3D mask;
18uniform mat4 modelTexture;
19uniform bool ignoreColor;
22in vec4 modelSpaceCoordinates;
24layout( location = 0 ) out vec4 _gl_FragColor;
27// ----------------------------------------------------------------------------------
29// ----------------------------------------------------------------------------------
33 if( abs( modelSpaceCoordinates.x ) > 0.5 || abs( modelSpaceCoordinates.y ) > 0.5 || abs( modelSpaceCoordinates.z ) > 0.5 )
38 vec4 textureCoordinates = modelTexture * modelSpaceCoordinates;
39 float intensity = texture( mask, textureCoordinates.xyz ).r;
44 _gl_FragColor = vec4( intensity, 0, 0, 1.0 );
48 _gl_FragColor = vec4( color );