Your comments

Could you make the required modifications using the code block node?

Hey, sorry, I am in idiot, I forgot to enable OpenGLES 3 and Metal support on the shader itself, which is why in my bug report the OpenGLES 3 and Metal renderers look strange.


When I was initially reporting this bug, it was because of the black artifacting. As I put together a repo, I noticed the shader looked funny in OpenGLES3 and Metal.. Now I know why! Haha. Anyway.. The black artifacting occurs on both OpenGL2 and Metal.


Here is how it actually looks on my iPad Air 4 on all 3 rendering APIs:


Again, no modifications to the shader outside of setting the supported platforms to include OpenGLES3 and Metal.


Metal: (Black artifacting)



OpenGLES3 (Fine, but no shadows?)


OpenGLES 2 (Black artifacting)

I have seen a similar issue when modifying the vert offset via the shader the object appears slightly transparent.

Also, could the matrix multiply node please accept a Vector3 input? Right now we have to append a 0 at the end of every Vector3 we want to multiply by the matrix :)
Cool, any way I can receive a heads up when this is fixed? Otherwise I'll update shaderforge one day and my shader will break on certain devices as I would be flipping the V after you've already flipped it!
For those stuck on the same issue, this is due to Metal behaving similar to DirectX. On certain iOS devices, you'll have metal support, and the Y axis will go from 0 (top) to 1 (bottom), where as older devices will only have OpenGL, where the Y axis goes from 0 (bottom) to 1 (top).

Here is a fix for the issue, the 'Flipper' method will flip the input around if UNITY_UV_STARTS_AT_TOP has not been defined.

@Joachim I've only run into this issue using Scene UV's. Any other places I should look out for this? If not, maybe its worth having this built in to the Screen Pos node?



I am getting a similar issue, it does not seem to be a DirectX/OpenGL thing in my case.. On most iPads and iPhones, it works as expected, but (for example) on an iPad 2, the UV is flipped as above. Any suggestions? I am experimenting now with per-pixel screen coordinates disabled.