About UNITY_LIGHTMODEL_AMBIENT content

I’m trying to add ambient light to a custom frag shader.

UNITY_LIGHTMODEL_AMBIENT always return the ambient color beside the Enviroment Lighting setting.

3187407--243273--upload_2017-8-17_23-32-10.png

What am I doing wrong? Unity’s standard shader works properly.

Thanks!

3187407--243273--upload_2017-8-17_23-32-10.png

Yep.

You want ShadeSH9(float4(worldNormal.xyz, 1));

1 Like

Works like a charm =D. Thank you so much!