DrawMeshInstancedIndirect on Android: Drawing meshes incorrectly

Hi,

I am using the Unity example to test Graphics.DrawMeshInstancedIndirect.

As seen in the images attached it renders meshes correctly on PC, yet with the exact same scene the mesh get’s draw in an arrow/tri jumble.
I have graphics set to OpenGL ES 3.1 in build settings.

On PC in editor using capsule

On Android device

Any help would be very much appreciated.

Cheers
Brad

I’m seeing the same results. The object-to-world matrix is being created correctly because each instance is getting transformed, but the instance mesh is mangled. Something about the instance vertex positions and indices are wrong. I’ve copied my shader below.

Shader "Application/Instanced Particle Shader"
{
    Properties
    {
        _Color ("Color", Color) = (1, 1, 1, 1)
    }
    SubShader
    {
        Tags { "RenderType"="Opaque" }
   
        Pass
        {
            CGPROGRAM
            #pragma target 4.5
            #pragma vertex vert
            #pragma fragment frag
            #pragma multi_compile_instancing
            #pragma instancing_options procedural:setup
           
            #include "UnityCG.cginc"
       
            #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
            StructuredBuffer<float4> _ParticleBuffer;
            #endif
           
            void setup()
            {
                #ifdef UNITY_PROCEDURAL_INSTANCING_ENABLED
                float4 particle = _ParticleBuffer[unity_InstanceID];
                float3 position = particle.xyz;
                float1 scale    = particle.w;
   
                unity_ObjectToWorld._11_21_31_41 = float4(scale, 0, 0, 0);
                unity_ObjectToWorld._12_22_32_42 = float4(0, scale, 0, 0);
                unity_ObjectToWorld._13_23_33_43 = float4(0, 0, scale, 0);
                unity_ObjectToWorld._14_24_34_44 = float4(position, 1);
               
                unity_WorldToObject = unity_ObjectToWorld;
                unity_WorldToObject._14_24_34 = -1.0f * unity_WorldToObject._14_24_34;
                unity_WorldToObject._11_22_33 =  1.0f / unity_WorldToObject._11_22_33;
                #endif
            }
           
            fixed4 _Color;
            
            struct VertInput
            {
                float3 position : POSITION;
                UNITY_VERTEX_INPUT_INSTANCE_ID
            };
           
            struct FragInput
            {
                float4 position : SV_POSITION;
            };
           
            FragInput vert (VertInput i)
            {
                UNITY_SETUP_INSTANCE_ID(i);
               
                FragInput o;
               
                o.position = UnityObjectToClipPos(i.position);
               
                return o;
            }
            
            fixed4 frag (FragInput i) : SV_Target
            {
                return _Color;
            }
            ENDCG
        }
    }
   
    Fallback "Diffuse"
}