原討論請看這裡!!
http://www.beyond3d.com/forum/viewtopic.php?t=14874
長達16頁的討論...而且原修改經過不少討論修正
最後JC的回應,產生最後的答案...
只要修改一行即可...而且效能真的提昇了!!
引用一下 Humus 所 post來自JC的回應
I got a response from Carmack:
Quote:
Our specular function isn't a POW function, it matches the bias / scale calculations done on the NV10/NV20/R200 paths.
This of course explains why it doesn't look exactly the same. This is also a good thing. Now we don't even need to use a POW function, but we'll be fine with a MAD_SAT, which make it even faster. Got 21% boost in the timedemo with this. Now I still don't know exactly what exponent he's approximating, or if he's using different lookup tables for different materials, but I've tried this and it seems to look the same, but our fellow artifact hunters may want to verify that.
Code:
MAD_SAT R1, specular, 4.0, -3.0;
If that causes artifacts for someone, maybe approximating a lower exponent will do it:
Code:
MAD_SAT R1, specular, 3.0, -2.0;
就這麼簡單....連修正包都有了...
大家可以試試看喔!!