- Home /
Shader works on Android but it is black on iOS
Hi -
I am using some shaders for painting. Everything works fine in the editor and on Android except for iOS.
You can see the problem here recoreded on an iPhone 6.
The object looks ok until I press to start painting. The material turns instantly black and the paint doesnt stay on for more than a few frames.
The only code I can see that responds when I touch to paint is this
RaycastHit hit;
Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
Vector4 mwp = Vector3.positiveInfinity;
mwp.w = Input.GetMouseButton(0) ? 1 : 0;
mouseWorldPosition = mwp;
Shader.SetGlobalVector("_Mouse", mwp);
This is what it looks like in the Unity Editor and on Android. video
I made a few changes to my Unity Project to solve other issues you can see the problems I had before here
Thank you.
Comment