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.

ARFoundation 3: ARCameraBackground custom material not working

Discussion in 'AR' started by Aaron-Meyers, Sep 11, 2019.

  1. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Trying to use a custom material to draw the camera background, but it doesn't appear to have any effect. I even tried using a material that returns only red fragments, but the video feed still looks the same as ever.

    Using ARFoundation 3.0.0.preview-2
     
  2. Aaron-Meyers

    Aaron-Meyers

    Joined:
    Dec 8, 2009
    Posts:
    305
    Ok so this seems to be because ARCameraBackground can't have its useCustomMaterial property changed after it starts up. I tried a solution where I destroy the ARCameraBackground component and add a new one to the game object and either add a custom material or remove it, but it seems like the first one doesn't clean up after itself because the background is only black :/

    I'd assume it has something to do with how the CommandBuffers are set up...