Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Need help ignoring camera clipping only for Flares

Discussion in 'General Graphics' started by colony4z, Aug 22, 2015.

  1. colony4z

    colony4z

    Joined:
    Jul 16, 2014
    Posts:
    4
    Need help ignoring camera far clipping only for Flares, I have a distant directional light and I cant see the flares due to camera far clipping plane and increasing the camera clipping distance for everything isn't a solution cause will drop fps very badly.
     
  2. MF5

    MF5

    Joined:
    Apr 12, 2015
    Posts:
    15
    Create a second camera that is a child of the main camera. On this camera you just created set the depth to something higher than the main camera (2 will do). Then set the Clear Flags to Depth Only. Also you want to set the Culling Mask to a Layer that you have your Directional Light on. And lastly set the far clipping plane to a high number. This will Render only the Directional Light, so the far clipping plane only effects the directional light.
     
    theANMATOR2b likes this.
  3. colony4z

    colony4z

    Joined:
    Jul 16, 2014
    Posts:
    4
    Thanks its working, will this affect frame rates having 2 cameras?
     
  4. MF5

    MF5

    Joined:
    Apr 12, 2015
    Posts:
    15
    No. Since the second camera is only rendering the flare. It will a tiny bit but a lot less than having one camera with a high far clip distance.