I am trying to play a 360 video within a sphere. I am not an expert at unity or 3D modeling but I've managed to get the 360 video to invert its normals and play on the inside of the sphere.
The problem is the video has been flipped by the inversion (right is left and left is right). I need to correct this and despite the last three hours of searching I cannot find a solution that I understand. This is the code I've been using as a custom shader to achieve the inversion:
Shader "Custom/Flip Normals" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Cull Off
CGPROGRAM
#pragma surface surf Lambert vertex:vert
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
float4 color : COLOR;
};
void vert(inout appdata_full v) {
v.normal.xyz = v.normal * -1;
}
void surf (Input IN, inout SurfaceOutput o) {
fixed3 result = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = result.rgb;
o.Alpha = 1;
}
ENDCG
}
Fallback "Diffuse"
}
Note: messing with the camera or the video file itself are not ideal options.