Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

ShaderForge Error : Remedy

Discussion in 'Shaders' started by Ginxx009, Jan 9, 2018.

  1. Ginxx009


    Sep 11, 2016
    If some is still facing this kind of error
    Shader error in 'Shader Forge/shaderName': variable 'd' used without having been completely initialized at line 117.
    Then don't worry actually here's the solution for that.

    UnityGIInput d;
    d.light = light;
    d.worldPos = posWorld;
    d.worldViewDir = -eyeVec;
    d.atten = atten;
    #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON)
    d.ambient = 0;
    d.lightmapUV = i_ambientOrLightmapUV;
    d.ambient = i_ambientOrLightmapUV.rgb;
    d.lightmapUV = 0;
    d.boxMax[0] = unity_SpecCube0_BoxMax;
    d.boxMin[0] = unity_SpecCube0_BoxMin;
    d.probePosition[0] = unity_SpecCube0_ProbePosition;
    d.probeHDR[0] = unity_SpecCube0_HDR;
    d.boxMax[1] = unity_SpecCube1_BoxMax;
    d.boxMin[1] = unity_SpecCube1_BoxMin;
    d.probePosition[1] = unity_SpecCube1_ProbePosition;
    d.probeHDR[1] = unity_SpecCube1_HDR;

    Hope i can help someone who's stuck right there