data/filters/blackandwhite
raw| 1 | !!ARBfp1.0 |
| 2 | TEMP tex, temp, black, white; |
| 3 | MOV black, {0, 0, 0, 0}; |
| 4 | MOV white, {1, 1, 1, 1}; |
| 5 | TEX tex, fragment.texcoord[0], texture[0], RECT; |
| 6 | DP3 temp.x, tex, {0.33333, 0.33333, 0.33333, 0}; |
| 7 | ADD temp.x, temp.x, -0.5; |
| 8 | CMP temp, temp.x, black, white; |
| 9 | MOV temp.a, tex.a; |
| 10 | MOV result.color, temp; |
| 11 | END |