question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mesh recognition stutters on iOS target

See original GitHub issue

Visualizer scene looks like this: 147541623-023c8295-d52a-4432-a434-37186263c13f

Unity 2020.3.24f1 Target: iOS Device: MacBook Pro 2019

The only error in console is

Metal: Error creating pipeline state (Hidden/MediaPipe/FaceMesh/Preprocess): Link failed: The type of fragment input user(TEXCOORD0) does not match the type of the corresponding vertex shader output
(null)

Would be glad to provide any additional information.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
wbdsnxcommented, Aug 26, 2022

@mahdipo It’s well done for me .Thank you very much!

1reaction
mahdipocommented, Aug 26, 2022

Hi keijiro, Thanks for this repository , It worked on android and windows but on IOS it has error on “Preprocess.shader” at runtime. I fixed it by changing the shader code like below. @Ommand you can replace this code with your self code. please let me know if your problem is fixed too.

Shader "Hidden/MediaPipe/FaceMesh/Preprocess"
{
    Properties
    {
        _MainTex("", 2D) = "" {}
    }

    CGINCLUDE

    #include "UnityCG.cginc"

    sampler2D _MainTex;
    float4x4 _Xform;


	v2f_img vert(appdata_img v)
	{
		v2f_img o;
		o.pos = UnityObjectToClipPos(v.vertex);
		o.uv.xy = v.texcoord;
		return o;
	}

    float4 Fragment(v2f_img i) : SV_Target
    {
        float2 uv2 = mul(_Xform, float4(i.uv, 0, 1));
        return tex2D(_MainTex, uv2);
    }

    ENDCG

    SubShader
    {
        Cull Off ZTest Always ZWrite Off
        Pass
        {
            CGPROGRAM
            #pragma vertex vert // vert_img
            #pragma fragment Fragment
            ENDCG
        }
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

iPhone 14 Pro Max stuttering on iOS 16.2 : r/ios
The stutter happens while scrolling, such as instagram comments and dms, news apps like CNN, and in Whatsapp/Telegram chats. Going to the recent ......
Read more >
Fixing jitter, stutter and input lag - Godot Docs
What is jitter, stutter and input lag?: Jitter and stutter are two different alterations to visible motion of objects on screen that may...
Read more >
Touch input causes FPS drop and stuttering on some iOS ...
Also, I've tested on an iPhone 14 Plus (doesn't have ProMotion) and confirmed that the stutter doesn't happen there. So the problem must...
Read more >
Video Stutter (V1)
Frame rate lower than 10 fps is deemed too low, which will cause all audience to experience stuttering. However, when the host's video...
Read more >
iOS Player Settings
Target iOS Version, Specifies lowest iOS version where final application ... Optimize Mesh Data, Remove any data from meshes that is not required...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found