Search Unity

Grab Pass Local Coordinates

Discussion in 'Shaders' started by chantey, Dec 3, 2017.

  1. chantey

    chantey

    Joined:
    Mar 5, 2017
    Posts:
    49
    Hey yall I got this problem, I want to create a 'portal' effect where a particular transparent quad will warp the objects behind it in local coordinates. i.e. imagine a ripple on the surface of a pond diffracting the geometry behind it. Looks like doing a grab pass and offsetting the grabPos x and y is relative to the screen pos, giving interesting, yet uncontrollable results. What I want to say is:

    Do a Grab Pass [like take a photo of whats behind this quad]
    Take some sinusoid uv offset
    And apply it in local coordinates to the 'grabPos' of each pixel in the portal quad