I’m using the Night Vision Shader from the wiki on my iphone, it performs ok, but it drives the camera from landscape to portrait. Here is the script from the wiki:
Shader "Hidden/NightVision" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Pass {
ZTest Always Cull Off ZWrite Off Lighting Off
Fog { Mode off }
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
uniform sampler2D _MainTex;
float4 frag (v2f_img i) : COLOR {
float4 c = tex2D(_MainTex, i.uv);
c.b = c.r*2;
c.g = c.b*2;
return c;
}
ENDCG
}
}
Fallback off
}
How can I make the shader stay in landscape?
Thanks