Custom ambient term with surface shaders in 3.0?

I’m upgrading our shaders to work in Unity 3.0 and then I hit a major problem with trying to implement our own custom ambient lighting using surface shaders.

I’ve searched the documentation and forums etc and can’t find it specified where you can control the ambient pass calculation which seems a massive omission from the surface shader functionality unless I am missing something?

Can I somehow specify an ambient pass and a surface shader at the same time?

If there is no way to do this with the surface shaders is there a way to disable it and write my own system that uses CG and my own custom light set up? As this completely destroys our existing lighting and art setup :frowning:

You could use the emissive term in the surface shader as an ambient value. I use this to do image based lighting.

Ah… with some initial testing that seems maybe that will work thank you - and if I set the renderers flat ambient colour to black. But does that mean there is an extra rendering pass going on which isn’t needed or is the emissive collapsed into the ambient pass?

I just have to make sure I can pick out the world space normal correctly but maybe I see a question regarding that part in the forum… fingers crossed…