diff options
author | Dennis Kasprzyk <onestone@opencompositing.org> | 2008-01-23 19:55:39 +0100 |
---|---|---|
committer | Dennis Kasprzyk <onestone@opencompositing.org> | 2008-01-23 19:55:39 +0100 |
commit | 87a564f616211ad2bbf41f708d33ce33a82801e2 (patch) | |
tree | 924f1e543209a43f53d121a19e5b3a2f425bc228 | |
parent | b4b914905d516e236b40961108f0723f0b1c8b15 (diff) | |
download | mag-87a564f616211ad2bbf41f708d33ce33a82801e2.tar.gz mag-87a564f616211ad2bbf41f708d33ce33a82801e2.tar.bz2 |
Replaced KIL shader operation with CMP to support more hardware.
-rw-r--r-- | mag.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -103,13 +103,12 @@ static const char *fisheyeFpString = "PARAM p1 = program.env[1];" "PARAM p2 = program.env[2];" - "TEMP t1, t2, t3;" + "TEMP t0, t1, t2, t3;" "SUB t1, p0.xyww, fragment.position;" "DP3 t2, t1, t1;" "RSQ t2, t2.x;" - "SUB t3, t2, p0;" - "KIL t3.z;" + "SUB t0, t2, p0;" "RCP t3, t2.x;" "MUL t3, t3, p1.z;" @@ -119,7 +118,9 @@ static const char *fisheyeFpString = "MUL t1, t2, t1;" "MAD t1, t1, t3, fragment.position;" - + + "CMP t1, t0.z, fragment.position, t1;" + "MAD t1, t1, p1, p2;" "TEX result.color, t1, texture[0], %s;" |