We use z-pre pass in our application. It is well known that z-pre pass requires both shader passes to produce the exact same results for the position. In OpenGL this can be enforced using 'invariant gl_Position'. We have not found anything like that for Metal. We have observed that in iOS the z-pre pass does not work correctly when the shaders are compiled with fast math enabled (it works in iOS with fast math disabled and it works in OS X in both cases). Disabling fast math is too much of a performance penalty to be acceptable. Therefore we currently don't know how to solve this problem. Any suggestions and pointers are highly appreciated.
ios/metal: z-pre pass doesn't work correctly with fast math enabled
Add a Comment