How do I use\implement light maps in a custom realtime reflection shader for mobile?

Hey there is there someone who can help me with this shader? i want to make an reflectiv material
Something like this but for static objects that have lightmaps .

here is the shader that i have:

Shader “Mobile/PlanarReflection”
{
Properties
{
_MainAlpha(“MainAlpha”, Range(0, 1)) = 1
_ReflectionAlpha(“ReflectionAlpha”, Range(0, 1)) = 1
_MainTex (“MainTex (RGBA)”, 2D) = “”
[HideInInspector]_ReflectionTex (“ReflectionTex”, 2D) = “white” { TexGen ObjectLinear }
}

Subshader
{

CGPROGRAM
#pragma surface surf Lambert

float _MainAlpha;
float _ReflectionAlpha;
sampler2D _MainTex;
sampler2D _ReflectionTex;

struct Input
{
float2 uv_MainTex;
float4 screenPos;
};

void surf(Input IN, inout SurfaceOutput o)
{

fixed4 main_Tex = tex2D(_MainTex, IN.uv_MainTex);

o.Albedo = main_Tex.rgb * _MainAlpha;

o.Emission = tex2D(_ReflectionTex, IN.screenPos.xy / IN.screenPos.w).rgb * _ReflectionAlpha * main_Tex.a;

}
ENDCG
}

Fallback “Diffuse”

}

this is a surface shader, it already supports lightmaps. Lower your _ReflectionAlpha value and you should be able to see if if it’s correctly baked.

Hmm indeed it does but the reflection not is not showing on the mobile build o.O

  1. Planar Reflection:
    Planar Reflection with alpha - Unity Engine - Unity Discussions

  2. Realtime or baked Reflection probes (Standard shader):