Search Unity

How to keep track of everything in the Uber shaders?

Discussion in 'High Definition Render Pipeline' started by xVergilx, Feb 17, 2020.

  1. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    This is more of a generic SRP question, but rather more related to the HDRP shaders.

    I've been reverse engineering Terrain Lit shader, and it seems crazy already with the loads of includes, cross references and everincreasing crapton of defines.

    How do you manage to manage all of those? Do you have a special IDE or smth?
    Or just a large board for all intricacies / guide that everyone is following?

    As far as I understand right now the key is to do maximum modular code that could be modified by templates.
    I don't know how is it possible w/o a specified tool to manage all of that.

    Just by looking through the code I've realized I cannot just hold it all in memory, so I've started writing a shader execution flow in the text file (crappy, but atleast I'm not completely lost in the code).

    Please share your wisdom, allmighty uber shader sages.

    Yeah, I know "use shader graph" motto, but I can't do that yet. Sooooo yeah.
     
    Last edited: Feb 17, 2020