Advertisement Jump to content
Sign in to follow this  

Gradient Ambient in Unity: How is it achieved?

This topic is 1133 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone,


I am currently working on a project that is not based on Unity, however there is a feature I really like from Unity which is the "gradient ambient light".


It allows you to define 3 colors  (ground color, equator color and sky color) and blend them (pobably based on mesh normal and/or normap map?) to add color variation in the ambiant light.


As I am quite a noob shader wise, would someone be able to explain me how it works (with some code sample, would be awesome!)



Share this post

Link to post
Share on other sites

Thanks for your quick and helpful reply! It seems we are just having a small issue with material instancing at the moment but it should be fixed soon.


I also didn't knew the name was hemispherical ambient, so thanks for it too!  With this term, I have found this article which is really interesting if anyone is looking to create a similar effect (with only 2 colors however) :

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!