I’m seeing this fail in my OnRenderImage() function when the player is set to single pass stereo
tmp = new RenderTexture(source.width, source.height, 0, RenderTextureFormat.Default);
tmp.Create();
Graphics.Blit(source, tmp);
Graphics.Blit(tmp, source);
Graphics.Blit(source, destination);
Where this does not:
Graphics.Blit(source, destination);
Am I doing something wrong setting up my tmp texture? I’m pretty sure I had this working in b9.
I even tried running the blit with a custom material that attempted to do the right thing. FWIW the two UnityStereo* functions seem to do the same thing and I was never clear when to use one versus the other.
Shader “Hidden/SinglePassthrough”
{
Properties
{
_MainTex (“Texture”, 2D) = “white” {}
}
SubShader
{
// No culling or depth
Cull Off ZWrite Off ZTest Always
Pass
{
CGPROGRAM
#pragma vertex vert_img
#pragma fragment frag
#include “UnityCG.cginc”
sampler2D _MainTex;
half4 _MainTex_ST;
fixed4 frag (v2f_img i) : SV_Target
{
// fixed4 col = tex2D(_MainTex, UnityStereoTransformScreenSpaceTex(i.uv));
fixed4 col = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST));
return col;
}
ENDCG
}
}
}
Any thoughts here?