5

I am working on a mobile game in Unity, and we've reached the optimisation stage of development. We've been using realtime AA from the Post-Processing Stack, but I would like to switch to baked AA, because nothing except for the player moves in our game.

Here's the problem: we only use unlit materials in our game. This wasn't a problem for the Post-Processing Stack, but it does prevent baked ambient occlusion from being visible in-game. I've considered two possibilities.

Possibility 1: We use a lit shader, but disable all realtime lights and simply setup the baked lighting so it appears unlit. The main problem with this solution is that I believe this isn't as performant as we'd like.

Possibility 2: We edit our custom unlit shaders to include unity's baked lighting layers. I believe this is the best option, as it would maintain the performance of our custom shaders. The problem with this is that I can't find any documentation on what needs to be changed to make this happen.

So, my question is: which possibility is best? If it's possibility 1, will this severly hurt our performance? If it's possibilty 2, what do I need to do to make this work? Thank you for any help you can provide.

user3033405
  • 83
  • 1
  • 1
  • 4
  • I was looking for resources to help answer this question, and ran into [this](https://polycount.com/discussion/110991/bake-ao-but-not-lights). There's a link and a possible lead at the end. Hopefully this helps. The code in this [shader](https://gist.github.com/jimfleming/5937437) might help to also do what you want, which is to say, only use the lightmap. – Ruzihm Oct 16 '18 at 21:40

0 Answers0