Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    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