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.
  2. Dismiss Notice

ShadowCaster pass URP

Discussion in 'Universal Render Pipeline' started by Mrjuanblack, Mar 19, 2021.

  1. Mrjuanblack

    Mrjuanblack

    Joined:
    Feb 13, 2021
    Posts:
    2
    Hello, so I've been learning how to make shaders this past 2 weeks, I started making shaders in the old pipeline and got decent results (I want to make a toon shader, with colorbanding). So I decided to move to URP because I needed the depth texture to add more features to my shader, so I tried to make shaders by code in URP. To be honest, it's a little bit complicated whitout documentation, but I really want to do it by code. I got a simple Lambert light model working, and I just want a base color as an input, but when I started working on the shadow caster pass, I saw that the built in method uses a BaseMap and a cutoff properties. I'm no shader expert and I don't know how this pass works, there's little documentation and I don't want a base map or other properties around there just to make the shadows work. Can someone give me an explanation on how this pass works in URP? How can I make it work using just a base color?
    I've been using this guide: https://cyangamedev.wordpress.com/2020/06/05/urp-shader-code/10/
     
  2. Mrjuanblack

    Mrjuanblack

    Joined:
    Feb 13, 2021
    Posts:
    2
    For the moment, I made the frag function just return 0. I'm guessing that if I want a transparent object in the future, i'll have to use another method.