I have this shader for mirror-like reflection. It works ok but for the reflection direction. If I apply this on a sphere and look at it, it should reflect what’s behind me, however it “reflects” what’s in front. If I uncomment the Matrix [_Reflection] line, it swaps the Y direction, however it’s the Z direction that should be flipped.
Any ideas anyone?
Thanks
Shader "Kweetet/Transparent/Unlit Reflective"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_MainTex ("Base (RGB)", 2D) = "white" { }
_Cube ("Reflection Cubemap", Cube) = "" { TexGen CubeReflect }
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
LOD 100
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
Color [_Color]
Lighting Off
SetTexture [_MainTex]
{
combine texture * primary
}
SetTexture [_MainTex]
{
constantColor [_Emission]
combine previous + constant
}
SetTexture [_Cube]
{
//Matrix [_Reflection]
combine texture * previous, previous
}
}
}
}