Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. 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

Help Wanted Can somebody help me with transfering this from code to shader graph

Discussion in 'Shader Graph' started by bugaj, Jan 16, 2020.

  1. bugaj


    Jun 28, 2015
    float3 binormal = cross(v.normal, * v.tangent.w;
    float3x3 rotation = float3x3(, binormal, v.normal);
    o.tangentToWorld = mul((float3x3)unity_ObjectToWorld, transpose(rotation));
    float3 worldViewDir = normalize (UnityWorldSpaceViewDir(worldPos));
    o.viewDir = worldViewDir;

    float3 shade = ShadeSH9(float4(o.normal,1));
    shade = max(shade, (unity_AmbientSky + unity_AmbientGround + unity_AmbientEquator) * 0.15); //Don't go to 0 even if there's no significant lighting data = lerp(1, shade, _LightStr);
    //vertlight.w is currently unused
  2. Subliminum


    Nov 9, 2017
    I wish i could haha, im pretty sure im halfway through adapting the same shader. Is this an excerpt from FXVille's Blood Shader?

    Feel free to add me on discord and perhaps we can figure it out (Subliminum#3844) or even better if you've already worked it out, help me fix my ShaderGraph? haha :)