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

Resolved Have Some Problem Draw Mesh In Render Feature with Override Material

Discussion in 'Universal Render Pipeline' started by a461379a, Sep 3, 2021.

  1. a461379a

    a461379a

    Joined:
    Dec 28, 2020
    Posts:
    2
    I added a render pass using render objects.
    That render pass is used to draw the transparent object into the Z buffer.
    However, when drawing the SpriteRenderer, it works normally, but when drawing the MeshRenderer, the UnityWhite Texture is drawn into the MainTex instead of the proper Texture.
    It seems that there is a problem in the process of drawing with override material, but it is not easy to find a related solution.
    Hope someone can help!
     

    Attached Files:

    • 1.PNG
      1.PNG
      File size:
      45.1 KB
      Views:
      311
    • 2.PNG
      2.PNG
      File size:
      46.2 KB
      Views:
      315
    • 3.PNG
      3.PNG
      File size:
      75.5 KB
      Views:
      321
    • 4.PNG
      4.PNG
      File size:
      19.9 KB
      Views:
      294
  2. pw_prg_yinchao

    pw_prg_yinchao

    Joined:
    Feb 14, 2020
    Posts:
    18
    Are you set any
    MaterialPropertyBlock
    to your
    MeshRenderer
    ? (Including using
    Animator
    to controll its material's properties.)
     
  3. a461379a

    a461379a

    Joined:
    Dec 28, 2020
    Posts:
    2
    MaterialPropertyBlock fixed it all! thank you very much