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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

The proper way to customize Standard shader?

Discussion in 'Shaders' started by mrtkhosravi, Aug 12, 2018.

  1. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    Hi. I want to create a series of custom shaders for a specific need (interior house design). There will be a range from tessellated parallax standard shader for high end PCs down to simple normal specular for mobiles. I want to start from standard shader and customize my way. I am not unfamiliar with writing shader but I have two problems:
    1. Standard shader is very complex and not very understandable without extensive research effort. Is there a blog or some other form of guidance on what's going on inside?
    2. The actual texture reads and parameter assignments are deep in the .cginclude files. So in order to make even slightly different shader I have to duplicate the main .shader file and change only a few lines. This is possible but not very mindful and is prone to hard to find error.
    So is there a tutorial or a guideline to customize Standard shader?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,229
    The easiest option is to not do it at all and use Surface Shaders. The next easiest option is to buy assets on the store that do what you want. After that the best tutorial is unfortunately going to be reading through the cginc files yourself. The Standard shader is a complex beast.
     
    mrtkhosravi likes this.
  3. mrtkhosravi

    mrtkhosravi

    Joined:
    Nov 9, 2014
    Posts:
    198
    OK That's sensible. I'll use surface shaders. I am developing a package for asset store so I can't use one. BTW if you're interested in contributing I could send you the details.