I’d like to be able to change the ambient light color in realtime, while using beast’s baked ambient occlusion. So what I do is set my light to realtime only and the ambient light to white, which effectively creates a nice ambient occlusion bake.
The problem is that changing ambient lighting afterwards won’t affect a thing - makes sense since normally you would have baked shadows / reflected light etc. in the lightmap, meaning you need to rebake when changing ambient light.
Is there any way to access the lightmap in the shader so i just can multiply the albedo with the lightmap color and ignore lightmapping during light calculation? I played around with using renderer.lightmapIndex and renderer.lightmapTilingOffset and putting the corresponding lightmap texture as a separate texture in the shader using the secondary uvs (they are the ones for lightmapping i suppose, turned on generate lightmap uvs in the importer), but the results are wrong - any ideas how to access it in the surface shader, or is there another way?