initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
|
@ -0,0 +1,16 @@
|
|||
#include "Packages/com.unity.splines/Shader/Spline.cginc"
|
||||
|
||||
#pragma kernel GetPositions
|
||||
|
||||
SplineInfo info = float4(0,0,0,0);
|
||||
StructuredBuffer<BezierCurve> curves;
|
||||
StructuredBuffer<float> curveLengths;
|
||||
RWStructuredBuffer<float3> positions;
|
||||
float positionsCount;
|
||||
|
||||
[numthreads(64,1,1)]
|
||||
void GetPositions (uint id : SV_DispatchThreadID)
|
||||
{
|
||||
float curve = SplineToCurveT(info, curveLengths, id/(positionsCount - 1));
|
||||
positions[id] = EvaluatePosition(curves[floor(curve) % GetKnotCount(info)], frac(curve));
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c24a57eb9b84088e6a3e66d08b81ebd0
|
||||
ComputeShaderImporter:
|
||||
externalObjects: {}
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue