|
Revision 9445
(checked in by robert, 4 days ago)
|
From Gerrick Bivins, "This shader failed to compile on my mac and I noticed there was a TODO note in the code to fix it...
This should work now, although I don't have a linux or windows box to test it at the moment."
|
| Line | |
|---|
| 1 |
// osgWidget/GLSL - Copyright (C) 2007 Jeremy Moles |
|---|
| 2 |
// $Id: osgwidgetshader-frag.glsl 59 2008-05-15 20:55:31Z cubicool $ |
|---|
| 3 |
|
|---|
| 4 |
varying vec4 color; |
|---|
| 5 |
|
|---|
| 6 |
void main() |
|---|
| 7 |
{ |
|---|
| 8 |
vec4 c = clamp(color, 0.0, 1.0); |
|---|
| 9 |
|
|---|
| 10 |
if(mod(gl_FragCoord.y, 10.0) >= 3.0) |
|---|
| 11 |
{ |
|---|
| 12 |
gl_FragColor = c * vec4( |
|---|
| 13 |
gl_FragCoord.y / 1024.0, |
|---|
| 14 |
gl_FragCoord.y / 1024.0, |
|---|
| 15 |
gl_FragCoord.y / 1024.0, |
|---|
| 16 |
0.5); |
|---|
| 17 |
|
|---|
| 18 |
} |
|---|
| 19 |
else |
|---|
| 20 |
{ |
|---|
| 21 |
gl_FragColor = c * vec4( |
|---|
| 22 |
gl_FragCoord.y / 1024.0, |
|---|
| 23 |
gl_FragCoord.y / 1024.0, |
|---|
| 24 |
gl_FragCoord.y / 1024.0, |
|---|
| 25 |
1.0); |
|---|
| 26 |
} |
|---|
| 27 |
} |
|---|