Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/data_extern/programs/GLSL150/mrttestfp_scene.glsl @ 12202

Last change on this file since 12202 was 12115, checked in by wiesep, 6 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 486 bytes
Line 
1#version 130
2
3// Need to enable the draw buffers extension
4#extension GL_ARB_draw_buffers : enable
5
6uniform sampler2D tex0;
7
8void main()                   
9{
10        vec4 baseColour = texture(tex0, gl_TexCoord[0].xy);
11
12        gl_FragData[0] = baseColour;
13
14        gl_FragData[1] = baseColour * vec4(1, 0, 0, 1);
15
16        float abs = (baseColour.r + baseColour.g + baseColour.b) * 0.333;
17        gl_FragData[2] = vec4(abs, abs, abs, 1);
18       
19        float invabs = 1.0 - abs;
20        gl_FragData[3] = vec4(invabs, invabs, invabs, 1);
21}
22
Note: See TracBrowser for help on using the repository browser.