Last change
on this file since 12408 was
12115,
checked in by wiesep, 6 years ago
|
Changed folder structure, deletet some unused files and cleaned up code
|
File size:
474 bytes
|
Line | |
---|
1 | // Need to enable the draw buffers extension |
---|
2 | #extension GL_ARB_draw_buffers : enable |
---|
3 | |
---|
4 | uniform sampler2D tex0; |
---|
5 | |
---|
6 | void main() |
---|
7 | { |
---|
8 | vec4 baseColour = texture2D(tex0, gl_TexCoord[0].xy); |
---|
9 | |
---|
10 | gl_FragData[0] = baseColour; |
---|
11 | |
---|
12 | gl_FragData[1] = baseColour * vec4(1, 0, 0, 1); |
---|
13 | |
---|
14 | float abs = (baseColour.r + baseColour.g + baseColour.b) * 0.333; |
---|
15 | gl_FragData[2] = vec4(abs, abs, abs, 1); |
---|
16 | |
---|
17 | float invabs = 1.0 - abs; |
---|
18 | gl_FragData[3] = vec4(invabs, invabs, invabs, 1); |
---|
19 | } |
---|
20 | |
---|
Note: See
TracBrowser
for help on using the repository browser.