Hi, I would like to lerp textures in a shader depending on the world position. My shader works so far in the editor and on iOS 5.1.1 but on iOS 6 the bottom texture (_SecondTex) is not visible. @edit the second texture is not 'not visible', it's just black. Code (csharp): Shader "Custom/TestShader" { Properties { _MainTex("Top", 2D) = "white" {} _SecondTex("Bottom", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 200 CGPROGRAM #pragma surface surf Lambert sampler2D _MainTex; sampler2D _SecondTex; struct Input { float2 uv_MainTex; float2 uv_SecondTex; float3 worldPos; }; void surf (Input IN, inout SurfaceOutput o) { float4 Tex2D0 = tex2D(_MainTex, IN.uv_MainTex); float4 Tex2D1 = tex2D(_SecondTex, IN.uv_SecondTex); float4 Lerp0 = lerp(Tex2D1, Tex2D0, clamp(IN.worldPos.y * 10, 0, 1)); o.Albedo = Lerp0.rgb; o.Alpha = Lerp0.a; } ENDCG } FallBack "Diffuse" } Did I do something wrong or is there an issue on iOS6? I also tried to use ShaderLab but don't know how to get the world position then.
I just figured out that this only happens when the player setting 'orientation' is set to landscape. When portrait mode is set, it also works on ios6. Bug report sent
I would recommend, as you already started forum thread, to post case number along - this way if stuff catches attention of some dev (me in that case) he can check it right away without qa in the middle.
hm, it works for me (though i'm using dev version sure - something like 4.2) i can see what you mean if i simply run your project, though it was build with 4.0. Did you try 4.1?