So I made a custom shader for a large mesh, I have a RGB map that I draw in blender on my custom mesh, and this map is then used in my shader as weight to blend three other different diffuse textures. It works pretty well.
The only problem is that when I bake lightmaps the RGB map affect the light bounces so I get colors in my lightmap that are not supposed to be there.
Is there a way to tell unity to use the output of the shader during the light baking, instead of my RGB map ?
Thanks!
I don’t think so. You might have to make a “dummy” version that has a huge, baked texture that you just use for lightmapping, than once the lightmap has been baked, be careful to switch out only the material otherwise you’ll kill your lightmap.
Well, unity has to determine which texture to use at some point, I don’t really understand why it uses my RGB map instead of one of the other texture. Well, it is the first texture, so maybe I should just switch the order.
But your solution should work yes, it seems a bit like a pain though.