Fix error amd Update features.
Changed Span<PointData> to ReadOnlySpan<PointData> on method Operate in EffectorBase.cs Changed the return type of method Operate in EffectorBase.cs from void to PointDate Added FieldHelper and BlendField function to make the blending work.
This commit is contained in:
@@ -56,10 +56,7 @@ namespace Misaki.ArtTool
|
||||
effectorMatrix = transform.localToWorldMatrix;
|
||||
}
|
||||
|
||||
public virtual void Operate(int index, float4x4 nodeWorldMatrix, Span<PointData> points)
|
||||
{
|
||||
|
||||
}
|
||||
public abstract PointData Operate(int index, float4x4 nodeWorldMatrix, ReadOnlySpan<PointData> points);
|
||||
|
||||
protected float CalculateFieldsWeight(float3 worldPosition)
|
||||
{
|
||||
@@ -73,7 +70,8 @@ namespace Misaki.ArtTool
|
||||
continue;
|
||||
}
|
||||
|
||||
weight = math.lerp(weight, fieldData.field.Operate(worldPosition), fieldData.opacity);
|
||||
//weight = math.lerp(weight, fieldData.field.Operate(worldPosition), fieldData.opacity);
|
||||
weight = FieldHelper.BlendField(weight, fieldData.field.Operate(worldPosition), fieldData.opacity, fieldData.blending);
|
||||
}
|
||||
|
||||
weight *= strength;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace Misaki.ArtTool
|
||||
{
|
||||
public class IterateEffectorBase : EffectorBase
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5144695703dc3434c93bc038017a3ac3
|
||||
Reference in New Issue
Block a user