Carna Version 3.3.3
Loading...
Searching...
No Matches
interleave.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
14uniform sampler2D colorMap;
15uniform int mod2result;
16
17in vec2 textureCoordinates;
18
19layout( location = 0 ) out vec4 _gl_FragColor;
20
21
22// ----------------------------------------------------------------------------------
23// Fragment Procedure
24// ----------------------------------------------------------------------------------
25
26void main()
27{
28 if( mod( int( gl_FragCoord.y + 0.5 ), 2 ) == mod2result )
29 {
30 vec4 color = texture( colorMap, textureCoordinates );
31 _gl_FragColor = color;
32 }
33 else
34 {
35 discard;
36 }
37}