- Home /
Vertex position in 2D shader always zero on Mac
I'm writing a 2D shader in Unity 5. In the vertex function, I'm doing the usual:
OUT.vertex = mul(UNITY_MATRIX_MVP, IN.vertex);
In the fragment function, when I access the value
IN.vertex.xy
It is always (0,0). I ran the same shader in the same version of Unity 5 on Windows, and it's giving me the expected values (I tested this by setting the return color in the fragment function to the vertex values).
Any ideas why this would be different on a Mac, and what I might be able to do about it?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220611234912im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Shader:DX11 get texture dimensions inside a shader 1 Answer
Transparent/Cutout shader not working on Mac 0 Answers
Writing a shader for a terrain? 0 Answers
Shader Outline scale problem since U5 1 Answer
Marmoset + Unity 4 vs Unity 5 Lighting 0 Answers