Search Unity

Question How to study shaders if I want to use what I learn in the HDRP?

Discussion in 'Shaders' started by Passeridae, May 9, 2021.

  1. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Hi!
    It so happened that when I started using Unity (around 1.5 years ago) HDRP had already been there, so I skipped the Built-In pipeline and decided to learn HDRP from the very beginning. At the current moment, I feel like I've exhausted every feature that doesn't require coding that HDRP can offer in the field of rendering and visuals, so I want to go beyond Shader Graph and Volume Profiles and different hacky workarounds I've been using to achieve various effects. The problem is I don't know how to approach this.

    I've started with the basic HLSL stuff that in theory isn't even connected to Unity, though most of the lessons tend to explain various things using this engine. That's okay and even makes practical sense, since I'm going to stick to Unity for the next couple of years for sure and I need to know how to use what I learn inside it specifically. The issue is, 95% of the lessons and examples of different effects and techniques are written for the built-in pipeline and as far as I understand don't translate well (or sometimes at all) to the new SRPs. So is there a way to learn shader coding that will be applicable inside HDRP from the beginning?

    I'm not extremely interested in stuff like writing my own version of the Lit shader (though I would like to learn how, if there were enough examples and some lessons), because Shader Graph covers this area pretty well. What I want to do is to be able to create things that are currently impossible or impractical with shader graph. For example, I'm interested in SDF Raymarching & SDF Shadowing, tesselation techniques, mesh data manipulation, full screen effects and so on. Probably, they are more related to compute and/or other types of shaders, but I feel like I should begin with the most basic things and then go up.

    So I would greatly appreciate if someone could explain me where to begin this and not become tied to the Built In pipeline at the same time.

    P.S.
    Catlike coding tutorials seem to be the most popular ones, but it looks like they lean towards the idea of creating your own SRP in the first place and then rewriting the unlit shader from scratch to make it compatible with this custom SRP and heavy emphasis on the batching and instancing topic.

    There's Better Shaders asset as well, which somehow translates your code to every pipeline needed, but something tells me there are caveats as well, and it's not the best way to begin, is it?

    Thanks!
     
    Last edited: May 9, 2021
    PutridEx likes this.