2 * \file cube_map_frag.glsl
3 * \brief Cube map fragment shader without shading.
8 smooth in vec3 texCoord0;
10 uniform mat4 colorMatrix;
11 uniform samplerCube texture0;
18 // apply cube map and determine color
19 vec4 color = texture(texture0, texCoord0);
21 // transform color by color matrix
22 vec4 transformedColor = colorMatrix * vec4(color.rgb, 1.);
23 transformedColor /= transformedColor.a; // perspective division
25 // set final fragment color
26 fragColor = clamp(vec4(transformedColor.rgb, color.a), 0., 1.);