Please help me, I built a shader for Ugui Image using URP10.4.0 and shader Graph10.4.0, it works correctly on PC, but on mobile the UV is wrong, like this
PC:
android:
Please help me, I built a shader for Ugui Image using URP10.4.0 and shader Graph10.4.0, it works correctly on PC, but on mobile the UV is wrong, like this
PC:
Are the UVs wrong or is your canvas not being scaled correctly?
This screen is my newly created APK
I checked;
It should be UV, because after I copied the shader text of SG into a new shader file
float4 _SampleTexture2D_efafa63b4f9a4f1b9ec7715fe7b0a04a_RGBA_0 = SAMPLE_TEXTURE2D(UnityBuildTexture2DStructNoScale(_SampleTexture2D_efafa63b4f9a4f1b9ec7715fe7b0a04a_Texture_1).tex, UnityBuildTexture2DStructNoScale(_SampleTexture2D_efafa63b4f9a4f1b9ec7715fe7b0a04a_Texture_1).samplerstate, IN.uv0.xy);
float4 _SampleTexture2D_efafa63b4f9a4f1b9ec7715fe7b0a04a_RGBA_0 = SAMPLE_TEXTURE2D(UnityBuildTexture2DStructNoScale(_SampleTexture2D_efafa63b4f9a4f1b9ec7715fe7b0a04a_Texture_1).tex, UnityBuildTexture2DStructNoScale(_SampleTexture2D_efafa63b4f9a4f1b9ec7715fe7b0a04a_Texture_1).samplerstate, IN.uv0.xy * float4(4, 4, 4, 4));
The screen will be more, and it is normal for me to hang other adaptive UI
I use unity2022 URP13.1.6 SG13.1.6 to build the same SGshader again. It is correct on the mobile phone, but I have no way to change the unity version for the time being