Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 35 | chris | 1 | !!ARBfp1.0 |
| 2 | OPTION ARB_precision_hint_fastest; |
||
| 3 | |||
| 4 | |||
| 5 | # Purpose: |
||
| 6 | |||
| 7 | |||
| 8 | # Input Parameters: |
||
| 9 | # Tex 0: Frame buffer texture |
||
| 10 | # TexCoord 0: Texel in the frame buffer |
||
| 11 | # Env 0: Intensity of the effect. |
||
| 12 | # x: Intensity. |
||
| 13 | # Env 1: Pixel size. |
||
| 14 | # x: Pixel size. |
||
| 15 | # y: 1/Pixel size. |
||
| 16 | |||
| 17 | |||
| 18 | TEMP framebuffer; |
||
| 19 | |||
| 20 | # Pixelate texel lookup |
||
| 21 | TEMP lookup; |
||
| 22 | |||
| 23 | MUL lookup, fragment.texcoord[0], program.env[1].x; |
||
| 24 | FLR lookup, lookup; |
||
| 25 | MUL lookup, lookup, program.env[1].y; |
||
| 26 | MOV lookup.zw, {0.0, 0.0, 0.0, 1.0}; |
||
| 27 | |||
| 28 | TEX framebuffer, lookup, texture[0], 2D; |
||
| 29 | |||
| 30 | MUL framebuffer, framebuffer, 4.0; |
||
| 31 | FLR framebuffer, framebuffer; |
||
| 32 | MUL framebuffer, framebuffer, 0.25; |
||
| 33 | |||
| 34 | MOV result.color.rgb, framebuffer; |
||
| 35 | MOV result.color.a, program.env[0].x; |
||
| 36 | |||
| 37 | END |