Gate Bokusho page projection longitudinally
This commit is contained in:
parent
b2ae858ce8
commit
94474fcd3e
2 changed files with 6 additions and 2 deletions
|
|
@ -422,10 +422,12 @@ public static class BokushoBrushSimulation
|
|||
var tangentDistance = Vector2.Dot(delta, sampleTangent) / MathF.Max(tip.W, 0.001f);
|
||||
var ellipse = MathF.Sqrt(normalDistance * normalDistance + tangentDistance * tangentDistance);
|
||||
var tipContact = MathF.Max(SmoothStep(1.0f, 0.0f, ellipse), sweepContact * 0.86f);
|
||||
var longitudinalGate = SmoothStep(1.0f, 0.0f, MathF.Abs(tangentDistance) * 0.62f);
|
||||
var contribution = canvas[index]
|
||||
* tipContact
|
||||
* (0.03f + contactCore * 0.97f)
|
||||
* (1.0f - MathF.Abs(sampleDelta) * 0.045f)
|
||||
* (0.18f + longitudinalGate * 0.82f)
|
||||
* (1.0f - MathF.Abs(sampleDelta) * 0.070f)
|
||||
* (0.82f + sweepContact * 0.24f);
|
||||
pigmentPeak = MathF.Max(pigmentPeak, contribution);
|
||||
pigmentFlow += contribution;
|
||||
|
|
|
|||
|
|
@ -319,11 +319,13 @@ float bokushoStrokePageHeight(float2 world, BokushoBrushStroke stroke, uint stro
|
|||
float tangentDistance = dot(delta, sampleTangent) / max(tip.w, 0.001);
|
||||
float ellipse = sqrt(normalDistance * normalDistance + tangentDistance * tangentDistance);
|
||||
float tipContact = max(smoothstep(1.0, 0.0, ellipse), sweepContact * 0.86);
|
||||
float longitudinalGate = smoothstep(1.0, 0.0, abs(tangentDistance) * 0.62);
|
||||
float pigment = BokushoCanvasField[((strokeIndex * tuftCount) + tuftIndex) * sampleCount + sampleIndex];
|
||||
float contribution = pigment
|
||||
* tipContact
|
||||
* (0.03 + contactCore * 0.97)
|
||||
* (1.0 - abs((float)sampleDelta) * 0.045)
|
||||
* (0.18 + longitudinalGate * 0.82)
|
||||
* (1.0 - abs((float)sampleDelta) * 0.070)
|
||||
* (0.82 + sweepContact * 0.24);
|
||||
pigmentPeak = max(pigmentPeak, contribution);
|
||||
pigmentFlow += contribution;
|
||||
|
|
|
|||
Loading…
Reference in a new issue