Skip to content

Commit

Permalink
Updated to support FACE_SHADOW_SOFTNESS value
Browse files Browse the repository at this point in the history
Before, it wasn't used at all. Now it works properly
  • Loading branch information
Manashiku authored Mar 31, 2023
1 parent 4264f49 commit bfe9359
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sub/shadow.fxsub
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ float face_shading(in float2 uv)
}


float shadow_step = step(angle, shadow) ;
// float shadow_step = step(angle, shadow) ;
float shadow_step = smoothstep(angle - (FACE_SHADOW_SOFTNESS + 0.001f), angle + (FACE_SHADOW_SOFTNESS + 0.001f), shadow);
float facing_step = step(fdotl, 0.0f);

shadow_step = shadow_step * facing_step;
Expand Down

0 comments on commit bfe9359

Please sign in to comment.