Search Unity

Blacksmith hair pink

Discussion in 'Shaders' started by scarpelius, Sep 23, 2016.

  1. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    I've tried to look at the blacksmith hair example, https://www.assetstore.unity3d.com/en/#!/content/39945, but it gives me an error after importing it and the hair is pink:


    Shader error in 'Volund/Standard Hair': undeclared identifier 'samplerunity_SpecCube1' at Assets/Features/Hair/Hair_UnityStandardCore.cginc(379) (on d3d11)

    Compiling Vertex program with DIRECTIONAL LIGHTMAP_OFF DYNAMICLIGHTMAP_OFF DBG_NONE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING

    I've attached the shader file just in case. Any help will be greatly appreciated.
    P/S. Forgot to mention: Unity 5.4.1f Windows 7
     

    Attached Files:

  2. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Copied from the Comments section:
    I haven't tried it myself though.
     
    rogaroga likes this.
  3. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    966
    Thanks, I tried that last night after the earthquake, but I was to tired to remember to update this post.
    It does work.
     
  4. rogaroga

    rogaroga

    Joined:
    Oct 30, 2016
    Posts:
    10
    Anyone coming accross this in Feb 2017 or later, I had this issue, and the code fix stated above is now in a different file, at least it was for me. I found it here:

    File: Hair_setup.cginc
    Line: 124

    Code to change same as post above:
    UNITY_PASS_TEXCUBE(unity_SpecCube1)
    to:
    UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1,unity_SpecCube0)