Search Unity

Please Help-Volund Shader in The Blacksmith

Discussion in 'Shaders' started by QFGlenn, Sep 11, 2015.

  1. QFGlenn

    QFGlenn

    Joined:
    Feb 21, 2013
    Posts:
    39
    Hello. I have been happily adding the atmospheric scattering to my scene, but I noticed a few things that struck me as odd.

    Firstly, emission maps don't seem to function that well, if at all. I just ended up switching the material on the parts I want emissive back to the standard shader.

    Secondly, the albedo color picker doesn't seem to have any function. The specular color picker seems to control the color as well as the shiny-ness, where white is mirror reflective and the black is dull. Well then what is the smoothness slider there for?

    Finally, these shaders give you the option of opaque, cutout, fade and transparent. After extensive testing I discovered that none of these work. So all of the glass in my game can't use them.

    Anyone else encountering these issues? Any plans for an upgrade?
     
  2. torbjorn

    torbjorn

    Unity Technologies

    Joined:
    Jun 25, 2015
    Posts:
    211
    Hi Glenn!

    Firstly, emission maps don't seem to function that well, if at all. I just ended up switching the material on the parts I want emissive back to the standard shader.​

    This is sorta correct.. see below.


    Secondly, the albedo color picker doesn't seem to have any function.​

    Albedo color tints the albedo texture just like any other standard-derived shader. It should work, and I've confirmed that it does. If you're sure it doesn't.. post images?


    The specular color picker seems to control the color as well as the shiny-ness, where white is mirror reflective and the black is dull. Well then what is the smoothness slider there for?​

    The specular color works exactly like in the standard shader, thus it controls specular reflectance color and strength. The smoothness is just that, smoothness. Keep in mind that this is a "specular setup" shader, not a metallic one. (http://docs.unity3d.com/Manual/StandardShaderMetallicVsSpecular.html) Again, pics if it doesn't work, plz :)


    Finally, these shaders give you the option of opaque, cutout, fade and transparent. After extensive testing I discovered that none of these work. So all of the glass in my game can't use them.​

    So both the emissive variants and the alpha variants are disabled by default in this shader. Partially because we weren't using them (so they haven't seen a lot of testing), and partially to improve compilation speed of the shader.

    If you look in the shader code, there's these lines you can uncomment to enable the missing features (but, again, be warned that they've seen limited testing - although I'd expect at least emission and alpha to work):

    // Standard, but unused in this project
    //#pragma shader_feature _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON
    //#pragma shader_feature _EMISSION
    //#pragma shader_feature _PARALLAXMAP
     
    QFGlenn likes this.
  3. QFGlenn

    QFGlenn

    Joined:
    Feb 21, 2013
    Posts:
    39
    Thanks for your reply. I got the atmospheric scattering to work really well in my project. And you're right I saw specular but I was thinking metallic. This was a wealth of information thanks.