Thread: GSdx
View Single Post
Old September 5th, 2008   #3165 (permalink)
kekko
Registered User
 
Join Date: Aug 2005
Location: GMT +1.00h
Posts: 76
Quote:
Originally Posted by gabest View Post
Would be, but the lost precision hurts a few games (the cost of vertex manipulation is negligible compared to per pixel processing later, "vertex shader" vs "pixel shader"). There were a lot of similar cases in pcsx2's recompiler too, where doing a normal div instead of *1/x fixed many things. Sometimes they use so insane values for s,t,q that even overflows/underflows are a problem, for example sfex3 sets them to 1e38 for the dirt effect sprites and expects them to be 1.0 after division, but because I premultiply s,t with the texture size it overflows, and inf/1e38 will still be inf there.
Thanks for the explanation. I didn't consider that playing with precision would break some programming tricks used by certain games.
Anyway I guess that piece of code is simd-optimized by a properly configured compiler, isn't it?
kekko is offline