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. Dismiss Notice

Question Access The Camera's Opaque Texture Through Script

Discussion in 'Universal Render Pipeline' started by LemonMontage420, Jun 26, 2021.

  1. LemonMontage420

    LemonMontage420

    Joined:
    May 28, 2020
    Posts:
    56
    I wanna create an image effect through shader graph (by making a blit on the forward renderer), and that effect requires me to get the average color of the current camera view (and render textures are too slow for me). So using the opaque texture is the only way (that I know of) to do that, the problem is that I don't know how to access it. Is there anyway to access it through script? So that I can then pipe it to shader graph?
     
  2. japhib

    japhib

    Joined:
    May 26, 2017
    Posts:
    65
    I think you just make a texture named _CameraOpaqueTexture in Shader Graph and it automatically binds it.
     
  3. LemonMontage420

    LemonMontage420

    Joined:
    May 28, 2020
    Posts:
    56
    I ended up making the effect I wanted in an image effect shader, but thanks for the info!