Search Unity

Graphics Settings Standard shader quality ?

Discussion in 'Shaders' started by castor76, Sep 6, 2017.

  1. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Refering to :

    https://docs.unity3d.com/ScriptReference/Rendering.TierSettings-standardShaderQuality.html

    So it enables and disables some shader compile directive. But for us average user, what does it really mean in terms of visual quality and performance cost savings?

    How do they actually differ in real practical cases and how much performance can we expect to save from using lower quality?

    I don't think these graphics setting tier part is well documented. Actually, found no detail doc on it.

    Anyone?
     
    ryanmillerca likes this.
  2. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    460
    The shader directives are handled in UnityStandardBRDF.cginc in the shader source bundle. and the comments give a little more info:

    BRDF1_Unity_PBS: Derived from Disney work and based on Torrance-Sparrow micro-facet model

    BRDF2_Unity_PBS: Based on Minimalist CookTorrance BRDF

    BRDF3_Unity_PBS: Old school, not microfacet based Modified Normalized Blinn-Phong BRDF
     
  3. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I see.. well, thanks for that info. But still, it would be better if this is more documented at Unity with examples of difference in terms of visual quality (pictures!) and the performance metric comparisons.
     
  4. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Also, if I create my own surface shader ( that uses Unity standard metal , or specular pbr lighting function ) do they also gets the changes from the setting or not?
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,610
    You can use the Leave Feedback link at the bottom of the page to let the documentation team know.
     
    Last edited: Sep 7, 2017
  6. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Yeah, I did that too..
     
    Peter77 likes this.
  7. DominoM

    DominoM

    Joined:
    Nov 24, 2016
    Posts:
    460
    UnityPBSLighting.cginc defines UNITY_BDRF_PBS which is the common BDRF function used in UnityStandardCore.cginc that maps to one of these according to the graphics settings.

    So unless you define UNITY_BDRF_PBS to your own BRDF function before including UnityPBSLighting.cginc then using this function in your own shader would get the changes from the settings. The metallic and specular workflows are both defined in UnityPBSLighting.cginc

    I'm still researching and learning the standard shader code and the lack of documentation does makes this an arduous task. I think if you want a shader that uses all the settings, then using the functions from UnityStandardCore.cginc as the base for it is probably the best way to start, though that does ignore the UnityStandardCoreForwardSimple.cginc (UnityStandardCoreForward.cginc switches between the two) so you may even want to work another level up the macro tower depending on target platforms and what you want to change from the standard shader.

    I seem to have led you miles away from your original question here, with not much other than pointing out which source files to read.. Oh well hope it was somewhat useful anyway :)