Remove Bokusho taper pow drift
This commit is contained in:
parent
ce423793d8
commit
9814371313
2 changed files with 9 additions and 2 deletions
|
|
@ -720,10 +720,16 @@ public static class BokushoBrushSimulation
|
|||
{
|
||||
var entry = SmoothStep(0.0f, entryTaper, t);
|
||||
var exit = 1.0f - SmoothStep(1.0f - exitTaper, 1.0f, t);
|
||||
var contact = MathF.Pow(entry * exit, 1.12f);
|
||||
var contact = TaperContact(entry * exit);
|
||||
return 0.018f + contact * 0.982f;
|
||||
}
|
||||
|
||||
private static float TaperContact(float value)
|
||||
{
|
||||
var x = Saturate(value);
|
||||
return x * (0.76f + x * 0.24f);
|
||||
}
|
||||
|
||||
private static float StrokeProgress(AquariumBokushoBrushStroke stroke, float t)
|
||||
{
|
||||
var start = Math.Clamp(stroke.SegmentStart, 0.0f, 1.0f);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ float StrokeTaper(BokushoBrushStroke stroke, float t)
|
|||
float exitTaper = clamp(stroke.dynamics.y, 0.01, 0.50);
|
||||
float entry = cultmath_smoothstep(0.0, entryTaper, strokeT);
|
||||
float exit = 1.0 - cultmath_smoothstep(1.0 - exitTaper, 1.0, strokeT);
|
||||
float contact = pow(entry * exit, 1.12);
|
||||
float x = saturate(entry * exit);
|
||||
float contact = x * (0.76 + x * 0.24);
|
||||
return 0.018 + contact * 0.982;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue