Search Unity

[Request] Unity-chan Skin Shader - Light Intensity Factor

Discussion in 'Shaders' started by bakanekofr, Aug 23, 2014.

  1. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    Hello,

    I'm a total shader noob in Unity, and need just a small adjustment to the Unity-chan skin shader, available in the Unity-chan asset store package: https://www.assetstore.unity3d.com/en/#!/content/18705

    The shader is in these files:
    Unitychan_chara_hada.shader
    CharaSkin.cg

    The adjustment I'm looking for will be a factor variable (#define variable preferably) that will adjust the effect of the light intensity of the scene on this shader. The reason is that my current scene lighting is working great for everything else, but the character using the Unity-chan skin shader appears too dark.

    Thanks in advance :)
     
  2. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    Solved. Actually I needed to re-import the shader in Unity as the changes I was making where not activated until then.

    For those that might need it, just replace this line :
    float4_t diffSamplerColor = tex2D( _MainTex, i.uv ) * factor;
     
  3. AbandonedCart

    AbandonedCart

    Joined:
    Mar 4, 2014
    Posts:
    72
    I am having the same problem with it appearing too light. I am trying out the snippet you left in hopes I can cut the light in half for just the Unity-Chan model. It appears to be something in the update to 5.4.2, as 5.3 had no issues.

    They post shader updates at http://unity-chan.com/download/releaseNote.php?id=AdditionalUnityChanShader&lang=en as individual add-on packages to the one from the asset store. That may help if you are running into issues with other parts.
     
  4. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    Hi can i change the skin color in runtime?