Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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