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

Screen wipe in URP

Discussion in 'Universal Render Pipeline' started by Kandy_Man, Apr 15, 2020.

  1. Kandy_Man

    Kandy_Man

    Joined:
    Mar 8, 2014
    Posts:
    66
    I'm working on a 2D turn based RPG in the style of classic Final Fantasy/Pokemon games and wanted to get a bit more adventurous with my screen wipes. Currently I just have a sprite stretched across the screen and am using a shader I made in shader graph to adjust the alpha of the sprite based on some noise. It works fine but it would be nice to do more elaborate transitions.

    I saw this video a long time ago and wanted to do something in that sort of style
    however it is for the old rendering system using actual hand written shader code.

    Is there a way to do effects like this in URP with shader graph? I assume the render features section in a custom renderer would be the area to look at but I'm not entirely sure how I would accomplish it. Thanks a bunch.
     
  2. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    What have you tried so far? Or is this just a question about the approach and you haven't actually tried anything yet?
     
  3. Kandy_Man

    Kandy_Man

    Joined:
    Mar 8, 2014
    Posts:
    66
    More of a question. I've been looking around and comparing URP and Shader Graph to the video I posted and can see I can insert a Shader Graph into a render feature, plus I can get a scene colour node in Shader Graph so it looks like it's possible to do, but then I also see on the Shader Graph road map an upcoming feature called single pass post effects support "We're going to provide a full-screen Blit Shader that will allow for single-pass post-effects and screen overlays." So I don't know if I need to wait for that to become available to do what I want to do or not. I'm quite new to shaders so there's a lot to take in.
     
  4. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    Ok. But for now you could use post-processing stack v2 effects with URP. It works (again) starting from URP 7.2, but the support won't exist in 2020 if I've understood correctly. Anyway if you're using 2019.3, you could use that URP 7.2 and post processing... Then you could build a full screen effect. Or get an existing one for PPS v2.
     
  5. Hi_No_Te

    Hi_No_Te

    Joined:
    Apr 1, 2012
    Posts:
    23
    I set up a secondary camera that exports a SpriteRenderer (hosting the material and image of the transition) to a Render Texture that is used as a source texture for a RawImage (as my swipe transitions to a Canvas for battle)... I just had to ditch the Blit, and input a "_Color2" in the Shader (provided by the original Youtuber who made the video you are referencing) in which the color is just a (1,1,1,0) Color and it just works for my case.