master
chwan1 6 years ago
parent 7d829c63cc
commit 43a7dff3c8
  1. 267
      Unity-19050-05-BallPool/Assets/Frozen/Frozen.unity
  2. 30
      Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset
  3. 10
      Unity-19050-05-BallPool/Assets/Frozen/FrozenDayParticleUniforms.asset.meta
  4. 30
      Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset
  5. 10
      Unity-19050-05-BallPool/Assets/Frozen/FrozenNightParticleUniforms.asset.meta
  6. 30
      Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset
  7. 10
      Unity-19050-05-BallPool/Assets/Frozen/FrozenParticleUniforms.asset.meta
  8. 30
      Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset
  9. 10
      Unity-19050-05-BallPool/Assets/Frozen/ParticleUniforms.asset.meta
  10. 12
      Unity-19050-05-BallPool/Assets/Frozen/Script/SceneController.cs
  11. 2
      Unity-19050-05-BallPool/Assets/Klak.meta
  12. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks.meta
  13. 16
      Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset
  14. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/CosineGradient.asset.meta
  15. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material.meta
  16. 76
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat
  17. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Ground.mat.meta
  18. 76
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat
  19. 8
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/Mirror.mat.meta
  20. 78
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat
  21. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerInstanced.mat.meta
  22. 78
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat
  23. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerMesh.mat.meta
  24. 77
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat
  25. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Material/ParticleViewerProcedural.mat.meta
  26. 1287
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity
  27. 7
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleDance.unity.meta
  28. 30
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset
  29. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniforms.asset.meta
  30. 30
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset
  31. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleUniformsForMeshVertex.asset.meta
  32. 1017
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity
  33. 9
      Unity-19050-05-BallPool/Assets/ParticleWorks/ParticleWorks.unity.meta
  34. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script.meta
  35. 25
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs
  36. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/BlendedCosineGradient.cs.meta
  37. 17
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs
  38. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Defines.cs.meta
  39. 24
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs
  40. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ExtensionMethods.cs.meta
  41. 91
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs
  42. 11
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/MeshVertexCollect.cs.meta
  43. 29
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs
  44. 11
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniformBridge.cs.meta
  45. 63
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs
  46. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUniforms.cs.meta
  47. 105
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs
  48. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleUpdater.cs.meta
  49. 72
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs
  50. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewer.cs.meta
  51. 41
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs
  52. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerInstanced.cs.meta
  53. 125
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs
  54. 14
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerMesh.cs.meta
  55. 48
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs
  56. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleViewerProcedural.cs.meta
  57. 17
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs
  58. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/ParticleWorks.cs.meta
  59. 72
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs
  60. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/StructuredBuffer.cs.meta
  61. 28
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs
  62. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformBlendedStructuredBuffer.cs.meta
  63. 81
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs
  64. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/UniformStructuredBuffer.cs.meta
  65. 214
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs
  66. 13
      Unity-19050-05-BallPool/Assets/ParticleWorks/Script/Utilities.cs.meta
  67. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader.meta
  68. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc.meta
  69. 44
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc
  70. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/ColorConvert.cginc.meta
  71. 17
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc
  72. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Defines.cginc.meta
  73. 231
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc
  74. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Inc/Math.cginc.meta
  75. 42
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute
  76. 8
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/MeshVertexCollect.compute.meta
  77. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise.meta
  78. 55
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc
  79. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2D.cginc.meta
  80. 50
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc
  81. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2.cginc.meta
  82. 67
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc
  83. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular2x2x2.cginc.meta
  84. 177
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc
  85. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/cellular3D.cginc.meta
  86. 101
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc
  87. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise2D.cginc.meta
  88. 160
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc
  89. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise3D.cginc.meta
  90. 290
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc
  91. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/classicnoise4D.cginc.meta
  92. 66
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc
  93. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise2D.cginc.meta
  94. 93
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc
  95. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3D.cginc.meta
  96. 101
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc
  97. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise3Dgrad.cginc.meta
  98. 110
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc
  99. 10
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noise4D.cginc.meta
  100. 63
      Unity-19050-05-BallPool/Assets/ParticleWorks/Shader/Noise/noiseMath.cginc
  101. Some files were not shown because too many files have changed in this diff Show More

@ -2719,6 +2719,11 @@ Prefab:
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 114504107585269582, guid: 1f68bf7cec2600e49a46d2f0554453c8,
type: 2}
propertyPath: debugInput
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 2} m_ParentPrefab: {fileID: 100100000, guid: 1f68bf7cec2600e49a46d2f0554453c8, type: 2}
m_IsPrefabParent: 0 m_IsPrefabParent: 0
@ -4011,136 +4016,6 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1075112480} m_GameObject: {fileID: 1075112480}
--- !u!43 &1079079082
Mesh:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 'Space Ground Mesh: (8x5x3)'
serializedVersion: 8
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 24
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 16
localAABB:
m_Center: {x: 0, y: 1.5, z: 0}
m_Extent: {x: 4, y: 1.5, z: 2.5}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_MeshCompression: 0
m_IsReadable: 0
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00
m_Skin: []
m_VertexData:
m_CurrentChannels: 11
m_VertexCount: 16
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 12
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 24
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 512
_typelessdata: 000080c000000000000020c0000000000000803f00000000e4388e3e00000000000080c00000000000002040000000000000803f00000000e4388e3e0000203f0000804000000000000020c0000000000000803f000000008ee3383f00000000000080400000000000002040000000000000803f000000008ee3383f0000203f000080c000000000000020400000000000000000000080bfe4388e3e0000203f000080c000004040000020400000000000000000000080bfe4388e3e0000803f0000804000000000000020400000000000000000000080bf8ee3383f0000203f0000804000004040000020400000000000000000000080bf8ee3383f0000803f000080c000000000000020c00000803f0000000000000000000000000000203f000080c000004040000020c00000803f0000000000000000000000000000803f000080c000000000000020400000803f0000000000000000e4388e3e0000203f000080c000004040000020400000803f0000000000000000e4388e3e0000803f000080400000000000002040000080bf00000000000000008ee3383f0000203f000080400000404000002040000080bf00000000000000008ee3383f0000803f0000804000000000000020c0000080bf00000000000000000000803f0000203f0000804000004040000020c0000080bf00000000000000000000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 1.5, z: 0}
m_Extent: {x: 4, y: 1.5, z: 2.5}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshOptimized: 0
--- !u!1 &1164756621 --- !u!1 &1164756621
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5351,7 +5226,7 @@ MeshFilter:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1379541361} m_GameObject: {fileID: 1379541361}
m_Mesh: {fileID: 1079079082} m_Mesh: {fileID: 1538287620}
--- !u!114 &1379541365 --- !u!114 &1379541365
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -6022,6 +5897,136 @@ Transform:
m_Father: {fileID: 96822206} m_Father: {fileID: 96822206}
m_RootOrder: 3 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!43 &1538287620
Mesh:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 'Space Ground Mesh: (8x5x3)'
serializedVersion: 8
m_SubMeshes:
- serializedVersion: 2
firstByte: 0
indexCount: 24
topology: 0
baseVertex: 0
firstVertex: 0
vertexCount: 16
localAABB:
m_Center: {x: 0, y: 1.5, z: 0}
m_Extent: {x: 4, y: 1.5, z: 2.5}
m_Shapes:
vertices: []
shapes: []
channels: []
fullWeights: []
m_BindPose: []
m_BoneNameHashes:
m_RootBoneNameHash: 0
m_MeshCompression: 0
m_IsReadable: 0
m_KeepVertices: 1
m_KeepIndices: 1
m_IndexFormat: 0
m_IndexBuffer: 000001000200010003000200040005000600050007000600080009000a0009000b000a000c000d000e000d000f000e00
m_Skin: []
m_VertexData:
m_CurrentChannels: 11
m_VertexCount: 16
m_Channels:
- stream: 0
offset: 0
format: 0
dimension: 3
- stream: 0
offset: 12
format: 0
dimension: 3
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 24
format: 0
dimension: 2
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
- stream: 0
offset: 0
format: 0
dimension: 0
m_DataSize: 512
_typelessdata: 000080c000000000000020c0000000000000803f00000000e4388e3e00000000000080c00000000000002040000000000000803f00000000e4388e3e0000203f0000804000000000000020c0000000000000803f000000008ee3383f00000000000080400000000000002040000000000000803f000000008ee3383f0000203f000080c000000000000020400000000000000000000080bfe4388e3e0000203f000080c000004040000020400000000000000000000080bfe4388e3e0000803f0000804000000000000020400000000000000000000080bf8ee3383f0000203f0000804000004040000020400000000000000000000080bf8ee3383f0000803f000080c000000000000020c00000803f0000000000000000000000000000203f000080c000004040000020c00000803f0000000000000000000000000000803f000080c000000000000020400000803f0000000000000000e4388e3e0000203f000080c000004040000020400000803f0000000000000000e4388e3e0000803f000080400000000000002040000080bf00000000000000008ee3383f0000203f000080400000404000002040000080bf00000000000000008ee3383f0000803f0000804000000000000020c0000080bf00000000000000000000803f0000203f0000804000004040000020c0000080bf00000000000000000000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_UV:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Normals:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Tangents:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_Weights:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_NormalSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_TangentSigns:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_FloatColors:
m_NumItems: 0
m_Range: 0
m_Start: 0
m_Data:
m_BitSize: 0
m_BoneIndices:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_Triangles:
m_NumItems: 0
m_Data:
m_BitSize: 0
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 1.5, z: 0}
m_Extent: {x: 4, y: 1.5, z: 2.5}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
m_MeshOptimized: 0
--- !u!1 &1561705233 --- !u!1 &1561705233
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3}
m_Name: FrozenDayParticleUniforms
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 0.556
velocityDamping: 0.1
lifeDuration: 10
lifeVariation: 0
convergence: 0
homeStrength: 0
noiseStrength: 0.055
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.731
forceDirection: {x: 0, y: 0, z: 1}
forceStrength: 0
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: 0.06

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 43473f0506b1ba64c86ae17dd11d902a
timeCreated: 1513320663
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3}
m_Name: FrozenNightParticleUniforms
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 0.02
velocityDamping: 0.98
lifeDuration: 5
lifeVariation: 0
convergence: 0
homeStrength: 0.63
noiseStrength: 0.055
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.733
forceDirection: {x: 0, y: 0, z: 1}
forceStrength: 0
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: 0.1

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 54b82be1afe58664c8daeb575db89094
timeCreated: 1513320663
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3}
m_Name: FrozenParticleUniforms
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 1
velocityDamping: 0.95
lifeDuration: 10
lifeVariation: 0
convergence: 0
homeStrength: 0
noiseStrength: 0.055
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.731
forceDirection: {x: 0, y: 0, z: 1}
forceStrength: 0
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: 0.06

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 43a114cac50c03e4ea881a51dbb6e7bd
timeCreated: 1513320663
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3}
m_Name: ParticleUniforms
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 0.074
velocityDamping: 0.95
lifeDuration: 10
lifeVariation: 0
convergence: 0
homeStrength: 0
noiseStrength: 0.055
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.731
forceDirection: {x: 0, y: 0, z: 1}
forceStrength: 0.493
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: 0.05

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 86d4ce704ed55d343a52fed03681663d
timeCreated: 1513320663
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -22,8 +22,8 @@ namespace UltraCombos.Frozen
[Range(0, 1)] [Range(0, 1)]
public float rate = 0.0f; public float rate = 0.0f;
[SerializeField] // [SerializeField]
UniformBlendedStructuredBuffer uniform; // UniformBlendedStructuredBuffer uniform;
//[SerializeField] //[SerializeField]
public List<Material> spaceMaterials = new List<Material>(); public List<Material> spaceMaterials = new List<Material>();
@ -35,16 +35,16 @@ namespace UltraCombos.Frozen
[SerializeField] [SerializeField]
Material snowMaterial; Material snowMaterial;
[SerializeField] // [SerializeField]
BlendedCosineGradient cosineGradient; // BlendedCosineGradient cosineGradient;
// [SerializeField] // [SerializeField]
// KinectOpticalFlow kinect; // KinectOpticalFlow kinect;
[SerializeField] [SerializeField]
float nightKinectAmount = 30.0f; float nightKinectAmount = 30.0f;
[SerializeField] // [SerializeField]
ParticleViewerProcedural particleViewer; // ParticleViewerProcedural particleViewer;
[SerializeField, Range(0, 1)] [SerializeField, Range(0, 1)]
float dayParticleRate = 1.0f; float dayParticleRate = 1.0f;

@ -1,8 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 13b88616b1d47df45b1c7e4bea2670ec guid: 13b88616b1d47df45b1c7e4bea2670ec
folderAsset: yes folderAsset: yes
timeCreated: 1519716653
licenseType: Free
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 22351417d40ca3844ba1ccf6bd1f6f5b
folderAsset: yes
timeCreated: 1519716259
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,16 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 54276434dda9c694e85abaf98cdd981d, type: 3}
m_Name: CosineGradient
m_EditorClassIdentifier:
_redCoeffs: {x: 0.32, y: 0.284, z: 0.56, w: 0.453}
_greenCoeffs: {x: 0.191, y: 0.306, z: 0.3, w: 0.825}
_blueCoeffs: {x: 0.198, y: 0.558, z: 0.27, w: 0}

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 0b6d4f25fdc8b8448a67827d394f8c07
timeCreated: 1513340684
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 863ee04df261c0b4d9835a82da436f0f
folderAsset: yes
timeCreated: 1513322377
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,76 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Ground
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.448
- _GlossyReflections: 1
- _Metallic: 0.17
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 54c13d9de6d77834994872fbf5c7082b
timeCreated: 1513322386
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,76 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Mirror
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.425
- _GlossyReflections: 1
- _Metallic: 0.653
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 305605d3346fb2f4fbad85f4e832bed2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,78 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ParticleViewerInstanced
m_Shader: {fileID: 4800000, guid: 0a37c93f4a42ad341ab8b8d2dafab01d, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 10910, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Emission: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0.917
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Smoothness: 0.839
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: cc1041196be864c4cbe1b6a6118fe495
timeCreated: 1514086623
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,78 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ParticleViewerMesh
m_Shader: {fileID: 4800000, guid: c31611738f4cc1b4ea71988156cc8327, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 10904, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Emission: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0.579
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Smoothness: 0.479
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 6c404ebf6ff877a46a9ac3132b7c648d
timeCreated: 1513321839
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,77 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: ParticleViewerProcedural
m_Shader: {fileID: 4800000, guid: 6815828e001d01f4699ec8c7f1dde1fe, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Emission: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 2c82eba6891c0044f9854bb70b0da2ef
timeCreated: 1513930866
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: de3d241ea26743343865c5090195c069
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3}
m_Name: ParticleUniforms
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 0.069
velocityDamping: 1
lifeDuration: 0
lifeVariation: 0
convergence: 0.097
homeStrength: 0.165
noiseStrength: 0.208
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.217
forceDirection: {x: 0, y: 0, z: 0}
forceStrength: 0
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: -1

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 01c39e7b96a04b24f87d437d0c5474e2
timeCreated: 1513320663
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,30 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 852ced439e5120c44bd352e9c29a164f, type: 3}
m_Name: ParticleUniformsForMeshVertex
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 0.063
velocityDamping: 1
lifeDuration: 1
lifeVariation: 0.571
convergence: 0
homeStrength: 0
noiseStrength: 0.02
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.831
forceDirection: {x: 0, y: 0, z: 0}
forceStrength: 0.026
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: 0

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: c7e1ee53cbe14844380318198723f1e8
timeCreated: 1513320663
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 111e8696392ec08489338cded28613a2
timeCreated: 1513312462
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: fb695c06cfd78384791aea3307ffdafe
folderAsset: yes
timeCreated: 1513318441
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,25 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class BlendedCosineGradient : MonoBehaviour
{
[SerializeField]
Klak.Chromatics.CosineGradient fromGradient = null;
[SerializeField]
Klak.Chromatics.CosineGradient toGradient = null;
[Range(0, 1)]
public float rate = 0.0f;
public Vector3 coeffsA { get { return Vector3.Lerp(fromGradient.coeffsA, toGradient.coeffsA, rate); } }
public Vector3 coeffsB { get { return Vector3.Lerp(fromGradient.coeffsB, toGradient.coeffsB, rate); } }
public Vector3 coeffsC2 { get { return Vector3.Lerp(fromGradient.coeffsC2, toGradient.coeffsC2, rate); } }
public Vector3 coeffsD2 { get { return Vector3.Lerp(fromGradient.coeffsD2, toGradient.coeffsD2, rate); } }
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 47a33aaf81d9cd84190b40b44c73516c
timeCreated: 1525079670
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,17 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public struct Particle
{
public Vector3 position;
public float seed;
public Color color;
public Vector3 velocity;
public float life;
public Vector4 quat;
public Matrix4x4 model_matrix;
};
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: dc08faa58ae0bd74684f723a22959463
timeCreated: 1513318457
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,24 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public static class ExtensionMethods
{
public static ComputeBuffer CreateIndirectComputeArgsBuffer(this ComputeShader shader, int num_thread_x, int num_thread_y, int num_thread_z)
{
uint x, y, z;
shader.GetKernelThreadGroupSizes(0, out x, out y, out z);
uint[] args = new uint[3]
{
(uint)Mathf.CeilToInt((float)num_thread_x / x),
(uint)Mathf.CeilToInt((float)num_thread_y / y),
(uint)Mathf.CeilToInt((float)num_thread_z / z)
};
var buf = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments);
buf.SetData(args);
return buf;
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 71a803c8174401a42a8aab03320f61ab
timeCreated: 1513949514
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,91 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class MeshVertexCollect : MonoBehaviour
{
public ComputeShader shader;
ComputeBuffer args_buffer = null;
[SerializeField] StructuredBuffer positionBuffer;
[SerializeField] StructuredBuffer velocityBuffer;
List<SkinnedMeshRenderer> renderers;
List<ComputeBuffer> vertex_buffers;
Mesh bake_mesh;
private void Start()
{
renderers = new List<SkinnedMeshRenderer>();
renderers.AddRange(GetComponentsInChildren<SkinnedMeshRenderer>());
vertex_buffers = new List<ComputeBuffer>();
int sum = 0;
foreach (var rdr in renderers)
{
var m = rdr.sharedMesh;
var ptr = m.GetNativeVertexBufferPtr(0);
int size = Utility.Buffer.GetSize(ptr);
int count = m.vertexCount;
int stride = size / m.vertexCount;
sum += count;
ComputeBuffer buf = new ComputeBuffer(count, stride);
Utility.Buffer.Copy(buf.GetNativeBufferPtr(), m.GetNativeVertexBufferPtr(0));
vertex_buffers.Add(buf);
}
positionBuffer.Allocate(sum, sizeof(float) * 4);
velocityBuffer.Allocate(sum, sizeof(float) * 4);
args_buffer = shader.CreateIndirectComputeArgsBuffer(positionBuffer.count, 1, 1);
bake_mesh = new Mesh();
}
private void FixedUpdate()
{
for (int i = 0; i < renderers.Count; i++)
{
renderers[i].BakeMesh(bake_mesh);
Utility.Buffer.Copy(vertex_buffers[i].GetNativeBufferPtr(), bake_mesh.GetNativeVertexBufferPtr(0));
}
int index = 0;
shader.SetBuffer(0, positionBuffer.bufferName, positionBuffer.obj);
shader.SetBuffer(0, velocityBuffer.bufferName, velocityBuffer.obj);
for (int i = 0; i < renderers.Count; i++)
//foreach (var buf in vertex_buffers)
{
var buf = vertex_buffers[i];
shader.SetInt("index", index);
shader.SetInt("count", buf.count);
shader.SetMatrix("model_matrix", renderers[i].transform.localToWorldMatrix);
shader.SetBuffer(0, "vertex_buffer", buf);
shader.DispatchIndirect(0, args_buffer);
index += buf.count;
}
}
private void OnDestroy()
{
if (args_buffer != null)
{
args_buffer.Release();
args_buffer = null;
}
foreach (var buf in vertex_buffers)
{
buf.Release();
}
}
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 8eb9b37b2e6fe504c948b6b2ad22a38c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,29 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class ParticleUniformBridge : MonoBehaviour
{
public Transform impule;
UniformStructuredBuffer uniform_buffer;
private void Start()
{
uniform_buffer = GetComponent<UniformStructuredBuffer>();
}
private void FixedUpdate()
{
var uniforms = uniform_buffer.uniform as ParticleUniforms;
if (impule != null)
{
uniforms.impulsePosition = impule.position;
}
}
}
}

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 799fd07762a67b348818cbe8e6502e21
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,63 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
[CreateAssetMenu(menuName = "UltraCombos/ParticleUniforms", fileName = "ParticleUniforms", order = 1000)]
public class ParticleUniforms : ScriptableObject
{
[Header("General")]
//[Range(1, 1 << 21)]
//public int maxParticles = 1 << 20;
//[Range(0, 1)]
//public int isEmit = 1;
[Range(0, 1)]
public float numRate = 1.0f;
[Range(0, 10)]
public float movement = 1.0f;
[Range(0, 1)]
public float geomSize = 0.01f;
//[Range(0, 1)]
//public float colorize = 1.0f;
[Range(0, 1)]
public float velocityDamping = 1.0f;
[Header("Life")]
[Range(0, 60)]
public float lifeDuration = 0.0f;
[Range(0, 1)]
public float lifeVariation = 0.0f;
[Header("Convergence")]
[Range(0, 1)]
public float convergence = 0.0f;
[Header("Home")]
[Range(0, 1)]
public float homeStrength = 0.0f;
[Header("Noise")]
[Range(0, 1)]
public float noiseStrength = 0.0f;
[Range(0, 1)]
public float noiseSeed = 0.5f;
[Range(0, 1)]
public float noiseTimeScale = 1.0f;
[Range(0, 1)]
public float noiseFrequency = 0.5f;
[Header("Directional Force")]
public Vector3 forceDirection;
[Range(0, 1)]
public float forceStrength = 0.0f;
[Header("Impulse Force")]
public Vector3 impulsePosition;
[Range(0, 10)]
public float impulseRadius = 1.0f;
[Range(-1, 1)]
public float impulseStrength = 0.0f;
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 852ced439e5120c44bd352e9c29a164f
timeCreated: 1513320246
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,105 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class ParticleUpdater : MonoBehaviour
{
public bool reset = false;
[Range(1, 1 << 20)]
public int maxParticles = 1 << 15;
public StructuredBuffer particleBuffer = null;
List<Particle> buffer_data = null;
public StructuredBuffer homeBuffer = null;
public StructuredBuffer homeVelocityBuffer = null;
public ComputeShader shader = null;
ComputeBuffer args_buffer = null;
public UniformStructuredBuffer uniformBuffer;
public Klak.Chromatics.CosineGradient cosineGradient = null;
bool is_initialized = false;
[SerializeField]
string debug;
private void Start()
{
StartCoroutine(Initialize());
}
private void FixedUpdate()
{
if (is_initialized == false)
return;
if (reset)
{
reset = false;
OnReset();
}
UpdateParticle(Time.fixedDeltaTime);
}
private void OnDestroy()
{
Utilities.Release(ref args_buffer);
}
private void OnReset()
{
particleBuffer.SetData(buffer_data);
}
private IEnumerator Initialize()
{
#if false
{
uint[] args = new uint[3] { (uint)Mathf.CeilToInt((float)maxHomes / WORK_GROUP_SIZE), 1, 1 };
home_args_buffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments);
home_args_buffer.SetData(args);
}
#endif
{
args_buffer = shader.CreateIndirectComputeArgsBuffer(maxParticles, 1, 1);
}
{
buffer_data = new List<Particle>();
yield return Utilities.GetRandomParticleData(maxParticles, buffer_data);
}
is_initialized = true;
OnReset();
}
private void UpdateParticle(float time_step)
{
{
shader.SetFloat("timeStep", time_step);
shader.SetFloat("timeValue", Utilities.GetTimeValue());
shader.SetInt("home_count", homeBuffer.IsValid ? homeBuffer.count : 0);
shader.SetFloat("bufferCount", particleBuffer.count);
if (cosineGradient != null)
{
shader.SetVector("coeffsA", cosineGradient.coeffsA);
shader.SetVector("coeffsB", cosineGradient.coeffsB);
shader.SetVector("coeffsC", cosineGradient.coeffsC2);
shader.SetVector("coeffsD", cosineGradient.coeffsD2);
}
shader.SetBuffer(0, particleBuffer.bufferName, particleBuffer.obj);
shader.SetBuffer(0, uniformBuffer.bufferName, uniformBuffer.obj);
if (homeBuffer.IsValid) shader.SetBuffer(0, homeBuffer.bufferName, homeBuffer.obj);
if (homeVelocityBuffer.IsValid) shader.SetBuffer(0, homeVelocityBuffer.bufferName, homeVelocityBuffer.obj);
shader.DispatchIndirect(0, args_buffer);
}
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 364a6df5fc849f7448e97efcaa6cefdc
timeCreated: 1513317911
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,72 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class ParticleViewer : MonoBehaviour
{
public StructuredBuffer buffer;
public Material material;
public bool Initialized { get { return is_initialized; } }
bool is_initialized = false;
private IEnumerator Start()
{
while (buffer.count == 0)
yield return null;
OnStart();
yield return Initialize();
is_initialized = true;
}
private void Update()
{
if (is_initialized == false)
return;
OnUpdate();
}
private void FixedUpdate()
{
if (is_initialized == false)
return;
OnFixedUpdate();
}
private void OnDestroy()
{
Release();
}
protected virtual void OnStart()
{
}
protected virtual void OnUpdate()
{
}
protected virtual void OnFixedUpdate()
{
}
protected virtual IEnumerator Initialize()
{
is_initialized = true;
yield return null;
}
protected virtual void Release()
{
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: f9b1db6ec9855f941a3be0a6979d3bda
timeCreated: 1513320747
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,41 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class ParticleViewerInstanced : ParticleViewer
{
public Mesh reference;
Bounds bounds;
ComputeBuffer args_buffer = null;
MaterialPropertyBlock props = null;
protected override void OnUpdate()
{
props.SetMatrix("model_matrix", transform.localToWorldMatrix);
Graphics.DrawMeshInstancedIndirect(reference, 0, material, bounds, args_buffer, 0, props);
}
protected override IEnumerator Initialize()
{
bounds = new Bounds(Vector3.zero, Vector3.one * 100);
// index count per instance, instance count, start index location, base vertex location, start instance location
var args = new uint[5] { reference.GetIndexCount(0), (uint)buffer.count, 0, 0, 0 };
args_buffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments);
args_buffer.SetData(args);
props = new MaterialPropertyBlock();
props.SetBuffer(buffer.bufferName, buffer.obj);
yield return null;
}
protected override void Release()
{
Utilities.Release(ref args_buffer);
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 6d8d9920ebddf6247accd7655895ed34
timeCreated: 1513320747
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,125 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
public class ParticleViewerMesh : ParticleViewer
{
public ComputeShader shader;
ComputeBuffer args_buffer = null;
ComputeBuffer origin_buffer = null;
ComputeBuffer vertex_buffer = null;
public List<Mesh> references;
Mesh mesh = null;
System.IntPtr mesh_buffer_handle;
public ComputeBuffer vertexBuffer { get { return vertex_buffer; } }
int buffer_count = 0;
public int BufferCount { set { buffer_count = value; } }
protected override void OnFixedUpdate()
{
shader.SetBuffer(0, buffer.bufferName, buffer.obj);
shader.SetBuffer(0, "origin_buffer", origin_buffer);
shader.SetBuffer(0, "vertex_buffer", vertex_buffer);
shader.DispatchIndirect(0, args_buffer);
Utility.Buffer.Copy(mesh_buffer_handle, vertex_buffer.GetNativeBufferPtr());
}
protected override void OnUpdate()
{
material.SetBuffer(buffer.bufferName, buffer.obj);
}
protected override void Release()
{
if (origin_buffer != null)
{
origin_buffer.Release();
origin_buffer = null;
}
if (vertex_buffer != null)
{
vertex_buffer.Release();
vertex_buffer = null;
}
if (args_buffer != null)
{
args_buffer.Release();
args_buffer = null;
}
}
protected override IEnumerator Initialize()
{
if (references.Count == 0)
{
var vertices = new List<Vector3>();
var normals = new List<Vector3>();
var colors = new List<Color>();
var uvs = new List<Vector2>();
var indices = new List<int>();
int side = 3;
float delta = Mathf.PI * 2.0f / side;
for (int i = 0; i < side; i++)
{
float a = -delta * i;
float x = Mathf.Cos(a);
float y = Mathf.Sin(a);
vertices.Add(new Vector3(x, 0, y));
normals.Add(new Vector3(0, 1, 0));
colors.Add(Color.white);
uvs.Add(new Vector2(x * 0.5f + 0.5f, y * 0.5f + 0.5f));
indices.Add(i);
}
var m = new Mesh();
m.SetVertices(vertices);
m.SetNormals(normals);
m.SetColors(colors);
m.SetUVs(0, uvs);
m.SetIndices(indices.ToArray(), MeshTopology.Triangles, 0);
m.UploadMeshData(false);
m.name = string.Format("{0} sides mesh", side);
references.Add(m);
}
mesh = new Mesh();
int max_particles = buffer_count > 0 ? buffer_count : buffer.count;
yield return Utilities.GetReferencesParticleMesh(references, max_particles, mesh);
{
mesh.name = string.Format("v: {0}", mesh.vertexCount);
var mesh_filter = GetComponent<MeshFilter>();
mesh_filter.sharedMesh = mesh;
//var mesh_renderer = GetComponent<MeshRenderer>();
//mesh_renderer.material = material;
//mesh_renderer.allowOcclusionWhenDynamic = false;
}
{
mesh_buffer_handle = mesh.GetNativeVertexBufferPtr(0);
int size = Utility.Buffer.GetSize(mesh_buffer_handle);
int count = mesh.vertexCount;
int stride = size / count;
//print("size: " + size);
//print("count: " + count);
//print("stride: " + stride);
origin_buffer = new ComputeBuffer(count, stride);
Utility.Buffer.Copy(origin_buffer.GetNativeBufferPtr(), mesh_buffer_handle);
vertex_buffer = new ComputeBuffer(count, stride);
Utility.Buffer.Copy(vertex_buffer.GetNativeBufferPtr(), mesh_buffer_handle);
args_buffer = shader.CreateIndirectComputeArgsBuffer(count, 1, 1);
}
}
}
}

@ -1,14 +0,0 @@
fileFormatVersion: 2
guid: 4d54292eb10cbcf43a98b855de6807e7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- buffer: {instanceID: 0}
- material: {instanceID: 0}
- shader: {fileID: 7200000, guid: 226ca53b2a6b1f34cb8e462337683d07, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,48 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class ParticleViewerProcedural : ParticleViewer
{
ComputeBuffer args_buffer = null;
public int VertexCount { set { vertex_count = value; } }
int vertex_count = -1;
public bool cullingMask = false;
private void OnRenderObject()
{
if (Initialized == false)
return;
if (Utilities.SkipCamera(Camera.current.name))
return;
int mask = Camera.current.cullingMask;
if (cullingMask && mask > -1 && mask != 1 << gameObject.layer)
return;
material.SetPass(0);
material.SetMatrix("model_matrix", transform.localToWorldMatrix);
material.SetBuffer(buffer.bufferName, buffer.obj);
if (vertex_count < 0)
Graphics.DrawProceduralIndirect(MeshTopology.Points, args_buffer);
else
Graphics.DrawProcedural(MeshTopology.Points, vertex_count, 1);
}
protected override IEnumerator Initialize()
{
var args = new uint[4] { (uint)buffer.count, 1, 0, 0 };
args_buffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments);
args_buffer.SetData(args);
yield return null;
}
protected override void Release()
{
Utilities.Release(ref args_buffer);
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: e2f970277ae55db488ae9e5e4d484912
timeCreated: 1513320747
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,17 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ParticleWorks : MonoBehaviour
{
void Start()
{
}
void Update()
{
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 516d0ee655a0aa54bb9a8f6205b6fb4e
timeCreated: 1513308272
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,72 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class StructuredBuffer : MonoBehaviour
{
public string bufferName = "ssbo";
public int count { get { return (buffer != null) ? buffer.count : 0; } }
public int stride { get { return (buffer != null) ? buffer.stride : 0; } }
public ComputeBuffer obj { get { return buffer; } }
ComputeBuffer buffer = null;
public bool IsValid { get { return (buffer != null); } }
System.IntPtr pointer;
public System.IntPtr handle
{
get
{
if (pointer == System.IntPtr.Zero)
pointer = obj.GetNativeBufferPtr();
return pointer;
}
}
#if false
[SerializeField] string debug;
private void FixedUpdate()
{
debug = string.Format("count: {0}, stride: {1}", count, stride);
}
#endif
private void OnDestroy()
{
Release();
}
public void Allocate(int count, int stride)
{
Release();
buffer = new ComputeBuffer(count, stride, ComputeBufferType.Default);
//Debug.LogFormat("ALLOCATE: count({0}), stride({1})", count, stride);
}
public void SetData<T>(List<T> data)
{
int data_count = data.Count;
int data_stride = System.Runtime.InteropServices.Marshal.SizeOf(typeof(T));
if (buffer == null)
{
Allocate(data_count, data_stride);
}
else if (buffer.count * buffer.stride != data_count * data_stride)
{
Allocate(data_count, data_stride);
}
buffer.SetData(data);
}
public void Release()
{
if (buffer != null)
{
buffer.Release();
}
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: afa75a2a1fe8aff4ab1d6418df9d62dd
timeCreated: 1513311430
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,28 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class UniformBlendedStructuredBuffer : UniformStructuredBuffer
{
public ScriptableObject subUniform;
[Range(0, 1)]
public float rate;
protected override void FixedUpdate()
{
var data = GetData(uniform);
var sub_data = GetData(subUniform);
float v = Mathf.Clamp01(rate);
var res = new List<float>();
for (int i = 0; i < data.Count; i++)
{
res.Add(Mathf.Lerp(data[i], sub_data[i], v));
}
SetData(res);
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 3b2b572af25338e4594570cf0c8a1806
timeCreated: 1525076508
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,81 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UltraCombos
{
public class UniformStructuredBuffer : StructuredBuffer
{
public ScriptableObject uniform;
void Start()
{
int stride = GetStride(uniform.GetType());
Allocate(stride / sizeof(float), sizeof(float));
//Debug.LogFormat("stride: {0}", stride);
}
protected virtual void FixedUpdate()
{
var data = GetData(uniform);
SetData(data);
}
protected int GetStride(System.Type type)
{
int res = 0;
foreach (var field in type.GetFields())
{
int s = System.Runtime.InteropServices.Marshal.SizeOf(field.FieldType);
res += s;
//Debug.LogFormat("{0}: {1}", field.Name, s);
}
return res;
}
protected List<float> GetData(object obj)
{
List<float> values = new List<float>();
foreach (var field in obj.GetType().GetFields())
{
var value = field.GetValue(obj);
if (field.FieldType.Equals(typeof(int)))
{
values.Add((int)value);
}
else if (field.FieldType.Equals(typeof(float)))
{
values.Add((float)value);
}
else if (field.FieldType.Equals(typeof(Vector2)))
{
var v = (Vector2)value;
values.Add(v.x);
values.Add(v.y);
}
else if (field.FieldType.Equals(typeof(Vector3)))
{
var v = (Vector3)value;
values.Add(v.x);
values.Add(v.y);
values.Add(v.z);
}
else if (field.FieldType.Equals(typeof(Vector4)))
{
var v = (Vector4)value;
values.Add(v.x);
values.Add(v.y);
values.Add(v.z);
values.Add(v.w);
}
else
{
Debug.LogFormat("Field is invalid: {0} - {1}", field.Name, field.FieldType);
}
}
return values;
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: de2687c4b3b02dc4ebc0495697f1cfb0
timeCreated: 1513427579
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,214 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UltraCombos
{
public class Utilities
{
const float TWO_PI = Mathf.PI * 2.0f;
public static float[] GetShuffleSeeds(int num)
{
List<float> sources = new List<float>();
for (uint i = 0; i < num; i++)
sources.Add((float)i / num);
var rnd = new System.Random();
return sources.OrderBy(item => rnd.Next()).ToArray();
}
public static Mesh[] GetUVIndexPolygons(int maxParticles, int side, float radius, float randomRadius = 0.0f, float startAngle = 0)
{
#if UNITY_2017_3_OR_NEWER
int num_meshes = 1;
#else
int limit = 65000;
int num_vertices = maxParticles * side;
int num_meshes = (num_vertices + limit - 1) / limit;
#endif
int ptc_per_mesh = maxParticles / num_meshes;
Mesh[] meshes = new Mesh[num_meshes];
float r_mul = Mathf.Clamp01(randomRadius);
float r_max = radius * (1.0f + r_mul);
float r_min = radius * (1.0f - r_mul);
for (int i = 0; i < num_meshes; i++)
{
var vertices = new List<Vector3>();
var uvs = new List<Vector4>();
var normals = new List<Vector3>();
var indices = new List<int>();
for (int j = 0; j < ptc_per_mesh; j++)
{
int index = i * ptc_per_mesh + j;
float delta_a = TWO_PI / side;
for (uint k = 0; k < side; k++)
{
float a = delta_a * k + Mathf.PI / 4;
float x = Mathf.Cos(a);
float y = Mathf.Sin(a);
float r = Random.Range(r_min, r_max);
vertices.Add(new Vector3(x * r, y * r, 0));
uvs.Add(new Vector4(x * 0.5f + 0.5f, y * 0.5f + 0.5f, index, k));
normals.Add(new Vector3(0, 0, 1));
}
for (int k = 0; k < side - 2; k++)
{
indices.Add(j * side + 0);
indices.Add(j * side + k + 1);
indices.Add(j * side + k + 2);
}
}
meshes[i] = new Mesh();
#if UNITY_2017_3_OR_NEWER
meshes[i].indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;
#endif
meshes[i].SetVertices(vertices);
meshes[i].SetUVs(0, uvs);
meshes[i].SetNormals(normals);
meshes[i].SetIndices(indices.ToArray(), MeshTopology.Triangles, 0);
meshes[i].bounds = new Bounds(Vector3.zero, Vector3.one * 100.0f);
}
return meshes;
}
public static float GetTimeValue()
{
uint interval = 100000;
uint milli_time = (uint)(Time.time * 1000);
float value = milli_time % interval / (float)interval;
return Mathf.Sin(value * TWO_PI) * 0.5f + 0.5f; // continuous sin value
}
public static void Release(ref ComputeBuffer buffer)
{
if (buffer != null)
buffer.Release();
buffer = null;
}
static List<string> skip_camera_names = null;
public static bool SkipCamera(string name)
{
if (skip_camera_names == null)
skip_camera_names = new List<string>() { "Preview Camera", "Preview Scene Camera" };
return skip_camera_names.Contains(name);
}
public static IEnumerator GetRandomParticleData(int amount, List<Particle> result)
{
List<float> seeds = new List<float>();
seeds.AddRange(GetShuffleSeeds(amount));
List<float> factors = new List<float>();
factors.AddRange(GetShuffleSeeds(amount));
float radius = 2.0f;
const int mod = 1 << 13;
for (int i = 0; i < amount; i++)
{
float x = Random.Range(-1.0f, 1.0f);
float y = Random.Range(-1.0f, 1.0f);
float z = Random.Range(-1.0f, 1.0f);
float r = Mathf.Pow(Random.Range(0.0f, 1.0f), 1.0f / 2.2f) * radius;
Vector3 pos = (new Vector3(x, y, z)).normalized * r;
Particle p = new Particle();
p.position = pos;
p.seed = seeds[i];
p.color = new Vector4(1, 1, 1, factors[i]);
p.velocity = Vector3.zero;
p.life = Random.Range(1.0f, 0.0f);
var q = Random.rotation;
p.quat = new Vector4(q.x, q.y, q.z, q.w);
p.model_matrix = Matrix4x4.identity;
result.Add(p);
if (i % mod == 0)
{
yield return null;
}
}
}
public static IEnumerator GetReferencesParticleMesh(List<Mesh> referenceMeshes, int maxParticles, Mesh result)
{
int totalVertexCount = 0;
foreach (var m in referenceMeshes)
totalVertexCount += m.vertexCount;
int max_particles = maxParticles / referenceMeshes.Count;
int num_meshes = 1;
int ptc_per_mesh = max_particles / num_meshes;
//for (int i = 0; i < num_meshes; i++)
{
int i = 0;
var vertices = new List<Vector3>();
var normals = new List<Vector3>();
var colors = new List<Color>();
var uvs = new List<Vector2>();
var indices = new List<int>();
var custom_uvs = new List<Vector4>();
int begin_index = 0;
for (int j = 0; j < ptc_per_mesh; j++)
{
for (int k = 0; k < referenceMeshes.Count; k++)
{
int index = (i * ptc_per_mesh + j) * referenceMeshes.Count + k;
var mesh = referenceMeshes[k];
vertices.AddRange(mesh.vertices);
normals.AddRange(mesh.normals);
uvs.AddRange(mesh.uv);
if (mesh.colors.Length == mesh.vertices.Length)
{
colors.AddRange(mesh.colors);
}
else
{
for (int ci = 0; ci < mesh.vertices.Length; ci++)
colors.Add(Color.white);
}
foreach (var idx in mesh.GetIndices(0))
indices.Add(begin_index + idx);
for (int l = 0; l < mesh.vertexCount; l++)
custom_uvs.Add(new Vector4(mesh.uv[l].x, mesh.uv[l].y, index, k));
begin_index += mesh.vertexCount;
}
if (j % 1024 == 0)
{
yield return null;
}
}
//Mesh m = new Mesh();
if (vertices.Count > 65000)
result.indexFormat = UnityEngine.Rendering.IndexFormat.UInt32;
result.SetVertices(vertices);
result.SetNormals(normals);
if (colors.Count == vertices.Count)
{
result.SetColors(colors);
}
//result.SetUVs(0, uvs);
result.SetUVs(0, custom_uvs);
result.SetIndices(indices.ToArray(), referenceMeshes[0].GetTopology(0), 0);
result.bounds = new Bounds(Vector3.zero, Vector3.one * 100);
result.UploadMeshData(false);
//meshes.Add(m);
}
yield return null;
}
}
}

@ -1,13 +0,0 @@
fileFormatVersion: 2
guid: 5ff350006f0c04048b030f5f5ac6bfac
timeCreated: 1513318561
licenseType: Free
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 970a2e35ee37f9b4480cfac047390d99
folderAsset: yes
timeCreated: 1513318177
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 6ad29c6507346be46b99b7c01f9bc02a
folderAsset: yes
timeCreated: 1513318177
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,44 +0,0 @@
#ifndef __COLOR_CONVERT__
#define __COLOR_CONVERT__
float3 rgb2hsv(float3 c)
{
float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g));
float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return float3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
float3 rgb2hsv(float r, float g, float b) { return rgb2hsv(float3(r, g, b)); }
float3 hsv2rgb(float3 c)
{
float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
float3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * lerp(K.xxx, saturate(p - K.xxx), c.y);
}
float3 hsv2rgb(float h, float s, float v) { return hsv2rgb(float3(h, s, v)); }
float3 rgb2yuv(float3 c)
{
float Y = 0.2989 * c.r + 0.5866 * c.g + 0.1145 * c.b;
float Cr = -0.169 * c.r - 0.331 * c.g + 0.5 * c.b + 0.5;
float Cb = 0.5 * c.r - 0.419 * c.g - 0.081 * c.b + 0.5;
return float3(Y, Cr, Cb);
}
float3 yuv2rgb(float3 c)
{
float R = c.x + 1.13983 * (c.z - 0.5);
float G = c.x - 0.39465 * (c.y - 0.5) - 0.5806 * (c.z - 0.5);
float B = c.x + 2.03211 * (c.y - 0.5);
return float3(R, G, B);
}
#endif // __COLOR_CONVERT__

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: e118d759cc2956348825500066cc4c47
timeCreated: 1513318177
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,17 +0,0 @@
#ifndef __ULTRACOMBOS_DEFINES__
#define __ULTRACOMBOS_DEFINES__
#define WORK_GROUP_SIZE 512
struct Particle
{
float3 position;
float seed;
float4 color;
float3 velocity;
float life;
float4 quat;
float4x4 model_matrix;
};
#endif // __ULTRACOMBOS_DEFINES__

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 8aa45de43ecc31d4e9499b18d3d3d589
timeCreated: 1513318177
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,231 +0,0 @@
#ifndef __MATH__
#define __MATH__
#define FLT_EPSILON 1.192092896e-07
float ofMap(float value, float inputMin, float inputMax, float outputMin, float outputMax, int bClamp)
{
if (abs(inputMin - inputMax) < FLT_EPSILON) {
return outputMin;
}
else {
float outVal = ((value - inputMin) / (inputMax - inputMin) * (outputMax - outputMin) + outputMin);
if (bClamp > 0) {
if (outputMax < outputMin) {
if (outVal < outputMax) outVal = outputMax;
else if (outVal > outputMin) outVal = outputMin;
}
else {
if (outVal > outputMax) outVal = outputMax;
else if (outVal < outputMin) outVal = outputMin;
}
}
return outVal;
}
}
float2 ofMap(float2 value, float2 inputMin, float2 inputMax, float2 outputMin, float2 outputMax, int bClamp)
{
float x = ofMap(value.x, inputMin.x, inputMax.x, outputMin.x, outputMax.x, bClamp);
float y = ofMap(value.y, inputMin.y, inputMax.y, outputMin.y, outputMax.y, bClamp);
return float2(x, y);
}
float3 ofMap(float3 value, float3 inputMin, float3 inputMax, float3 outputMin, float3 outputMax, int bClamp)
{
float x = ofMap(value.x, inputMin.x, inputMax.x, outputMin.x, outputMax.x, bClamp);
float y = ofMap(value.y, inputMin.y, inputMax.y, outputMin.y, outputMax.y, bClamp);
float z = ofMap(value.z, inputMin.z, inputMax.z, outputMin.z, outputMax.z, bClamp);
return float3(x, y, z);
}
float2x2 RotationMatrix(float a)
{
float2x2 rot = { cos(a), -sin(a), sin(a), cos(a) };
return rot;
}
// implement from Rodrigues rotation formula
float3x3 RotationMatrix(float3 from, float3 to)
{
float3 a = normalize(from);
float3 b = normalize(to);
float3 v = cross(a, b);
float s = length(v);
float c = dot(a, b);
float3x3 W = { 0, -v.z, v.y, v.z, 0, -v.x, -v.y, v.x, 0 };
float3x3 I = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
float3x3 R = I + W * s + W * W * (1.0f - c);
//float theta = acos( dot(a, b) );
//float3x3 R = I + W * sin(theta) + W * W * (1.0f - cos(theta));
return R;
}
float Rand(float2 co)
{
return frac(sin(dot(co.xy, float2(12.9898, 78.233))) * 43758.5453);
}
float4 MakeQuaternion(float pitch, float roll, float yaw)
{
float4 q;
float t0 = cos(yaw * 0.5f);
float t1 = sin(yaw * 0.5f);
float t2 = cos(roll * 0.5f);
float t3 = sin(roll * 0.5f);
float t4 = cos(pitch * 0.5f);
float t5 = sin(pitch * 0.5f);
q.w = t0 * t2 * t4 + t1 * t3 * t5;
q.x = t0 * t3 * t4 - t1 * t2 * t5;
q.y = t0 * t2 * t5 + t1 * t3 * t4;
q.z = t1 * t2 * t4 - t0 * t3 * t5;
return q;
}
// Quaternion
float4 quat_from_axis_angle(float3 axis, float angle)
{
float4 qr;
float half_angle = (angle * 0.5);// *3.14159 / 180.0;
qr.x = axis.x * sin(half_angle);
qr.y = axis.y * sin(half_angle);
qr.z = axis.z * sin(half_angle);
qr.w = cos(half_angle);
return qr;
}
float4 quat_conj(float4 q)
{
return float4(-q.x, -q.y, -q.z, q.w);
}
float4 quat_mult(float4 q1, float4 q2)
{
float4 qr;
qr.x = (q1.w * q2.x) + (q1.x * q2.w) + (q1.y * q2.z) - (q1.z * q2.y);
qr.y = (q1.w * q2.y) - (q1.x * q2.z) + (q1.y * q2.w) + (q1.z * q2.x);
qr.z = (q1.w * q2.z) + (q1.x * q2.y) - (q1.y * q2.x) + (q1.z * q2.w);
qr.w = (q1.w * q2.w) - (q1.x * q2.x) - (q1.y * q2.y) - (q1.z * q2.z);
return qr;
}
float3 rotate_vertex_position(float3 position, float4 quat)
{
return position + 2.0f * cross(quat.xyz, cross(quat.xyz, position) + quat.w * position);
}
float3 rotate_vertex_position(float3 position, float3 axis, float angle)
{
float4 q = quat_from_axis_angle(axis, angle);
return rotate_vertex_position(position, q);
//float4 v = position.xyz;
//return v + 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);
}
void calc_tangents(float3 vertices[4], float3 normals[4], float2 texcoords[4], out float4 tangents[4])
{
//float4 tangents[3];
float3 tan1[4];
float3 tan2[4];
int i;
for (i = 0; i < 4; i++)
{
tan1[i] = tan2[i] = float3(0, 0, 0);
}
for (i = 0; i < 4 - 2; i++)
{
int i1 = 0;
int i2 = i + 1;
int i3 = i + 2;
float3 v1 = vertices[i1];
float3 v2 = vertices[i2];
float3 v3 = vertices[i3];
float2 w1 = texcoords[i1];
float2 w2 = texcoords[i2];
float2 w3 = texcoords[i3];
float x1 = v2.x - v1.x;
float x2 = v3.x - v1.x;
float y1 = v2.y - v1.y;
float y2 = v3.y - v1.y;
float z1 = v2.z - v1.z;
float z2 = v3.z - v1.z;
float s1 = w2.x - w1.x;
float s2 = w3.x - w1.x;
float t1 = w2.y - w1.y;
float t2 = w3.y - w1.y;
float r = 1.0f / (s1 * t2 - s2 * t1);
float3 sdir = float3((t2 * x1 - t1 * x2) * r, (t2 * y1 - t1 * y2) * r, (t2 * z1 - t1 * z2) * r);
float3 tdir = float3((s1 * x2 - s2 * x1) * r, (s1 * y2 - s2 * y1) * r, (s1 * z2 - s2 * z1) * r);
tan1[i1] += sdir;
tan1[i2] += sdir;
tan1[i3] += sdir;
tan2[i1] += tdir;
tan2[i2] += tdir;
tan2[i3] += tdir;
}
for (i = 0; i < 4; i++)
{
float3 n = normals[i];
float3 t = tan1[i];
tangents[i].xyz = tan1[i];
tangents[i].w = (dot(cross(n, t), tan2[i]) < 0.0f) ? -1.0f : 1.0f;
}
}
float4x4 quat_to_rotation_matrix(float4 q)
{
return float4x4(
1.0 - 2.0*q.y*q.y - 2.0*q.z*q.z, 2.0*q.x*q.y - 2.0*q.z*q.w, 2.0*q.x*q.z + 2.0*q.y*q.w, 0.0,
2.0*q.x*q.y + 2.0*q.z*q.w, 1.0 - 2.0*q.x*q.x - 2.0*q.z*q.z, 2.0*q.y*q.z - 2.0*q.x*q.w, 0.0,
2.0*q.x*q.z - 2.0*q.y*q.w, 2.0*q.y*q.z + 2.0*q.x*q.w, 1.0 - 2.0*q.x*q.x - 2.0*q.y*q.y, 0.0,
0.0, 0.0, 0.0, 1.0);
}
float4x4 make_translation_matrix(float3 trans)
{
return float4x4(
1, 0, 0, trans.x,
0, 1, 0, trans.y,
0, 0, 1, trans.z,
0, 0, 0, 1
);
}
float4x4 make_scaling_matrix(float s)
{
return float4x4(
s, 0, 0, 0,
0, s, 0, 0,
0, 0, s, 0,
0, 0, 0, 1
);
}
const float4x4 identity_matrix = {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
};
half3 cosine_gradient(half3 A, half3 B, half3 C, half3 D, float t)
{
return saturate(A + B * cos(C * t + D));
}
#endif // __MATH__

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: b75108e9e753c044eae1762becba5b2f
timeCreated: 1513318177
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,42 +0,0 @@
#pragma kernel CSMain
#include "UnityCG.cginc"
#define WORK_GROUP_SIZE 1024
struct Vertex
{
float3 position;
float3 normal;
//float4 color;
//float2 uv;
//float2 uv2;
float4 tangent;
};
CBUFFER_START(Variables)
int index;
int count;
float4x4 model_matrix;
CBUFFER_END
RWStructuredBuffer<float4> home_buffer;
RWStructuredBuffer<float4> home_velocity_buffer;
RWStructuredBuffer<Vertex> vertex_buffer;
[numthreads(WORK_GROUP_SIZE, 1, 1)]
void CSMain(uint3 id : SV_DispatchThreadID)
{
uint offset = (uint)index;
if (id.x < offset || id.x >= offset + count)
return;
float4 pos = float4(vertex_buffer[id.x - offset].position, 1);
pos = mul(model_matrix, pos);
float3 last_pos = home_buffer[id.x].xyz;
float3 vel = length(last_pos) == 0.0f ? float3(0, 0, 0) : pos.xyz - last_pos;
home_velocity_buffer[id.x] = float4(vel, 1.0f);
home_buffer[id.x] = pos;
}

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: fa89158a0f676c9479248d6a1b0cee36
ComputeShaderImporter:
externalObjects: {}
currentAPIMask: 4
userData:
assetBundleName:
assetBundleVariant:

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: c968022c15bd5254385140a51e15c802
folderAsset: yes
timeCreated: 1513318177
licenseType: Free
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

@ -1,55 +0,0 @@
#ifndef __CELLULAE_2D__
#define __CELLULAE_2D__
#include "noiseMath.cginc"
// Cellular noise ("Worley noise") in 2D in GLSL.
// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
// This code is released under the conditions of the MIT license.
// See LICENSE file for details.
// https://github.com/stegu/webgl-noise
// Cellular noise, returning F1 and F2 in a vec2.
// Standard 3x3 search window for good F1 and F2 values
float2 cellular(float2 P) {
const float K = 0.142857142857; // 1/7
const float Ko = 0.428571428571; // 3/7
const float jitter = 1.0; // Less gives more regular pattern
float2 Pi = mod289(floor(P));
float2 Pf = frac(P);
float3 oi = float3(-1.0, 0.0, 1.0);
float3 of = float3(-0.5, 0.5, 1.5);
float3 px = permute(Pi.x + oi);
float3 p = permute(px.x + Pi.y + oi); // p11, p12, p13
float3 ox = fract(p*K) - Ko;
float3 oy = mod7(floor(p*K))*K - Ko;
float3 dx = Pf.x + 0.5 + jitter*ox;
float3 dy = Pf.y - of + jitter*oy;
float3 d1 = dx * dx + dy * dy; // d11, d12 and d13, squared
p = permute(px.y + Pi.y + oi); // p21, p22, p23
ox = fract(p*K) - Ko;
oy = mod7(floor(p*K))*K - Ko;
dx = Pf.x - 0.5 + jitter*ox;
dy = Pf.y - of + jitter*oy;
float3 d2 = dx * dx + dy * dy; // d21, d22 and d23, squared
p = permute(px.z + Pi.y + oi); // p31, p32, p33
ox = frac(p*K) - Ko;
oy = mod7(floor(p*K))*K - Ko;
dx = Pf.x - 1.5 + jitter*ox;
dy = Pf.y - of + jitter*oy;
float3 d3 = dx * dx + dy * dy; // d31, d32 and d33, squared
// Sort out the two smallest distances (F1, F2)
float3 d1a = min(d1, d2);
d2 = max(d1, d2); // Swap to keep candidates for F2
d2 = min(d2, d3); // neither F1 nor F2 are now in d3
d1 = min(d1a, d2); // F1 is now in d1
d2 = max(d1a, d2); // Swap to keep candidates for F2
d1.xy = (d1.x < d1.y) ? d1.xy : d1.yx; // Swap if smaller
d1.xz = (d1.x < d1.z) ? d1.xz : d1.zx; // F1 is in d1.x
d1.yz = min(d1.yz, d2.yz); // F2 is now not in d2.yz
d1.y = min(d1.y, d1.z); // nor in d1.z
d1.y = min(d1.y, d2.x); // F2 is in d1.y, we're done.
return sqrt(d1.xy);
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: dabc3d39937cf8b44b436eb48779d989
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,50 +0,0 @@
#ifndef __CELLULAE_2X2__
#define __CELLULAE_2X2__
#include "noiseMath.cginc"
// Cellular noise ("Worley noise") in 2D in GLSL.
// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
// This code is released under the conditions of the MIT license.
// See LICENSE file for details.
// https://github.com/stegu/webgl-noise
// Cellular noise, returning F1 and F2 in a vec2.
// Speeded up by using 2x2 search window instead of 3x3,
// at the expense of some strong pattern artifacts.
// F2 is often wrong and has sharp discontinuities.
// If you need a smooth F2, use the slower 3x3 version.
// F1 is sometimes wrong, too, but OK for most purposes.
float2 cellular2x2(float2 P) {
const float K = 0.142857142857; // 1/7
const float K2 = 0.0714285714285; // K/2
const float jitter = 0.8; // jitter 1.0 makes F1 wrong more often
float2 Pi = mod289(floor(P));
float2 Pf = fract(P);
float4 Pfx = Pf.x + vec4(-0.5, -1.5, -0.5, -1.5);
float4 Pfy = Pf.y + vec4(-0.5, -0.5, -1.5, -1.5);
float4 p = permute(Pi.x + vec4(0.0, 1.0, 0.0, 1.0));
p = permute(p + Pi.y + vec4(0.0, 0.0, 1.0, 1.0));
float4 ox = mod7(p)*K+K2;
float4 oy = mod7(floor(p*K))*K+K2;
float4 dx = Pfx + jitter*ox;
float4 dy = Pfy + jitter*oy;
float4 d = dx * dx + dy * dy; // d11, d12, d21 and d22, squared
// Sort out the two smallest distances
#if false
// Cheat and pick only F1
d.xy = min(d.xy, d.zw);
d.x = min(d.x, d.y);
return vec2(sqrt(d.x)); // F1 duplicated, F2 not computed
#else
// Do it right and find both F1 and F2
d.xy = (d.x < d.y) ? d.xy : d.yx; // Swap if smaller
d.xz = (d.x < d.z) ? d.xz : d.zx;
d.xw = (d.x < d.w) ? d.xw : d.wx;
d.y = min(d.y, d.z);
d.y = min(d.y, d.w);
return sqrt(d.xy);
#endif
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 286f253b43aa8bc4cbe7c7d3bc1e6500
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,67 +0,0 @@
#ifndef __CELLULAE_2X2X2__
#define __CELLULAE_2X2X2__
#include "noiseMath.cginc"
// Cellular noise ("Worley noise") in 3D in GLSL.
// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
// This code is released under the conditions of the MIT license.
// See LICENSE file for details.
// https://github.com/stegu/webgl-noise
// Cellular noise, returning F1 and F2 in a vec2.
// Speeded up by using 2x2x2 search window instead of 3x3x3,
// at the expense of some pattern artifacts.
// F2 is often wrong and has sharp discontinuities.
// If you need a good F2, use the slower 3x3x3 version.
float2 cellular2x2x2(float3 P) {
const float K = 0.142857142857; // 1/7
const float Ko = 0.428571428571; // 1/2-K/2
const float K2 = 0.020408163265306; // 1/(7*7)
const float Kz = 0.166666666667; // 1/6
const float Kzo = 0.416666666667; // 1/2-1/6*2
const float jitter = 0.8; // smaller jitter gives less errors in F2
float3 Pi = mod289(floor(P));
float3 Pf = fract(P);
float4 Pfx = Pf.x + vec4(0.0, -1.0, 0.0, -1.0);
float4 Pfy = Pf.y + vec4(0.0, 0.0, -1.0, -1.0);
float4 p = permute(Pi.x + vec4(0.0, 1.0, 0.0, 1.0));
p = permute(p + Pi.y + vec4(0.0, 0.0, 1.0, 1.0));
float4 p1 = permute(p + Pi.z); // z+0
float4 p2 = permute(p + Pi.z + vec4(1.0)); // z+1
float4 ox1 = frac(p1*K) - Ko;
float4 oy1 = mod7(floor(p1*K))*K - Ko;
float4 oz1 = floor(p1*K2)*Kz - Kzo; // p1 < 289 guaranteed
float4 ox2 = fract(p2*K) - Ko;
float4 oy2 = mod7(floor(p2*K))*K - Ko;
float4 oz2 = floor(p2*K2)*Kz - Kzo;
float4 dx1 = Pfx + jitter*ox1;
float4 dy1 = Pfy + jitter*oy1;
float4 dz1 = Pf.z + jitter*oz1;
float4 dx2 = Pfx + jitter*ox2;
float4 dy2 = Pfy + jitter*oy2;
float4 dz2 = Pf.z - 1.0 + jitter*oz2;
float4 d1 = dx1 * dx1 + dy1 * dy1 + dz1 * dz1; // z+0
float4 d2 = dx2 * dx2 + dy2 * dy2 + dz2 * dz2; // z+1
// Sort out the two smallest distances (F1, F2)
#if false
// Cheat and sort out only F1
d1 = min(d1, d2);
d1.xy = min(d1.xy, d1.wz);
d1.x = min(d1.x, d1.y);
return vec2(sqrt(d1.x));
#else
// Do it right and sort out both F1 and F2
vec4 d = min(d1,d2); // F1 is now in d
d2 = max(d1,d2); // Make sure we keep all candidates for F2
d.xy = (d.x < d.y) ? d.xy : d.yx; // Swap smallest to d.x
d.xz = (d.x < d.z) ? d.xz : d.zx;
d.xw = (d.x < d.w) ? d.xw : d.wx; // F1 is now in d.x
d.yzw = min(d.yzw, d2.yzw); // F2 now not in d2.yzw
d.y = min(d.y, d.z); // nor in d.z
d.y = min(d.y, d.w); // nor in d.w
d.y = min(d.y, d2.x); // F2 is now in d.y
return sqrt(d.xy); // F1 and F2
#endif
}

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 4990a2164abda5d4b99a145d3253bf9f
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,177 +0,0 @@
#ifndef __CELLULAE_3D__
#define __CELLULAE_3D__
#include "noiseMath.cginc"
// Cellular noise ("Worley noise") in 3D in GLSL.
// Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
// This code is released under the conditions of the MIT license.
// See LICENSE file for details.
// https://github.com/stegu/webgl-noise
// Cellular noise, returning F1 and F2 in a vec2.
// 3x3x3 search region for good F2 everywhere, but a lot
// slower than the 2x2x2 version.
// The code below is a bit scary even to its author,
// but it has at least half decent performance on a
// modern GPU. In any case, it beats any software
// implementation of Worley noise hands down.
float2 cellular(float3 P) {
const float K = 0.142857142857; // 1/7
const float Ko = 0.428571428571; // 1/2-K/2
const float K2 = 0.020408163265306; // 1/(7*7)
const float Kz = 0.166666666667; // 1/6
const float Kzo = 0.416666666667; // 1/2-1/6*2
const float jitter = 1.0; // smaller jitter gives more regular pattern
float3 Pi = mod289(floor(P));
float3 Pf = frac(P) - 0.5;
float3 Pfx = Pf.x + float3(1.0, 0.0, -1.0);
float3 Pfy = Pf.y + float3(1.0, 0.0, -1.0);
float3 Pfz = Pf.z + float3(1.0, 0.0, -1.0);
float3 p = permute(Pi.x + float3(-1.0, 0.0, 1.0));
float3 p1 = permute(p + Pi.y - 1.0);
float3 p2 = permute(p + Pi.y);
float3 p3 = permute(p + Pi.y + 1.0);
float3 p11 = permute(p1 + Pi.z - 1.0);
float3 p12 = permute(p1 + Pi.z);
float3 p13 = permute(p1 + Pi.z + 1.0);
float3 p21 = permute(p2 + Pi.z - 1.0);
float3 p22 = permute(p2 + Pi.z);
float3 p23 = permute(p2 + Pi.z + 1.0);
float3 p31 = permute(p3 + Pi.z - 1.0);
float3 p32 = permute(p3 + Pi.z);
float3 p33 = permute(p3 + Pi.z + 1.0);
float3 ox11 = frac(p11*K) - Ko;
float3 oy11 = mod7(floor(p11*K))*K - Ko;
float3 oz11 = floor(p11*K2)*Kz - Kzo; // p11 < 289 guaranteed
float3 ox12 = frac(p12*K) - Ko;
float3 oy12 = mod7(floor(p12*K))*K - Ko;
float3 oz12 = floor(p12*K2)*Kz - Kzo;
float3 ox13 = frac(p13*K) - Ko;
float3 oy13 = mod7(floor(p13*K))*K - Ko;
float3 oz13 = floor(p13*K2)*Kz - Kzo;
float3 ox21 = frac(p21*K) - Ko;
float3 oy21 = mod7(floor(p21*K))*K - Ko;
float3 oz21 = floor(p21*K2)*Kz - Kzo;
float3 ox22 = frac(p22*K) - Ko;
float3 oy22 = mod7(floor(p22*K))*K - Ko;
float3 oz22 = floor(p22*K2)*Kz - Kzo;
float3 ox23 = frac(p23*K) - Ko;
float3 oy23 = mod7(floor(p23*K))*K - Ko;
float3 oz23 = floor(p23*K2)*Kz - Kzo;
float3 ox31 = frac(p31*K) - Ko;
float3 oy31 = mod7(floor(p31*K))*K - Ko;
float3 oz31 = floor(p31*K2)*Kz - Kzo;
float3 ox32 = frac(p32*K) - Ko;
float3 oy32 = mod7(floor(p32*K))*K - Ko;
float3 oz32 = floor(p32*K2)*Kz - Kzo;
float3 ox33 = frac(p33*K) - Ko;
float3 oy33 = mod7(floor(p33*K))*K - Ko;
float3 oz33 = floor(p33*K2)*Kz - Kzo;
float3 dx11 = Pfx + jitter*ox11;
float3 dy11 = Pfy.x + jitter*oy11;
float3 dz11 = Pfz.x + jitter*oz11;
float3 dx12 = Pfx + jitter*ox12;
float3 dy12 = Pfy.x + jitter*oy12;
float3 dz12 = Pfz.y + jitter*oz12;
float3 dx13 = Pfx + jitter*ox13;
float3 dy13 = Pfy.x + jitter*oy13;
float3 dz13 = Pfz.z + jitter*oz13;
float3 dx21 = Pfx + jitter*ox21;
float3 dy21 = Pfy.y + jitter*oy21;
float3 dz21 = Pfz.x + jitter*oz21;
float3 dx22 = Pfx + jitter*ox22;
float3 dy22 = Pfy.y + jitter*oy22;
float3 dz22 = Pfz.y + jitter*oz22;
float3 dx23 = Pfx + jitter*ox23;
float3 dy23 = Pfy.y + jitter*oy23;
float3 dz23 = Pfz.z + jitter*oz23;
float3 dx31 = Pfx + jitter*ox31;
float3 dy31 = Pfy.z + jitter*oy31;
float3 dz31 = Pfz.x + jitter*oz31;
float3 dx32 = Pfx + jitter*ox32;
float3 dy32 = Pfy.z + jitter*oy32;
float3 dz32 = Pfz.y + jitter*oz32;
float3 dx33 = Pfx + jitter*ox33;
float3 dy33 = Pfy.z + jitter*oy33;
float3 dz33 = Pfz.z + jitter*oz33;
float3 d11 = dx11 * dx11 + dy11 * dy11 + dz11 * dz11;
float3 d12 = dx12 * dx12 + dy12 * dy12 + dz12 * dz12;
float3 d13 = dx13 * dx13 + dy13 * dy13 + dz13 * dz13;
float3 d21 = dx21 * dx21 + dy21 * dy21 + dz21 * dz21;
float3 d22 = dx22 * dx22 + dy22 * dy22 + dz22 * dz22;
float3 d23 = dx23 * dx23 + dy23 * dy23 + dz23 * dz23;
float3 d31 = dx31 * dx31 + dy31 * dy31 + dz31 * dz31;
float3 d32 = dx32 * dx32 + dy32 * dy32 + dz32 * dz32;
float3 d33 = dx33 * dx33 + dy33 * dy33 + dz33 * dz33;
// Sort out the two smallest distances (F1, F2)
#if false
// Cheat and sort out only F1
float3 d1 = min(min(d11,d12), d13);
float3 d2 = min(min(d21,d22), d23);
float3 d3 = min(min(d31,d32), d33);
float3 d = min(min(d1,d2), d3);
d.x = min(min(d.x,d.y),d.z);
return float2(sqrt(d.x)); // F1 duplicated, no F2 computed
#else
// Do it right and sort out both F1 and F2
float3 d1a = min(d11, d12);
d12 = max(d11, d12);
d11 = min(d1a, d13); // Smallest now not in d12 or d13
d13 = max(d1a, d13);
d12 = min(d12, d13); // 2nd smallest now not in d13
float3 d2a = min(d21, d22);
d22 = max(d21, d22);
d21 = min(d2a, d23); // Smallest now not in d22 or d23
d23 = max(d2a, d23);
d22 = min(d22, d23); // 2nd smallest now not in d23
float3 d3a = min(d31, d32);
d32 = max(d31, d32);
d31 = min(d3a, d33); // Smallest now not in d32 or d33
d33 = max(d3a, d33);
d32 = min(d32, d33); // 2nd smallest now not in d33
float3 da = min(d11, d21);
d21 = max(d11, d21);
d11 = min(da, d31); // Smallest now in d11
d31 = max(da, d31); // 2nd smallest now not in d31
d11.xy = (d11.x < d11.y) ? d11.xy : d11.yx;
d11.xz = (d11.x < d11.z) ? d11.xz : d11.zx; // d11.x now smallest
d12 = min(d12, d21); // 2nd smallest now not in d21
d12 = min(d12, d22); // nor in d22
d12 = min(d12, d31); // nor in d31
d12 = min(d12, d32); // nor in d32
d11.yz = min(d11.yz,d12.xy); // nor in d12.yz
d11.y = min(d11.y,d12.z); // Only two more to go
d11.y = min(d11.y,d11.z); // Done! (Phew!)
return sqrt(d11.xy); // F1, F2
#endif
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 35eda6f8be41bec4e86fe00e2ced1c0e
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,101 +0,0 @@
#ifndef __CLASSIC_NOISE_2D__
#define __CLASSIC_NOISE_2D__
#include "noiseMath.cginc"
//
// GLSL textureless classic 2D noise "cnoise",
// with an RSL-style periodic variant "pnoise".
// Author: Stefan Gustavson (stefan.gustavson@liu.se)
// Version: 2011-08-22
//
// Many thanks to Ian McEwan of Ashima Arts for the
// ideas for permutation and gradient selection.
//
// Copyright (c) 2011 Stefan Gustavson. All rights reserved.
// Distributed under the MIT license. See LICENSE file.
// https://github.com/stegu/webgl-noise
//
// Classic Perlin noise
float cnoise(float2 P)
{
float4 Pi = floor(P.xyxy) + float4(0.0, 0.0, 1.0, 1.0);
float4 Pf = frac(P.xyxy) - float4(0.0, 0.0, 1.0, 1.0);
Pi = mod289(Pi); // To avoid truncation effects in permutation
float4 ix = Pi.xzxz;
float4 iy = Pi.yyww;
float4 fx = Pf.xzxz;
float4 fy = Pf.yyww;
float4 i = permute(permute(ix) + iy);
float4 gx = frac(i * (1.0 / 41.0)) * 2.0 - 1.0 ;
float4 gy = abs(gx) - 0.5 ;
float4 tx = floor(gx + 0.5);
gx = gx - tx;
float2 g00 = float2(gx.x,gy.x);
float2 g10 = float2(gx.y,gy.y);
float2 g01 = float2(gx.z,gy.z);
float2 g11 = float2(gx.w,gy.w);
float4 norm = taylorInvSqrt(float4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));
g00 *= norm.x;
g01 *= norm.y;
g10 *= norm.z;
g11 *= norm.w;
float n00 = dot(g00, vec2(fx.x, fy.x));
float n10 = dot(g10, vec2(fx.y, fy.y));
float n01 = dot(g01, vec2(fx.z, fy.z));
float n11 = dot(g11, vec2(fx.w, fy.w));
float2 fade_xy = fade(Pf.xy);
float2 n_x = lerp(float2(n00, n01), float2(n10, n11), fade_xy.x);
float n_xy = lerp(n_x.x, n_x.y, fade_xy.y);
return 2.3 * n_xy;
}
// Classic Perlin noise, periodic variant
float pnoise(float2 P, float2 rep)
{
float4 Pi = floor(P.xyxy) + float4(0.0, 0.0, 1.0, 1.0);
float4 Pf = frac(P.xyxy) - float4(0.0, 0.0, 1.0, 1.0);
Pi = mod(Pi, rep.xyxy); // To create noise with explicit period
Pi = mod289(Pi); // To avoid truncation effects in permutation
float4 ix = Pi.xzxz;
float4 iy = Pi.yyww;
float4 fx = Pf.xzxz;
float4 fy = Pf.yyww;
float4 i = permute(permute(ix) + iy);
float4 gx = frac(i * (1.0 / 41.0)) * 2.0 - 1.0 ;
float4 gy = abs(gx) - 0.5 ;
float4 tx = floor(gx + 0.5);
gx = gx - tx;
float2 g00 = float2(gx.x,gy.x);
float2 g10 = float2(gx.y,gy.y);
float2 g01 = float2(gx.z,gy.z);
float2 g11 = float2(gx.w,gy.w);
float4 norm = taylorInvSqrt(float4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));
g00 *= norm.x;
g01 *= norm.y;
g10 *= norm.z;
g11 *= norm.w;
float n00 = dot(g00, float2(fx.x, fy.x));
float n10 = dot(g10, float2(fx.y, fy.y));
float n01 = dot(g01, float2(fx.z, fy.z));
float n11 = dot(g11, float2(fx.w, fy.w));
float2 fade_xy = fade(Pf.xy);
float2 n_x = lerp(vec2(n00, n01), float2(n10, n11), fade_xy.x);
float n_xy = lerp(n_x.x, n_x.y, fade_xy.y);
return 2.3 * n_xy;
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 686e838ffd1bb9f4e8f2470120cfcdd1
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,160 +0,0 @@
#ifndef __CLASSIC_NOISE_3D__
#define __CLASSIC_NOISE_3D__
#include "noiseMath.cginc"
//
// GLSL textureless classic 3D noise "cnoise",
// with an RSL-style periodic variant "pnoise".
// Author: Stefan Gustavson (stefan.gustavson@liu.se)
// Version: 2011-10-11
//
// Many thanks to Ian McEwan of Ashima Arts for the
// ideas for permutation and gradient selection.
//
// Copyright (c) 2011 Stefan Gustavson. All rights reserved.
// Distributed under the MIT license. See LICENSE file.
// https://github.com/stegu/webgl-noise
//
// Classic Perlin noise
float cnoise(float3 P)
{
float3 Pi0 = floor(P); // Integer part for indexing
float3 Pi1 = Pi0 + float3(1.0); // Integer part + 1
Pi0 = mod289(Pi0);
Pi1 = mod289(Pi1);
float3 Pf0 = frac(P); // Fractional part for interpolation
float3 Pf1 = Pf0 - float3(1.0); // Fractional part - 1.0
float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
float4 iy = float4(Pi0.yy, Pi1.yy);
float4 iz0 = Pi0.zzzz;
float4 iz1 = Pi1.zzzz;
float4 ixy = permute(permute(ix) + iy);
float4 ixy0 = permute(ixy + iz0);
float4 ixy1 = permute(ixy + iz1);
float4 gx0 = ixy0 * (1.0 / 7.0);
float4 gy0 = frac(floor(gx0) * (1.0 / 7.0)) - 0.5;
gx0 = frac(gx0);
float4 gz0 = float4(0.5) - abs(gx0) - abs(gy0);
float4 sz0 = step(gz0, float4(0.0));
gx0 -= sz0 * (step(0.0, gx0) - 0.5);
gy0 -= sz0 * (step(0.0, gy0) - 0.5);
float4 gx1 = ixy1 * (1.0 / 7.0);
float4 gy1 = frac(floor(gx1) * (1.0 / 7.0)) - 0.5;
gx1 = frac(gx1);
float4 gz1 = float4(0.5) - abs(gx1) - abs(gy1);
float4 sz1 = step(gz1, float4(0.0));
gx1 -= sz1 * (step(0.0, gx1) - 0.5);
gy1 -= sz1 * (step(0.0, gy1) - 0.5);
float3 g000 = float3(gx0.x,gy0.x,gz0.x);
float3 g100 = float3(gx0.y,gy0.y,gz0.y);
float3 g010 = float3(gx0.z,gy0.z,gz0.z);
float3 g110 = float3(gx0.w,gy0.w,gz0.w);
float3 g001 = float3(gx1.x,gy1.x,gz1.x);
float3 g101 = float3(gx1.y,gy1.y,gz1.y);
float3 g011 = float3(gx1.z,gy1.z,gz1.z);
float3 g111 = float3(gx1.w,gy1.w,gz1.w);
float4 norm0 = taylorInvSqrt(float4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
g000 *= norm0.x;
g010 *= norm0.y;
g100 *= norm0.z;
g110 *= norm0.w;
float4 norm1 = taylorInvSqrt(float4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
g001 *= norm1.x;
g011 *= norm1.y;
g101 *= norm1.z;
g111 *= norm1.w;
float n000 = dot(g000, Pf0);
float n100 = dot(g100, float3(Pf1.x, Pf0.yz));
float n010 = dot(g010, float3(Pf0.x, Pf1.y, Pf0.z));
float n110 = dot(g110, float3(Pf1.xy, Pf0.z));
float n001 = dot(g001, float3(Pf0.xy, Pf1.z));
float n101 = dot(g101, float3(Pf1.x, Pf0.y, Pf1.z));
float n011 = dot(g011, float3(Pf0.x, Pf1.yz));
float n111 = dot(g111, Pf1);
float3 fade_xyz = fade(Pf0);
float4 n_z = mix(float4(n000, n100, n010, n110), float4(n001, n101, n011, n111), fade_xyz.z);
float2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);
float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
return 2.2 * n_xyz;
}
// Classic Perlin noise, periodic variant
float pnoise(float3 P, float3 rep)
{
float3 Pi0 = mod(floor(P), rep); // Integer part, modulo period
float3 Pi1 = mod(Pi0 + float3(1.0), rep); // Integer part + 1, mod period
Pi0 = mod289(Pi0);
Pi1 = mod289(Pi1);
float3 Pf0 = frac(P); // Fractional part for interpolation
float3 Pf1 = Pf0 - float3(1.0); // Fractional part - 1.0
float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
float4 iy = float4(Pi0.yy, Pi1.yy);
float4 iz0 = Pi0.zzzz;
float4 iz1 = Pi1.zzzz;
float4 ixy = permute(permute(ix) + iy);
float4 ixy0 = permute(ixy + iz0);
float4 ixy1 = permute(ixy + iz1);
float4 gx0 = ixy0 * (1.0 / 7.0);
float4 gy0 = frac(floor(gx0) * (1.0 / 7.0)) - 0.5;
gx0 = frac(gx0);
float4 gz0 = float4(0.5) - abs(gx0) - abs(gy0);
float4 sz0 = step(gz0, float4(0.0));
gx0 -= sz0 * (step(0.0, gx0) - 0.5);
gy0 -= sz0 * (step(0.0, gy0) - 0.5);
float4 gx1 = ixy1 * (1.0 / 7.0);
float4 gy1 = frac(floor(gx1) * (1.0 / 7.0)) - 0.5;
gx1 = frac(gx1);
float4 gz1 = float4(0.5) - abs(gx1) - abs(gy1);
float4 sz1 = step(gz1, float4(0.0));
gx1 -= sz1 * (step(0.0, gx1) - 0.5);
gy1 -= sz1 * (step(0.0, gy1) - 0.5);
float3 g000 = float3(gx0.x,gy0.x,gz0.x);
float3 g100 = float3(gx0.y,gy0.y,gz0.y);
float3 g010 = float3(gx0.z,gy0.z,gz0.z);
float3 g110 = float3(gx0.w,gy0.w,gz0.w);
float3 g001 = float3(gx1.x,gy1.x,gz1.x);
float3 g101 = float3(gx1.y,gy1.y,gz1.y);
float3 g011 = float3(gx1.z,gy1.z,gz1.z);
float3 g111 = float3(gx1.w,gy1.w,gz1.w);
float4 norm0 = taylorInvSqrt(float4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));
g000 *= norm0.x;
g010 *= norm0.y;
g100 *= norm0.z;
g110 *= norm0.w;
float4 norm1 = taylorInvSqrt(float4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));
g001 *= norm1.x;
g011 *= norm1.y;
g101 *= norm1.z;
g111 *= norm1.w;
float n000 = dot(g000, Pf0);
float n100 = dot(g100, float3(Pf1.x, Pf0.yz));
float n010 = dot(g010, float3(Pf0.x, Pf1.y, Pf0.z));
float n110 = dot(g110, float3(Pf1.xy, Pf0.z));
float n001 = dot(g001, float3(Pf0.xy, Pf1.z));
float n101 = dot(g101, float3(Pf1.x, Pf0.y, Pf1.z));
float n011 = dot(g011, float3(Pf0.x, Pf1.yz));
float n111 = dot(g111, Pf1);
float3 fade_xyz = fade(Pf0);
float4 n_z = mix(float4(n000, n100, n010, n110), float4(n001, n101, n011, n111), fade_xyz.z);
float2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);
float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);
return 2.2 * n_xyz;
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: d455bc260cbec6a47b350e56e5af7cf0
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,290 +0,0 @@
#ifndef __CLASSIC_NOISE_4D__
#define __CLASSIC_NOISE_4D__
#include "noiseMath.cginc"
//
// GLSL textureless classic 4D noise "cnoise",
// with an RSL-style periodic variant "pnoise".
// Author: Stefan Gustavson (stefan.gustavson@liu.se)
// Version: 2011-08-22
//
// Many thanks to Ian McEwan of Ashima Arts for the
// ideas for permutation and gradient selection.
//
// Copyright (c) 2011 Stefan Gustavson. All rights reserved.
// Distributed under the MIT license. See LICENSE file.
// https://github.com/stegu/webgl-noise
//
// Classic Perlin noise
float cnoise(float4 P)
{
float4 Pi0 = floor(P); // Integer part for indexing
float4 Pi1 = Pi0 + 1.0; // Integer part + 1
Pi0 = mod289(Pi0);
Pi1 = mod289(Pi1);
float4 Pf0 = frac(P); // Fractional part for interpolation
float4 Pf1 = Pf0 - 1.0; // Fractional part - 1.0
float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
float4 iy = float4(Pi0.yy, Pi1.yy);
float4 iz0 = float4(Pi0.zzzz);
float4 iz1 = float4(Pi1.zzzz);
float4 iw0 = float4(Pi0.wwww);
float4 iw1 = float4(Pi1.wwww);
float4 ixy = permute(permute(ix) + iy);
float4 ixy0 = permute(ixy + iz0);
float4 ixy1 = permute(ixy + iz1);
float4 ixy00 = permute(ixy0 + iw0);
float4 ixy01 = permute(ixy0 + iw1);
float4 ixy10 = permute(ixy1 + iw0);
float4 ixy11 = permute(ixy1 + iw1);
float4 gx00 = ixy00 * (1.0 / 7.0);
float4 gy00 = floor(gx00) * (1.0 / 7.0);
float4 gz00 = floor(gy00) * (1.0 / 6.0);
gx00 = frac(gx00) - 0.5;
gy00 = frac(gy00) - 0.5;
gz00 = frac(gz00) - 0.5;
float4 gw00 = float4(0.75) - abs(gx00) - abs(gy00) - abs(gz00);
float4 sw00 = step(gw00, float4(0.0));
gx00 -= sw00 * (step(0.0, gx00) - 0.5);
gy00 -= sw00 * (step(0.0, gy00) - 0.5);
float4 gx01 = ixy01 * (1.0 / 7.0);
float4 gy01 = floor(gx01) * (1.0 / 7.0);
float4 gz01 = floor(gy01) * (1.0 / 6.0);
gx01 = frac(gx01) - 0.5;
gy01 = frac(gy01) - 0.5;
gz01 = frac(gz01) - 0.5;
float4 gw01 = float4(0.75) - abs(gx01) - abs(gy01) - abs(gz01);
float4 sw01 = step(gw01, float4(0.0));
gx01 -= sw01 * (step(0.0, gx01) - 0.5);
gy01 -= sw01 * (step(0.0, gy01) - 0.5);
float4 gx10 = ixy10 * (1.0 / 7.0);
float4 gy10 = floor(gx10) * (1.0 / 7.0);
float4 gz10 = floor(gy10) * (1.0 / 6.0);
gx10 = frac(gx10) - 0.5;
gy10 = frac(gy10) - 0.5;
gz10 = frac(gz10) - 0.5;
float4 gw10 = float4(0.75) - abs(gx10) - abs(gy10) - abs(gz10);
float4 sw10 = step(gw10, float4(0.0));
gx10 -= sw10 * (step(0.0, gx10) - 0.5);
gy10 -= sw10 * (step(0.0, gy10) - 0.5);
float4 gx11 = ixy11 * (1.0 / 7.0);
float4 gy11 = floor(gx11) * (1.0 / 7.0);
float4 gz11 = floor(gy11) * (1.0 / 6.0);
gx11 = frac(gx11) - 0.5;
gy11 = frac(gy11) - 0.5;
gz11 = frac(gz11) - 0.5;
float4 gw11 = float4(0.75) - abs(gx11) - abs(gy11) - abs(gz11);
float4 sw11 = step(gw11, float4(0.0));
gx11 -= sw11 * (step(0.0, gx11) - 0.5);
gy11 -= sw11 * (step(0.0, gy11) - 0.5);
float4 g0000 = float4(gx00.x,gy00.x,gz00.x,gw00.x);
float4 g1000 = float4(gx00.y,gy00.y,gz00.y,gw00.y);
float4 g0100 = float4(gx00.z,gy00.z,gz00.z,gw00.z);
float4 g1100 = float4(gx00.w,gy00.w,gz00.w,gw00.w);
float4 g0010 = float4(gx10.x,gy10.x,gz10.x,gw10.x);
float4 g1010 = float4(gx10.y,gy10.y,gz10.y,gw10.y);
float4 g0110 = float4(gx10.z,gy10.z,gz10.z,gw10.z);
float4 g1110 = float4(gx10.w,gy10.w,gz10.w,gw10.w);
float4 g0001 = float4(gx01.x,gy01.x,gz01.x,gw01.x);
float4 g1001 = float4(gx01.y,gy01.y,gz01.y,gw01.y);
float4 g0101 = float4(gx01.z,gy01.z,gz01.z,gw01.z);
float4 g1101 = float4(gx01.w,gy01.w,gz01.w,gw01.w);
float4 g0011 = float4(gx11.x,gy11.x,gz11.x,gw11.x);
float4 g1011 = float4(gx11.y,gy11.y,gz11.y,gw11.y);
float4 g0111 = float4(gx11.z,gy11.z,gz11.z,gw11.z);
float4 g1111 = float4(gx11.w,gy11.w,gz11.w,gw11.w);
float4 norm00 = taylorInvSqrt(float4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));
g0000 *= norm00.x;
g0100 *= norm00.y;
g1000 *= norm00.z;
g1100 *= norm00.w;
float4 norm01 = taylorInvSqrt(float4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));
g0001 *= norm01.x;
g0101 *= norm01.y;
g1001 *= norm01.z;
g1101 *= norm01.w;
float4 norm10 = taylorInvSqrt(float4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));
g0010 *= norm10.x;
g0110 *= norm10.y;
g1010 *= norm10.z;
g1110 *= norm10.w;
float4 norm11 = taylorInvSqrt(float4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));
g0011 *= norm11.x;
g0111 *= norm11.y;
g1011 *= norm11.z;
g1111 *= norm11.w;
float n0000 = dot(g0000, Pf0);
float n1000 = dot(g1000, float4(Pf1.x, Pf0.yzw));
float n0100 = dot(g0100, float4(Pf0.x, Pf1.y, Pf0.zw));
float n1100 = dot(g1100, float4(Pf1.xy, Pf0.zw));
float n0010 = dot(g0010, float4(Pf0.xy, Pf1.z, Pf0.w));
float n1010 = dot(g1010, float4(Pf1.x, Pf0.y, Pf1.z, Pf0.w));
float n0110 = dot(g0110, float4(Pf0.x, Pf1.yz, Pf0.w));
float n1110 = dot(g1110, float4(Pf1.xyz, Pf0.w));
float n0001 = dot(g0001, float4(Pf0.xyz, Pf1.w));
float n1001 = dot(g1001, float4(Pf1.x, Pf0.yz, Pf1.w));
float n0101 = dot(g0101, float4(Pf0.x, Pf1.y, Pf0.z, Pf1.w));
float n1101 = dot(g1101, float4(Pf1.xy, Pf0.z, Pf1.w));
float n0011 = dot(g0011, float4(Pf0.xy, Pf1.zw));
float n1011 = dot(g1011, float4(Pf1.x, Pf0.y, Pf1.zw));
float n0111 = dot(g0111, float4(Pf0.x, Pf1.yzw));
float n1111 = dot(g1111, Pf1);
float4 fade_xyzw = fade(Pf0);
float4 n_0w = lerp(float4(n0000, n1000, n0100, n1100), float4(n0001, n1001, n0101, n1101), fade_xyzw.w);
float4 n_1w = lerp(float4(n0010, n1010, n0110, n1110), float4(n0011, n1011, n0111, n1111), fade_xyzw.w);
float4 n_zw = lerp(n_0w, n_1w, fade_xyzw.z);
float2 n_yzw = lerp(n_zw.xy, n_zw.zw, fade_xyzw.y);
float n_xyzw = lerp(n_yzw.x, n_yzw.y, fade_xyzw.x);
return 2.2 * n_xyzw;
}
// Classic Perlin noise, periodic version
float pnoise(float4 P, float4 rep)
{
float4 Pi0 = mod(floor(P), rep); // Integer part modulo rep
float4 Pi1 = mod(Pi0 + 1.0, rep); // Integer part + 1 mod rep
Pi0 = mod289(Pi0);
Pi1 = mod289(Pi1);
float4 Pf0 = frac(P); // Fractional part for interpolation
float4 Pf1 = Pf0 - 1.0; // Fractional part - 1.0
float4 ix = float4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);
float4 iy = float4(Pi0.yy, Pi1.yy);
float4 iz0 = float4(Pi0.zzzz);
float4 iz1 = float4(Pi1.zzzz);
float4 iw0 = float4(Pi0.wwww);
float4 iw1 = float4(Pi1.wwww);
float4 ixy = permute(permute(ix) + iy);
float4 ixy0 = permute(ixy + iz0);
float4 ixy1 = permute(ixy + iz1);
float4 ixy00 = permute(ixy0 + iw0);
float4 ixy01 = permute(ixy0 + iw1);
float4 ixy10 = permute(ixy1 + iw0);
float4 ixy11 = permute(ixy1 + iw1);
float4 gx00 = ixy00 * (1.0 / 7.0);
float4 gy00 = floor(gx00) * (1.0 / 7.0);
float4 gz00 = floor(gy00) * (1.0 / 6.0);
gx00 = frac(gx00) - 0.5;
gy00 = frac(gy00) - 0.5;
gz00 = frac(gz00) - 0.5;
float4 gw00 = float4(0.75) - abs(gx00) - abs(gy00) - abs(gz00);
float4 sw00 = step(gw00, float4(0.0));
gx00 -= sw00 * (step(0.0, gx00) - 0.5);
gy00 -= sw00 * (step(0.0, gy00) - 0.5);
float4 gx01 = ixy01 * (1.0 / 7.0);
float4 gy01 = floor(gx01) * (1.0 / 7.0);
float4 gz01 = floor(gy01) * (1.0 / 6.0);
gx01 = frac(gx01) - 0.5;
gy01 = frac(gy01) - 0.5;
gz01 = frac(gz01) - 0.5;
float4 gw01 = float4(0.75) - abs(gx01) - abs(gy01) - abs(gz01);
float4 sw01 = step(gw01, float4(0.0));
gx01 -= sw01 * (step(0.0, gx01) - 0.5);
gy01 -= sw01 * (step(0.0, gy01) - 0.5);
float4 gx10 = ixy10 * (1.0 / 7.0);
float4 gy10 = floor(gx10) * (1.0 / 7.0);
float4 gz10 = floor(gy10) * (1.0 / 6.0);
gx10 = frac(gx10) - 0.5;
gy10 = frac(gy10) - 0.5;
gz10 = frac(gz10) - 0.5;
float4 gw10 = float4(0.75) - abs(gx10) - abs(gy10) - abs(gz10);
float4 sw10 = step(gw10, float4(0.0));
gx10 -= sw10 * (step(0.0, gx10) - 0.5);
gy10 -= sw10 * (step(0.0, gy10) - 0.5);
float4 gx11 = ixy11 * (1.0 / 7.0);
float4 gy11 = floor(gx11) * (1.0 / 7.0);
float4 gz11 = floor(gy11) * (1.0 / 6.0);
gx11 = frac(gx11) - 0.5;
gy11 = frac(gy11) - 0.5;
gz11 = frac(gz11) - 0.5;
float4 gw11 = float4(0.75) - abs(gx11) - abs(gy11) - abs(gz11);
float4 sw11 = step(gw11, float4(0.0));
gx11 -= sw11 * (step(0.0, gx11) - 0.5);
gy11 -= sw11 * (step(0.0, gy11) - 0.5);
float4 g0000 = float4(gx00.x,gy00.x,gz00.x,gw00.x);
float4 g1000 = float4(gx00.y,gy00.y,gz00.y,gw00.y);
float4 g0100 = float4(gx00.z,gy00.z,gz00.z,gw00.z);
float4 g1100 = float4(gx00.w,gy00.w,gz00.w,gw00.w);
float4 g0010 = float4(gx10.x,gy10.x,gz10.x,gw10.x);
float4 g1010 = float4(gx10.y,gy10.y,gz10.y,gw10.y);
float4 g0110 = float4(gx10.z,gy10.z,gz10.z,gw10.z);
float4 g1110 = float4(gx10.w,gy10.w,gz10.w,gw10.w);
float4 g0001 = float4(gx01.x,gy01.x,gz01.x,gw01.x);
float4 g1001 = float4(gx01.y,gy01.y,gz01.y,gw01.y);
float4 g0101 = float4(gx01.z,gy01.z,gz01.z,gw01.z);
float4 g1101 = float4(gx01.w,gy01.w,gz01.w,gw01.w);
float4 g0011 = float4(gx11.x,gy11.x,gz11.x,gw11.x);
float4 g1011 = float4(gx11.y,gy11.y,gz11.y,gw11.y);
float4 g0111 = float4(gx11.z,gy11.z,gz11.z,gw11.z);
float4 g1111 = float4(gx11.w,gy11.w,gz11.w,gw11.w);
float4 norm00 = taylorInvSqrt(float4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));
g0000 *= norm00.x;
g0100 *= norm00.y;
g1000 *= norm00.z;
g1100 *= norm00.w;
float4 norm01 = taylorInvSqrt(float4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));
g0001 *= norm01.x;
g0101 *= norm01.y;
g1001 *= norm01.z;
g1101 *= norm01.w;
float4 norm10 = taylorInvSqrt(float4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));
g0010 *= norm10.x;
g0110 *= norm10.y;
g1010 *= norm10.z;
g1110 *= norm10.w;
float4 norm11 = taylorInvSqrt(float4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));
g0011 *= norm11.x;
g0111 *= norm11.y;
g1011 *= norm11.z;
g1111 *= norm11.w;
float n0000 = dot(g0000, Pf0);
float n1000 = dot(g1000, float4(Pf1.x, Pf0.yzw));
float n0100 = dot(g0100, float4(Pf0.x, Pf1.y, Pf0.zw));
float n1100 = dot(g1100, float4(Pf1.xy, Pf0.zw));
float n0010 = dot(g0010, float4(Pf0.xy, Pf1.z, Pf0.w));
float n1010 = dot(g1010, float4(Pf1.x, Pf0.y, Pf1.z, Pf0.w));
float n0110 = dot(g0110, float4(Pf0.x, Pf1.yz, Pf0.w));
float n1110 = dot(g1110, float4(Pf1.xyz, Pf0.w));
float n0001 = dot(g0001, float4(Pf0.xyz, Pf1.w));
float n1001 = dot(g1001, float4(Pf1.x, Pf0.yz, Pf1.w));
float n0101 = dot(g0101, float4(Pf0.x, Pf1.y, Pf0.z, Pf1.w));
float n1101 = dot(g1101, float4(Pf1.xy, Pf0.z, Pf1.w));
float n0011 = dot(g0011, float4(Pf0.xy, Pf1.zw));
float n1011 = dot(g1011, float4(Pf1.x, Pf0.y, Pf1.zw));
float n0111 = dot(g0111, float4(Pf0.x, Pf1.yzw));
float n1111 = dot(g1111, Pf1);
float4 fade_xyzw = fade(Pf0);
float4 n_0w = lerp(float4(n0000, n1000, n0100, n1100), float4(n0001, n1001, n0101, n1101), fade_xyzw.w);
float4 n_1w = lerp(float4(n0010, n1010, n0110, n1110), float4(n0011, n1011, n0111, n1111), fade_xyzw.w);
float4 n_zw = lerp(n_0w, n_1w, fade_xyzw.z);
float2 n_yzw = lerp(n_zw.xy, n_zw.zw, fade_xyzw.y);
float n_xyzw = lerp(n_yzw.x, n_yzw.y, fade_xyzw.x);
return 2.2 * n_xyzw;
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 1dd8a94fd1cd7714ab6ea45bc0ca4fd6
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,66 +0,0 @@
#ifndef __NOISE_2D__
#define __NOISE_2D__
#include "noiseMath.cginc"
//
// Description : Array and textureless GLSL 2D simplex noise function.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : stegu
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
// https://github.com/stegu/webgl-noise
//
float snoise(float2 v)
{
const float4 C = float4(0.211324865405187, // (3.0-sqrt(3.0))/6.0
0.366025403784439, // 0.5*(sqrt(3.0)-1.0)
-0.577350269189626, // -1.0 + 2.0 * C.x
0.024390243902439); // 1.0 / 41.0
// First corner
float2 i = floor(v + dot(v, C.yy) );
float2 x0 = v - i + dot(i, C.xx);
// Other corners
float2 i1;
//i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0
//i1.y = 1.0 - i1.x;
i1 = (x0.x > x0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0);
// x0 = x0 - 0.0 + 0.0 * C.xx ;
// x1 = x0 - i1 + 1.0 * C.xx ;
// x2 = x0 - 1.0 + 2.0 * C.xx ;
float4 x12 = x0.xyxy + C.xxzz;
x12.xy -= i1;
// Permutations
i = mod289(i); // Avoid truncation effects in permutation
float3 p = permute( permute( i.y + float3(0.0, i1.y, 1.0 ))
+ i.x + float3(0.0, i1.x, 1.0 ));
float3 m = max(0.5 - float3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
m = m*m ;
m = m*m ;
// Gradients: 41 points uniformly over a line, mapped onto a diamond.
// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)
float3 x = 2.0 * frac(p * C.www) - 1.0;
float3 h = abs(x) - 0.5;
float3 ox = floor(x + 0.5);
float3 a0 = x - ox;
// Normalise gradients implicitly by scaling m
// Approximation of: m *= inversesqrt( a0*a0 + h*h );
m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
// Compute final noise value at P
float3 g;
g.x = a0.x * x0.x + h.x * x0.y;
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
return 130.0 * dot(m, g);
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: dc4d13d9bf897e24e811156756e27090
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,93 +0,0 @@
#ifndef __NOISE_3D__
#define __NOISE_3D__
#include "noiseMath.cginc"
//
// Description : Array and textureless GLSL 2D/3D/4D simplex
// noise functions.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : stegu
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
// https://github.com/stegu/webgl-noise
//
float snoise(float3 v)
{
const float2 C = float2(1.0/6.0, 1.0/3.0) ;
const float4 D = float4(0.0, 0.5, 1.0, 2.0);
// First corner
float3 i = floor(v + dot(v, C.yyy) );
float3 x0 = v - i + dot(i, C.xxx) ;
// Other corners
float3 g = step(x0.yzx, x0.xyz);
float3 l = 1.0 - g;
float3 i1 = min( g.xyz, l.zxy );
float3 i2 = max( g.xyz, l.zxy );
// x0 = x0 - 0.0 + 0.0 * C.xxx;
// x1 = x0 - i1 + 1.0 * C.xxx;
// x2 = x0 - i2 + 2.0 * C.xxx;
// x3 = x0 - 1.0 + 3.0 * C.xxx;
float3 x1 = x0 - i1 + C.xxx;
float3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y
float3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y
// Permutations
i = mod289(i);
float4 p = permute( permute( permute(
i.z + float4(0.0, i1.z, i2.z, 1.0 ))
+ i.y + float4(0.0, i1.y, i2.y, 1.0 ))
+ i.x + float4(0.0, i1.x, i2.x, 1.0 ));
// Gradients: 7x7 points over a square, mapped onto an octahedron.
// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
float n_ = 0.142857142857; // 1.0/7.0
float3 ns = n_ * D.wyz - D.xzx;
float4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)
float4 x_ = floor(j * ns.z);
float4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)
float4 x = x_ *ns.x + ns.yyyy;
float4 y = y_ *ns.x + ns.yyyy;
float4 h = 1.0 - abs(x) - abs(y);
float4 b0 = float4( x.xy, y.xy );
float4 b1 = float4( x.zw, y.zw );
//float4 s0 = float4(lessThan(b0,0.0))*2.0 - 1.0;
//float4 s1 = float4(lessThan(b1,0.0))*2.0 - 1.0;
float4 s0 = floor(b0)*2.0 + 1.0;
float4 s1 = floor(b1)*2.0 + 1.0;
float4 sh = -step(h, float4(0.0));
float4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;
float4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;
float3 p0 = float3(a0.xy,h.x);
float3 p1 = float3(a0.zw,h.y);
float3 p2 = float3(a1.xy,h.z);
float3 p3 = float3(a1.zw,h.w);
//Normalise gradients
float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));
p0 *= norm.x;
p1 *= norm.y;
p2 *= norm.z;
p3 *= norm.w;
// Mix final noise value
float4 m = max(0.6 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
m = m * m;
return 42.0 * dot( m*m, float4( dot(p0,x0), dot(p1,x1),
dot(p2,x2), dot(p3,x3) ) );
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 57958dda2d526f4468d4d3fe372c1f27
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,101 +0,0 @@
#ifndef __NOISE_3D_GRAD__
#define __NOISE_3D_GRAD__
#include "noiseMath.cginc"
//
// Description : Array and textureless GLSL 2D/3D/4D simplex
// noise functions.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : stegu
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
// https://github.com/stegu/webgl-noise
//
float snoise(float3 v, out float3 gradient)
{
const float2 C = float2(1.0/6.0, 1.0/3.0) ;
const float4 D = float4(0.0, 0.5, 1.0, 2.0);
// First corner
float3 i = floor(v + dot(v, C.yyy) );
float3 x0 = v - i + dot(i, C.xxx) ;
// Other corners
float3 g = step(x0.yzx, x0.xyz);
float3 l = 1.0 - g;
float3 i1 = min( g.xyz, l.zxy );
float3 i2 = max( g.xyz, l.zxy );
// x0 = x0 - 0.0 + 0.0 * C.xxx;
// x1 = x0 - i1 + 1.0 * C.xxx;
// x2 = x0 - i2 + 2.0 * C.xxx;
// x3 = x0 - 1.0 + 3.0 * C.xxx;
float3 x1 = x0 - i1 + C.xxx;
float3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y
float3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y
// Permutations
i = mod289(i);
float4 p = permute( permute( permute(
i.z + float4(0.0, i1.z, i2.z, 1.0 ))
+ i.y + float4(0.0, i1.y, i2.y, 1.0 ))
+ i.x + float4(0.0, i1.x, i2.x, 1.0 ));
// Gradients: 7x7 points over a square, mapped onto an octahedron.
// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
float n_ = 0.142857142857; // 1.0/7.0
float3 ns = n_ * D.wyz - D.xzx;
float4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)
float4 x_ = floor(j * ns.z);
float4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)
float4 x = x_ *ns.x + ns.yyyy;
float4 y = y_ *ns.x + ns.yyyy;
float4 h = 1.0 - abs(x) - abs(y);
float4 b0 = float4( x.xy, y.xy );
float4 b1 = float4( x.zw, y.zw );
//float4 s0 = float4(lessThan(b0,0.0))*2.0 - 1.0;
//float4 s1 = float4(lessThan(b1,0.0))*2.0 - 1.0;
float4 s0 = floor(b0)*2.0 + 1.0;
float4 s1 = floor(b1)*2.0 + 1.0;
float4 sh = -step(h, float4(0, 0, 0, 0));
float4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;
float4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;
float3 p0 = float3(a0.xy,h.x);
float3 p1 = float3(a0.zw,h.y);
float3 p2 = float3(a1.xy,h.z);
float3 p3 = float3(a1.zw,h.w);
//Normalise gradients
float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));
p0 *= norm.x;
p1 *= norm.y;
p2 *= norm.z;
p3 *= norm.w;
// Mix final noise value
float4 m = max(0.6 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
float4 m2 = m * m;
float4 m4 = m2 * m2;
float4 pdotx = float4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3));
// Determine noise gradient
float4 temp = m2 * m * pdotx;
gradient = -8.0 * (temp.x * x0 + temp.y * x1 + temp.z * x2 + temp.w * x3);
gradient += m4.x * p0 + m4.y * p1 + m4.z * p2 + m4.w * p3;
gradient *= 42.0;
return 42.0 * dot(m4, pdotx);
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: f71fd4322ebeb1b449257aef7f8856f6
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,110 +0,0 @@
#ifndef __NOISE_4D__
#define __NOISE_4D__
#include "noiseMath.cginc"
//
// Description : Array and textureless GLSL 2D/3D/4D simplex
// noise functions.
// Author : Ian McEwan, Ashima Arts.
// Maintainer : stegu
// Lastmod : 20110822 (ijm)
// License : Copyright (C) 2011 Ashima Arts. All rights reserved.
// Distributed under the MIT License. See LICENSE file.
// https://github.com/ashima/webgl-noise
// https://github.com/stegu/webgl-noise
//
float4 grad4(float j, float4 ip)
{
const float4 ones = float4(1.0, 1.0, 1.0, -1.0);
float4 p, s;
p.xyz = floor( frac (float3(j) * ip.xyz) * 7.0) * ip.z - 1.0;
p.w = 1.5 - dot(abs(p.xyz), ones.xyz);
s = float4(lessThan(p, float4(0.0)));
p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www;
return p;
}
float snoise(float4 v)
{
// (sqrt(5) - 1)/4 = F4, used once below
const float F4 = 0.309016994374947451;
const float4 C = float4( 0.138196601125011, // (5 - sqrt(5))/20 G4
0.276393202250021, // 2 * G4
0.414589803375032, // 3 * G4
-0.447213595499958); // -1 + 4 * G4
// First corner
float4 i = floor(v + dot(v, float4(F4)) );
float4 x0 = v - i + dot(i, C.xxxx);
// Other corners
// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)
float4 i0;
float3 isX = step( x0.yzw, x0.xxx );
float3 isYZ = step( x0.zww, x0.yyz );
// i0.x = dot( isX, float3( 1.0 ) );
i0.x = isX.x + isX.y + isX.z;
i0.yzw = 1.0 - isX;
// i0.y += dot( isYZ.xy, float2( 1.0 ) );
i0.y += isYZ.x + isYZ.y;
i0.zw += 1.0 - isYZ.xy;
i0.z += isYZ.z;
i0.w += 1.0 - isYZ.z;
// i0 now contains the unique values 0,1,2,3 in each channel
float4 i3 = clamp( i0, 0.0, 1.0 );
float4 i2 = clamp( i0-1.0, 0.0, 1.0 );
float4 i1 = clamp( i0-2.0, 0.0, 1.0 );
// x0 = x0 - 0.0 + 0.0 * C.xxxx
// x1 = x0 - i1 + 1.0 * C.xxxx
// x2 = x0 - i2 + 2.0 * C.xxxx
// x3 = x0 - i3 + 3.0 * C.xxxx
// x4 = x0 - 1.0 + 4.0 * C.xxxx
float4 x1 = x0 - i1 + C.xxxx;
float4 x2 = x0 - i2 + C.yyyy;
float4 x3 = x0 - i3 + C.zzzz;
float4 x4 = x0 + C.wwww;
// Permutations
i = mod289(i);
float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);
float4 j1 = permute( permute( permute( permute (
i.w + float4(i1.w, i2.w, i3.w, 1.0 ))
+ i.z + float4(i1.z, i2.z, i3.z, 1.0 ))
+ i.y + float4(i1.y, i2.y, i3.y, 1.0 ))
+ i.x + float4(i1.x, i2.x, i3.x, 1.0 ));
// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope
// 7*7*6 = 294, which is close to the ring size 17*17 = 289.
float4 ip = float4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;
float4 p0 = grad4(j0, ip);
float4 p1 = grad4(j1.x, ip);
float4 p2 = grad4(j1.y, ip);
float4 p3 = grad4(j1.z, ip);
float4 p4 = grad4(j1.w, ip);
// Normalise gradients
float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));
p0 *= norm.x;
p1 *= norm.y;
p2 *= norm.z;
p3 *= norm.w;
p4 *= taylorInvSqrt(dot(p4,p4));
// Mix contributions from the five corners
float3 m0 = max(0.6 - float3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);
float2 m1 = max(0.6 - float2(dot(x3,x3), dot(x4,x4) ), 0.0);
m0 = m0 * m0;
m1 = m1 * m1;
return 49.0 * ( dot(m0*m0, float3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))
+ dot(m1*m1, float2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
}
#endif

@ -1,10 +0,0 @@
fileFormatVersion: 2
guid: 098c1c0087563154b884b2b3de5b3309
timeCreated: 1511764501
licenseType: Free
ShaderImporter:
externalObjects: {}
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:

@ -1,63 +0,0 @@
#ifndef __NOISE_MATH__
#define __NOISE_MATH__
// Modulo 289 without a division (only multiplications)
float mod289(float x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float2 mod289(float2 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float3 mod289(float3 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float4 mod289(float4 x) {
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
// Modulo 7 without a division
float3 mod7(float3 x) {
return x - floor(x * (1.0 / 7.0)) * 7.0;
}
float4 mod7(float4 x) {
return x - floor(x * (1.0 / 7.0)) * 7.0;
}
// Permutation polynomial: (34x^2 + x) mod 289
float permute(float x) {
return mod289(((x*34.0) + 1.0)*x);
}
float3 permute(float3 x) {
return mod289((34.0 * x + 1.0) * x);
}
float4 permute(float4 x) {
return mod289((34.0 * x + 1.0) * x);
}
float taylorInvSqrt(float r) {
return 1.79284291400159 - 0.85373472095314 * r;
}
float4 taylorInvSqrt(float4 r) {
return 1.79284291400159 - 0.85373472095314 * r;
}
float2 fade(float2 t) {
return t*t*t*(t*(t*6.0 - 15.0) + 10.0);
}
float3 fade(float3 t) {
return t*t*t*(t*(t*6.0 - 15.0) + 10.0);
}
float4 fade(float4 t) {
return t*t*t*(t*(t*6.0 - 15.0) + 10.0);
}
#endif

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save