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 [URP] How to do a Glass with distortion + "decals" on it?

Discussion in 'Shader Graph' started by KaOzz, Jun 24, 2022.

  1. KaOzz

    KaOzz

    Joined:
    Oct 15, 2012
    Posts:
    82
    Hi, I have this shader that produce a distortion effect with things that are behind the object.

    distortion_1.PNG
    Here is the result: distortion_2.PNG
    But also I want to add this texture as "decals". distortion_3.PNG

    The idea is to create a glass that distort the things behind it and also have some "decals" on the glass. The decals should not be distorted.

    Any idea on how to achieve this?
    I attach the shader.
     

    Attached Files:

  2. K_NooKs

    K_NooKs

    Joined:
    Mar 31, 2014
    Posts:
    1
    Adding a Lerp node with the Scene Color as A, Texture RGB as B and the Texture alpha channel as T does the trick
    upload_2022-9-22_0-21-38.png
     
    KaOzz likes this.
  3. KaOzz

    KaOzz

    Joined:
    Oct 15, 2012
    Posts:
    82
    Thanks you very much! It works.
    Just one thing, do you know how to render other transparents object behind this? All objects with opaque materials render fine, but transparent don't appear.

    Thanks again.
     
  4. KaOzz

    KaOzz

    Joined:
    Oct 15, 2012
    Posts:
    82