Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Modify Standard Shader Inputs

Discussion in 'Shaders' started by dmontesdeoca, Jul 31, 2019.

  1. dmontesdeoca

    dmontesdeoca

    Joined:
    Jul 31, 2019
    Posts:
    4
    Hello!

    Little question here. I have an OC / Rougness / Metallic mask all in the same texture. I want to use it with the standard shader, but it needs a whole texture for each one. Is there anyway I can use it like this?

    Thank you!
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    The built in "Standard" shader has metallic and smoothness (inverted roughness) in the same texture, with metallic stored in the red channel, and smoothness stored in the alpha of the texture set on the material. For occlusion, the Standard shader uses only the green channel of the texture. So you can already use a single texture for all three as long as you put metallic in red, occlusion in green, and smoothness in alpha, and assign the same texture to both the metallic / smoothness map and the occlusion map.

    The built in "Standard (Roughness setup)" shader, renamed to "Autodesk Interactive" in Unity 2018.3 and later, unfortunately uses only the red channel of both the Metallic and Roughness maps. This was done to keep compatibility with tools (like Autodesk) that use Roughness maps in this fashion. If you're already manually packing your textures, I would highly recommend you use the "Standard" shader instead and invert your roughness maps to be smoothness maps.
     
    dmontesdeoca likes this.
  3. dmontesdeoca

    dmontesdeoca

    Joined:
    Jul 31, 2019
    Posts:
    4
    Awesome. I'll send your response to my artist so they can learn as much as me. Thank you very much.