Search Unity

How to create Matcap shaders with Shader graph

Discussion in 'Shaders' started by witcher101, Nov 1, 2019.

  1. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    i am trying to create a matcap shader for lwrp. Can any1 tell me how to go about this which nodes i need to combine to create one
    Thanks
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    oldManPig and mgsvevo like this.
  3. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    OK i tried this and it doesnt seem to work. Material is black without lights in scene.
     

    Attached Files:

  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    As it should be. Look up the definition of Albedo.

    Use an Unlit Master Node.
     
  5. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    here is my version of Shader Graph Matcap. With exposed Power / Factor variable for design tweaks. And introdused as subgraph, for easier combine with other your graph-shaders.
     

    Attached Files:

  6. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    and here are ready-to-use matcap graphs.
    - Unlit Albedo + Additive MatCap
    - Unlit Albedo + Multiply MatCap
    - Unlit Albedo + Blend MatCap (you can switch blend operation inside graph)
     

    Attached Files:

    Last edited: Jun 28, 2021
  7. carmofin

    carmofin

    Joined:
    May 13, 2017
    Posts:
    116
    I tried it, but the shaders cant be read.
     
  8. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    253
    Hello, which Unity / Shader Graph version you use?
    I've should meation, that my are:
    - Unity 2021.1.9f1
    - Shader Graph 11.0.0
    here is screenshot of matcap_subGraph matcap.jpg