Hi, problem on video:
Without lightmaping - Проблемы нет - YouTube
With lightmapping - Проблема при запеченном освещении - YouTube
Its repdoduced on Unity 2019.2.12-18f1 and devices with Adreno 540, Mali G71mp10.
Portal shader:
Shader "FX/Portal"
{
Properties
{
//[HideInInspector] _MainTex ("", 2D) = "white" {}
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags {"RenderType" = "Opaque"}
LOD 100
Offset -0.01, -0.01
Pass {
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert
#pragma fragment frag
#pragma multi_compile_fog
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float4 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
sampler2D _MainTex;
float4 _MainTex_ST;
v2f vert(appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = ComputeScreenPos(o.vertex);
return o;
}
fixed4 frag(v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.uv.xy / i.uv.w);
return col;
}
ENDCG
}
}
//Fallback "Diffuse"
}
Portal camera render code:
Cams[0].Render(); // first render zero camera (main)
for (int i = recursionSteps - 1; i > 0; i--)
{
Cams*.Render(); // then all other cameras for recursion*
Graphics.Blit(RenderTextures*, RenderTextures[0]); // Then combine them with zero.*
}
At the same time, everything works fine on a PC, on the old Adreno 330 it’s fine too…