Search Unity

Question What does the camera stack do in the FPS template?

Discussion in 'Universal Render Pipeline' started by WildRikku, Dec 9, 2022.

  1. WildRikku

    WildRikku

    Joined:
    May 10, 2022
    Posts:
    10
    Hi everyone!

    I am playing around with the Unity FPS template that is used in Unity Learning. I discovered it uses a camera stack and as I did not know what camera stacks are, I played around by removing the one overlay camera and by making it a base camera. I quickly figured out that it is used to display the weapon while the weapon's layer was deactivated in the base camera's culling mask.

    However, I noticed that the weapon appears in the same spot when I activate its layer in the base camera's culling mask but when I do so, some glitches on the side of the weapon appear when I move, probably indicating some kind of drawing / rendering problem. I guess the overlay camera was used to prevent that but I do not understand where that unwanted effect comes from and why it goes away when using an overlay camera. If someone has time to check it out or encountered it too and knows something about it, I'd be glad for answers! I think I can learn something interesting here.

    Thanks,
    WildRikku
     
  2. WildRikku

    WildRikku

    Joined:
    May 10, 2022
    Posts:
    10
    I think I figured it out myself: The overlay camera has no post-processing activated. The post-processing includes motion blur which causes the weapon to show these glitches I mentioned. So to have motion blur on everything but the weapon, two separate cameras need to be used. I guess it also increases performance a bit.