- Home /
Lightmap material becomes invisible when lightmap is assigned
I'm trying to create a shader that uses a lightmap. Every time the shader works in preview, it works when no lightmap has been created. But the moment a lightmap is created it just doesn't render the object at all (not even when using the default unity cube).
No purple color, no error or warning in the console, just nothing there.
I've copied several versions I've found on the web, and none of them work. Even when I let it output a constant color it doesn't work. The only way I can make it work if it falls back on a default shader (in which case it just ignores my shader)
I've looked all over the internet, can't find anything that might cause this to happen ... I'm using Unity pro.
Anybody got an idea what might be going on here?
Update 1: If I built a project + scene with one cube using the same shader/material it works. If I remove everything from my project & scene, create a cube and assign the same shader/material it doesn't work ...
Update 2: Camera was set to "vertex lit" rendering path, this was the cause for the problem.
Your answer
Follow this Question
Related Questions
Lightmap options in a custom shader 0 Answers
Blending between 2 lightmaps 0 Answers
Baked Lightmaps appear different when I use different shader for a mesh 0 Answers
Get the light texture from a spotlight 0 Answers