Search Issue Tracker

Fixed in 2018.1.X

Fixed in 2017.2.X, 2017.4.X

Votes

2

Found in

2017.2.0p1

Issue ID

962811

Regression

No

Standard Roughness setup shader is not building correctly for Android builds when using OpenGLES3.0

Mobile Graphics

-

The Standard Shader (Roughness Setup) that was introduced in 2017.2 is not building for Android when using OpenGLES3.0 and the build fails with errors.

To reproduce:
1. Create a new project and set the platform to Android.
2. Create a new material and use the Standard (Roughness setup) shader option
3. Create a cube and assign the material to the cube.
4. Make sure that OpenGLES3.0 is selected as graphics API and build the project.

Actual Result: The build fails with the following errors

Shader error in 'Standard (Roughness setup)': 'RoughnessSetup_Reflectivity' : no matching overloaded function found at /UnityVersions/Unity 2017.2.0p1_PatchRelease/Editor/Data/CGIncludes/UnityStandardCoreForwardSimple.cginc(111) (on gles)

Compiling Vertex program with DIRECTIONAL
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA

Shader error in 'Standard (Roughness setup)': undeclared identifier 'RoughnessSetup_Reflectivity' at /UnityVersions/Unity 2017.2.0p1_PatchRelease/Editor/Data/CGIncludes/UnityStandardCoreForwardSimple.cginc(111) (on gles3)

Compiling Vertex program with DIRECTIONAL
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA

Shader error in 'Standard (Roughness setup)': undeclared identifier 'RoughnessSetup_Reflectivity' at /UnityVersions/Unity 2017.2.0p1_PatchRelease/Editor/Data/CGIncludes/UnityStandardCoreForwardSimple.cginc(111) (on vulkan)

Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN
Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA

Expected Result: There should be no errors and the build shouldn't fail.

Extra notes:
There are no build errors if OpenGLES2.0 or Vulkan is selected as Graphic API

Reproducible: 2017.2.0a4, 2017.2.0b1, 2017.2.0f3, 2017.2.0p1 and 2018.1.0a

Comments (22)

  1. nitesh_infy

    Nov 01, 2018 14:36

    hi ,

    i am facing same issue in 2017.3.1, only worked once when i added Vulkan in graphic api and remove everything. But it caused again same issue while building new package. Now old method not working. Please let us know the hot fix.

    thanks,
    nitesh

  2. KibsgaardUnityStudios

    Oct 11, 2018 14:08

    This missing function is:

    half RoughnessSetup_Reflectivity()
    {
    return MetallicSetup_Reflectivity();
    }

    in

    C:\Program Files\Unity\Hub\Editor\2017.3.1f1\Editor\Data\CGIncludes\UnityStandardCoreForwardSimple.cginc

  3. nuruddin_a7

    Apr 15, 2018 04:34

    Simply change the material shader from Standard-(Roughness) to standard material and build your project.

  4. shahzaib

    Apr 05, 2018 07:49

    Not using "Standard (Roughness Setup)" in Standard material actually solves this problem.

  5. D10scur0

    Apr 02, 2018 12:14

    SILVERSHUNT method worked smoothly on Unity 2017.3.0f3

  6. Soluis-Developers

    Mar 29, 2018 14:32

    Please re-open. Same issue in 2018.1.0b12

  7. GlennSnyder

    Mar 27, 2018 01:39

    Can this be reopened? Im seeing the same issue and cant seem to clear it. Every time any of my devs need to build they have to delete the whole library, reimport all assets, change to Android build, compile and covert assets for android, change the graphics api, then build. Its taken our builds from roughly 5min to about 35 min. Issues persists into 2018 beta as well.

  8. GlennSnyder

    Mar 24, 2018 18:26

    Has there been a real resolution to this? Im still having this build issue and the solution posted here does not remove the error for me. Its also happening in 2018 beta for me.

    This issue is keeping me from completing a massive project and need some type of resolution asap. TIA.

  9. Mohamed-Moghazy

    Feb 16, 2018 10:10

    I've the same problem too, running with unity version 2017.3.1f1

  10. dmarfurt

    Feb 08, 2018 16:01

    Confirmed Silvershunt's workaround fixed the problem.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.