Key Bokusho paper response by source stroke
This commit is contained in:
parent
107722141d
commit
70f5d49cc4
3 changed files with 21 additions and 2 deletions
|
|
@ -393,7 +393,8 @@ public static class BokushoBrushSimulation
|
|||
var distance = MathF.Sqrt(bestDistance);
|
||||
var contact = SmoothStep(1.0f, 0.0f, distance / MathF.Max(footprint * 0.80f, 0.001f));
|
||||
var contactCore = contact * contact * (3.0f - 2.0f * contact);
|
||||
var tooth = PaperTooth(world, strokeIndex);
|
||||
var paperKey = stroke.SourceStrokeId >= 0 ? stroke.SourceStrokeId : strokeIndex;
|
||||
var tooth = PaperTooth(world, paperKey);
|
||||
var edge = Saturate(distance / MathF.Max(footprint * 0.80f, 0.001f));
|
||||
var dryBreak = SmoothStep(0.18f + tooth * 0.18f, 0.92f, edge) * (1.0f - Saturate(frame.Wetness / 1.6f)) * (0.34f + stroke.SplitScale * 0.12f);
|
||||
var hold = Saturate(0.52f + tooth * 0.42f + pressure * 0.28f - dryBreak);
|
||||
|
|
|
|||
|
|
@ -282,7 +282,8 @@ float bokushoStrokePageHeight(float2 world, BokushoBrushStroke stroke, uint stro
|
|||
float distance = sqrt(bestDistance);
|
||||
float contact = smoothstep(1.0, 0.0, distance / max(footprint * 0.80, 0.001));
|
||||
float contactCore = contact * contact * (3.0 - 2.0 * contact);
|
||||
float tooth = bokushoPaperTooth(world, strokeIndex);
|
||||
uint paperKey = stroke.p3.w >= 0.0 ? (uint)round(stroke.p3.w) : strokeIndex;
|
||||
float tooth = bokushoPaperTooth(world, paperKey);
|
||||
float edge = saturate(distance / max(footprint * 0.80, 0.001));
|
||||
float dryBreak = smoothstep(0.18 + tooth * 0.18, 0.92, edge)
|
||||
* (1.0 - saturate(bokushoMaterial.w / 1.6))
|
||||
|
|
|
|||
Loading…
Reference in a new issue