Compare commits
2 Commits
fc295808e9
...
4f12551e8f
Author | SHA1 | Date |
---|---|---|
SpoodyTheOne | 4f12551e8f | |
SpoodyTheOne | 6c8750768b |
|
@ -1300,7 +1300,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
numParticles: 1000000
|
||||
bloodCompute: {fileID: 7200000, guid: 99867deda8cf464cd87542adcc3c08f2, type: 3}
|
||||
mesh: {fileID: 6466198060863859617, guid: 803eb7ed90ad4b9388c2563597bd6db2, type: 3}
|
||||
mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||
instancedMaterial: {fileID: 2100000, guid: 0d09c46ae354e8c49b2688cc4325b256, type: 2}
|
||||
size: 0.05
|
||||
scoreMult: 1
|
||||
|
|
|
@ -264,6 +264,8 @@ public class BloodComputeShader : MonoBehaviour
|
|||
bloodCompute.SetVector("particleInitPos", loc);
|
||||
bloodCompute.SetInt("particlesToInitialize", found);
|
||||
|
||||
bloodCompute.SetVector("initialVelocity",Random.insideUnitCircle * power);
|
||||
|
||||
ComputeHelper.Dispatch(bloodCompute, amount, 1, 1, InitDustKernel);
|
||||
|
||||
activeParticles += found;
|
||||
|
|
|
@ -15,11 +15,8 @@ RWStructuredBuffer<uint> freeParticles;
|
|||
uint numParticles;
|
||||
uint particlesToInitialize;
|
||||
float3 particleInitPos;
|
||||
float3 initialVelocity;
|
||||
float deltaTime;
|
||||
// float3 attractPos;
|
||||
// float3 xAxis;
|
||||
// float attractRadius;
|
||||
// float attractForce;
|
||||
|
||||
float3 mop1Pos;
|
||||
float3 mop2Pos;
|
||||
|
@ -84,7 +81,7 @@ void InitDust (uint3 id : SV_DispatchThreadID)
|
|||
randState = hash(randState);
|
||||
nvel.xy *= scaleToRange01(randState);
|
||||
|
||||
particles[i].velocity = nvel;
|
||||
particles[i].velocity = initialVelocity + nvel;
|
||||
|
||||
particles[i].position = particleInitPos;
|
||||
particles[i].position.z = 0.01;
|
||||
|
|
Loading…
Reference in New Issue