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.

How to change the texture for detecting planes in ARCore 1.2

Discussion in 'AR' started by Aupuma, May 10, 2018.

  1. Aupuma

    Aupuma

    Joined:
    Feb 15, 2017
    Posts:
    41
    Hi, I'm trying to use a different texture for the detecting planes, but with the PlaneGrid material, the texture only uses its black/white data.
    I want the material to be opaque or at least transparent with the colors from the texure and I tried using the standard material or the diffuseWithLightEstimation but it only shows a solid color.

    I know it could be done editing the ARCore PlaneGrid.shader but I have no idea about editing shaders, help me please... :confused:
     
  2. Pauleta

    Pauleta

    Joined:
    Aug 8, 2013
    Posts:
    20
    Make a copy of the ARCore/PlaneGrid shader and replace the fragment shader
    Code (CSharp):
    1. fixed4 frag(v2f i) : SV_Target
    2. {
    3.   fixed4 col = tex2D(_MainTex, i.uv);
    4.   return col;
    5. }
     
    Chadua likes this.
  3. Jatin_J3

    Jatin_J3

    Joined:
    Oct 31, 2014
    Posts:
    9
    I want to add real time reflection on plane grid shader.How can i do that?
    I have used several solutions but wasnt able to find a proper one.Any help would be appreciated.