Is there any way to make a shader in CG that plays well with Directional Lightmaps?
I’m using the “Specular” shader and thought I’d try and translate it to CG, since it offers more functionality than I want (I don’t want to use any realtime lights) I thought I’d try and get a simpler, better performing version.
I’ve looked around for quite a while, knowing that access to lightmaps in unity in general is a bit mysterious (most of it is undocumented, you can get an idea from the UnityCG.cginc file (the DecodeLightmap is in there), but I don’t even know where knowledge of unity_Lightmap and unity_LightmapST comes from).
So is there any info out there? Anything I can read? Is it stored in unity_LightmapInd? Is there a list of all these keywords somewhere? The docs seem awfully incomplete. I haven’t found anything so far and I don’t even know where to start.