Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to make a simple Bulge distortion shader using URP?

Discussion in 'Universal Render Pipeline' started by reppeti, Feb 28, 2023.

  1. reppeti

    reppeti

    Joined:
    Jun 29, 2021
    Posts:
    44
    Hello everyone!
    I'm getting close to making a shader that bulges the middlle part out of an object I just have two problems with it which I cannot solve.

    First my current nodes look like this:
    upload_2023-2-28_10-58-6.png
    And this is the result:
    upload_2023-2-28_11-2-3.png
    How could I make so that the texture is pushed out instead of in like this without the black line breaking on the lens:

    This shouldn't be all that difficult... right?
    Could anyone please help me with this?
     
  2. EWimsett

    EWimsett

    Joined:
    Feb 16, 2017
    Posts:
    11
    Half a year old but incase anybody is searching...

    Hopefully this makes sense:

    Screen Shot 2023-09-02 at 2.44.22 PM.png

    Edit: Just realised the Saturate node isn't needed here because the Smoothstep node outputs a value between 0 & 1.
     
    Last edited: Sep 2, 2023
    halley likes this.