Hi,
is it possible to sample lightmaps in a custom vertex-lit shader with "LightMode" = "Vertex"
?
What I tried so far is adding a TEXCOORD1 float2 to both the appdata and v2f structs, calculating o.lmuv = v.lmuv.xy * unity_LightmapST.xy + unity_LightmapST.zw;
in the vertex shader and sampling the lightmap with DecodeLightmap(UNITY_SAMPLE_TEX2D(unity_Lightmap, i.lmuv));
in the fragment shader. This however makes objects render as if they were fully transparent, even if I just return the DecodeLightmap result in the fragment shader. Is there some way to get Lightmaps to work with Vertex Lighting (without it my custom lighting breaks)?