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

Graphics.Blit with multiple Source Textures

Discussion in 'Image Effects' started by zauberzaubar, Jul 15, 2019.

  1. zauberzaubar

    zauberzaubar

    Joined:
    Jun 18, 2019
    Posts:
    53
    I want to combine two render textures (a: video camera image, b: segmentation mask of person in video camera image; coming from ARKit, btw) into one render texture using Graphics.Blit with a material.

    How would I go about this? I know that I can do the shader with Amplify Shader Editor, but how would I pipe the textures into the shader with Graphics.Blit?


    Thanks a lot!
     
    Last edited: Jul 24, 2019
  2. Chaiker

    Chaiker

    Joined:
    Apr 14, 2014
    Posts:
    62
    You can assign one of source textures to material.
    Material.SetTexture and sample it in shader.