0

SF uses functions which are not working on mobile

Sam0waR 8 років тому 0

For generating PBL shaders, SF uses some functions, which are clearly marked as not intended to be running on mobile. Issues related to half precision, which leads to float overflow.
GGXTerm(), SmithJointGGXVisibilityTerm() and probably others.

Workaround we're currently using: override types in Unity's standard CGIncludes, sort of
#if defined (SHADER_API_MOBILE)
#define HALF float
#define HALF2 float2

...
#else
#define HALF half
#define HALF2 float2
...
#endif

Proposed solution:
Make a custom .cginc with those functions return types and arguments overridden