Carna  Version 3.0.1
full_frame_quad.frag
1 #version 330
2 
3 /*
4  * Copyright (C) 2010 - 2015 Leonid Kostrykin
5  *
6  * Chair of Medical Engineering (mediTEC)
7  * RWTH Aachen University
8  * Pauwelsstr. 20
9  * 52074 Aachen
10  * Germany
11  *
12  */
13 
14 uniform sampler2D colorMap;
15 uniform float alphaFactor;
16 
17 in vec2 textureCoordinates;
18 
19 out vec4 gl_FragColor;
20 
21 
22 // ----------------------------------------------------------------------------------
23 // Fragment Procedure
24 // ----------------------------------------------------------------------------------
25 
26 void main()
27 {
28  vec4 color = texture( colorMap, textureCoordinates );
29  gl_FragColor = vec4( color.rgb, color.a * alphaFactor );
30 }