Search Unity

Question tring to recreate the edge detection effect sith a shader applied to a plan in front of my camera

Discussion in 'Shader Graph' started by jexmatex, Dec 26, 2019.

  1. jexmatex

    jexmatex

    Joined:
    Jun 23, 2016
    Posts:
    47
    hello guys,

    i'm currently upgrading my project to 2019.2 with LWRP and images effects dont work anymore.
    trying to fake the old edge detection in image effect of the standart asset pack
    my goal is to be able to disable / enable the use of it like i was doing on 2018.2

    basically on and off, i thought may be i can do a shader wich can be sort of transparent and apply it to a geometry in front of my camera.

    i'm not sur of the feasibility of such an enterprise, any idea ?
    i have found other edge detection example on post effect but it need to be able to change the render, pipeline,
    or i need it to be activated / deactivated with on keystroke of the keyboard.

    any idea so far ?
     
  2. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    You can have an outline shader, add it in with a render pass using a renderer feature.



    Like the second one here.

    And then, I would make it so that you have an opacity value in the outline shader that controls how much outline is shown, and you can then control that value using a script so it can be activated/deactivated.