- Home /
What rules govern backface culling on IOS hardware?
I've been working on a two-pass shader which renders backfaces in one pass and front faces in another to allow for volumetric effects.
This works fine on PC and on Mac. However the same shader does not work correctly on IOS: the front facing pass works but the backface pass fails. I know the pass is firing because occasionally a deforming vertex will make a 'back' face into a 'front' face, and I can see the back-face passes effect on those triangles. However no amount of fiddling with pass order, cull state, offset or zwrite seems to make backfaces visible.
I was prepared to give up on this and just say "IOS hardware doesn't support back face rendering" -- but on a lark I tried making a surface shader and flipping it with Cull Front... and that worked as expected, rendering back faces.
So, does anybody know why the same Cull Front command works for a surface shader but not for a vert/frag shader? I should add that the vert frag shader works fine with Cull Back or no cull. It just disappears with Cull Front, however.