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.

Question Smooth/Formal distortion of view with _CameraOpaqueTexture

Discussion in 'Shader Graph' started by behzatbabil, Dec 6, 2022.

  1. behzatbabil

    behzatbabil

    Joined:
    Apr 21, 2022
    Posts:
    1
    Hi everyone,

    I'm using _CameraRenderTexture to alter the position of the objects. However I want to achieve the following picture where the straight line curved along the y axis. I want this to happen no matter where I look from. I tried to Lerp between normal value and altered value based on the distance from the object itself. I know lerp would create a linear result but I couldn't do this. I look into transformations between spaces, tried to get a value that i can use in the lerp but my attempts were unsuccesful.
    How should I aproach to problem?
    Can i create a material that does this based on the edges of the mesh. question.png

    My shader graph and the result. image_2022-12-06_175237716.png image_2022-12-06_175358711.png