I’ve been trying to build my project for both Android and iOS and have hit a very funny issue with my vert/frag shader that I’ve not run into until the last update. I’m getting the errors:
Shader error in ‘Water/sphereProjectWater’: ‘’ : non-square matrices not supported (4x1) at line 185 (on gles)
Shader error in ‘Water/sphereProjectWater’: ‘’ : unsupported matrix constructor requested (4x1) at line 185 (on metal)
In relation to the code snippet that handles the lighting and object rotation within the shader. The normal is the mesh vertex normal so there’s nothing fancy there:
Desktop drivers / compilers are smarter about this and automatically convert your line to something equivalent to the above, but stricter compilers just tell you you’re doing it wrong (with a somewhat unhelpful error it seems).
Shader error in ‘Obi/Particles’: ‘’ : non-square matrices not supported (3x1) at line 63 (on gles)
Shader error in ‘Obi/Particles’: ‘’ : non-square matrices not supported (3x1) at line 160 (on gles)
Do oyu have any idea how to solve it? I would really appreciate your help.
Yep, you solve it by contacting Virtual Method and letting them know it’s broken. You can do so on their own forums in the link above, or @arkano22 the Unity forums here: