first commit
This commit is contained in:
@@ -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:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2de5d28125b5b4b36b52de0a0e164e44
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb5e712464e0743bd803a1ff1ff5e24d
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b37e02ae7785644b08fc7b358a058bc4
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
Reference in New Issue
Block a user