Skip to content

Commit

Permalink
Merge pull request #31 from Delt06/shadow-fade
Browse files Browse the repository at this point in the history
Shadow fade
  • Loading branch information
Delt06 authored Jan 13, 2022
2 parents 7a6048d + d8ed60c commit 678fd28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ inline Light get_main_light(in v2f input SHADOW_MASK_PARAM)
#ifdef USE_SHADOW_MASK
return GetMainLight(shadow_coord, input.positionWSAndFogFactor.xyz, shadow_mask);
#else
return GetMainLight(shadow_coord);

// ReSharper disable once CppLocalVariableMayBeConst
Light light = GetMainLight(shadow_coord);

#ifdef MAIN_LIGHT_CALCULATE_SHADOWS
light.shadowAttenuation = lerp(light.shadowAttenuation, 1, GetShadowFade(input.positionWSAndFogFactor.xyz));
#endif

return light;

#endif
}

Expand Down
2 changes: 1 addition & 1 deletion Packages/com.deltation.toon-shader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.deltation.toon-shader",
"displayName": "Toon Shader",
"description": "Stylized toon shader for URP.",
"version": "0.4.6",
"version": "0.4.7",
"unity": "2020.3",
"dependencies": {
"com.unity.render-pipelines.universal": "10.3.2"
Expand Down

0 comments on commit 678fd28

Please sign in to comment.