refine for DFVolume

master
uc-hoba 8 years ago
parent 1e2b9b765b
commit 4b5fce6e37
  1. 562
      Unity_2018_Frozen/Assets/Frozen/Frozen.unity
  2. 14
      Unity_2018_Frozen/Assets/Frozen/ParticleUniforms.asset
  3. 12
      Unity_2018_Frozen/Assets/Frozen/Script/SnowflakeParticleUpdater.cs
  4. 3
      Unity_2018_Frozen/Assets/Frozen/Shader/FrozenParticleUnlitPoint.shader
  5. 56
      Unity_2018_Frozen/Assets/Frozen/Shader/SnowflakeParticleUpdate.compute
  6. 2
      Unity_2018_Frozen/Assets/KinectOpticalFlow/KinectUpdateShader.compute
  7. 2
      Unity_2018_Frozen/Assets/ParticleWorks/Script/Utilities.cs

@ -14,10 +14,10 @@ OcclusionCullingSettings:
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_Fog: 1
m_FogColor: {r: 0.12068967, g: 0.12068967, b: 0.12068967, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_FogDensity: 0.15
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
@ -113,6 +113,68 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &64242648
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2145210098}
m_Modifications:
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalPosition.x
value: -1.31
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalPosition.y
value: 0.833
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalPosition.z
value: 2.853
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalRotation.y
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalScale.x
value: 0.03868117
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalScale.y
value: 0.038681168
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalScale.z
value: 0.038681168
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -90
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
m_IsPrefabParent: 0
--- !u!4 &64242649 stripped
Transform:
m_PrefabParentObject: {fileID: 400000, guid: aab95b9802393cb4e84e27fbdc45aab4, type: 3}
m_PrefabInternal: {fileID: 64242648}
--- !u!1 &97489477
GameObject:
m_ObjectHideFlags: 0
@ -440,7 +502,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &343589998
GameObject:
@ -557,7 +619,7 @@ MonoBehaviour:
smokeFluidSim: {fileID: 774429923}
particleViewerMesh: {fileID: 776169031}
rate: 0.001
volumeData: {fileID: 11400000, guid: bddc8b83040ed4c4a83cd1283d458790, type: 2}
volumeData: {fileID: 11400000, guid: afc1e30465793334698e795abe981801, type: 2}
value: 0
debug:
--- !u!1 &353335467
@ -600,7 +662,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 86572f0349d91434d90f40861f708217, type: 3}
m_Name:
m_EditorClassIdentifier:
_data: {fileID: 11400000, guid: bddc8b83040ed4c4a83cd1283d458790, type: 2}
_data: {fileID: 11400000, guid: afc1e30465793334698e795abe981801, type: 2}
_mode: 1
_depth: 0
_quadMesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
@ -816,7 +878,7 @@ Transform:
- {fileID: 850228141}
- {fileID: 1848145250}
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &401185750
GameObject:
@ -848,7 +910,7 @@ Transform:
- {fileID: 1579390333}
- {fileID: 343589999}
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &438615021
GameObject:
@ -978,7 +1040,7 @@ RectTransform:
m_Children:
- {fileID: 770059767}
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@ -1080,9 +1142,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 86572f0349d91434d90f40861f708217, type: 3}
m_Name:
m_EditorClassIdentifier:
_data: {fileID: 11400000, guid: bddc8b83040ed4c4a83cd1283d458790, type: 2}
_data: {fileID: 11400000, guid: afc1e30465793334698e795abe981801, type: 2}
_mode: 0
_depth: 1
_depth: 0
_quadMesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
_shader: {fileID: 4800000, guid: e87e89fb693f01e47ac90f63e832ed83, type: 3}
--- !u!1 &528715328
@ -1279,7 +1341,7 @@ Transform:
m_LocalScale: {x: 2, y: 2, z: 2}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &618046638
GameObject:
@ -1337,92 +1399,8 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &711251199
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 711251200}
- component: {fileID: 711251203}
- component: {fileID: 711251202}
- component: {fileID: 711251201}
m_Layer: 0
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &711251200
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 711251199}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.04, z: 2.37}
m_LocalScale: {x: 3.590428, y: 3.5904257, z: 3.5904257}
m_Children: []
m_Father: {fileID: 2145210098}
m_RootOrder: 0
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &711251201
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 711251199}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!135 &711251202
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 711251199}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &711251203
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 711251199}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &732632614
GameObject:
m_ObjectHideFlags: 0
@ -1454,7 +1432,7 @@ Transform:
- {fileID: 1035960134}
- {fileID: 441718964}
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &770059766
GameObject:
@ -1758,90 +1736,6 @@ MonoBehaviour:
material: {fileID: 2100000, guid: 0858735f439783448b9cc855a56a9e94, type: 2}
shader: {fileID: 7200000, guid: 226ca53b2a6b1f34cb8e462337683d07, type: 3}
references: []
--- !u!1 &785725808
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 785725809}
- component: {fileID: 785725812}
- component: {fileID: 785725811}
- component: {fileID: 785725810}
m_Layer: 0
m_Name: Sphere (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &785725809
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 785725808}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.77, y: 0.04, z: 2.37}
m_LocalScale: {x: 3.086265, y: 3.086265, z: 3.086265}
m_Children: []
m_Father: {fileID: 2145210098}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &785725810
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 785725808}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!135 &785725811
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 785725808}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &785725812
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 785725808}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &810572921
GameObject:
m_ObjectHideFlags: 0
@ -2038,7 +1932,7 @@ Transform:
- {fileID: 474490318}
- {fileID: 353335468}
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1035960133
GameObject:
@ -2145,7 +2039,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &1196719910
GameObject:
@ -2254,7 +2148,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1390635889
MonoBehaviour:
@ -2326,174 +2220,6 @@ Canvas:
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!1 &1493994142
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1493994143}
- component: {fileID: 1493994146}
- component: {fileID: 1493994145}
- component: {fileID: 1493994144}
m_Layer: 0
m_Name: Sphere (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1493994143
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1493994142}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.71, y: 0.04, z: 2.37}
m_LocalScale: {x: 2.4301288, y: 2.4301288, z: 2.4301288}
m_Children: []
m_Father: {fileID: 2145210098}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1493994144
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1493994142}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!135 &1493994145
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1493994142}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1493994146
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1493994142}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1555216961
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1555216962}
- component: {fileID: 1555216965}
- component: {fileID: 1555216964}
- component: {fileID: 1555216963}
m_Layer: 0
m_Name: Sphere (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1555216962
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1555216961}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.47, y: 0.04, z: 2.37}
m_LocalScale: {x: 2.074109, y: 2.0741088, z: 2.0741088}
m_Children: []
m_Father: {fileID: 2145210098}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1555216963
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1555216961}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!135 &1555216964
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1555216961}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1555216965
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1555216961}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1579390332
GameObject:
m_ObjectHideFlags: 0
@ -2549,6 +2275,129 @@ Canvas:
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!1 &1619142850
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1619142855}
- component: {fileID: 1619142854}
- component: {fileID: 1619142851}
m_Layer: 0
m_Name: Clipped Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1619142851
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1619142850}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
m_Name:
m_EditorClassIdentifier:
volumeTrigger: {fileID: 1619142855}
volumeLayer:
serializedVersion: 2
m_Bits: 4294967295
stopNaNPropagation: 1
antialiasingMode: 2
temporalAntialiasing:
jitterSpread: 0.75
sharpness: 0.25
stationaryBlending: 0.95
motionBlending: 0.85
subpixelMorphologicalAntialiasing:
quality: 2
fastApproximateAntialiasing:
fastMode: 0
keepAlpha: 0
fog:
enabled: 1
excludeSkybox: 1
debugLayer:
lightMeter:
width: 512
height: 256
showCurves: 1
histogram:
width: 512
height: 256
channel: 3
waveform:
exposure: 0.12
height: 256
vectorscope:
size: 256
exposure: 0.12
overlaySettings:
motionColorIntensity: 4
motionGridSize: 64
colorBlindnessType: 0
colorBlindnessStrength: 1
m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2}
m_ShowToolkit: 0
m_ShowCustomSorter: 0
breakBeforeColorGrading: 0
m_BeforeTransparentBundles: []
m_BeforeStackBundles: []
m_AfterStackBundles: []
--- !u!20 &1619142854
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1619142850}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 4.5
far clip plane: 1000
field of view: 24.3
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: 1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 2
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 1
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1619142855
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1619142850}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1820320968
GameObject:
m_ObjectHideFlags: 0
@ -2752,7 +2601,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2145210097
GameObject:
@ -2779,10 +2628,7 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 711251200}
- {fileID: 1493994143}
- {fileID: 1555216962}
- {fileID: 785725809}
- {fileID: 64242649}
m_Father: {fileID: 1007466426}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

@ -13,18 +13,18 @@ MonoBehaviour:
m_EditorClassIdentifier:
numRate: 1
movement: 1
geomSize: 0.274
geomSize: 0.074
velocityDamping: 0.95
lifeDuration: 7
lifeDuration: 10
lifeVariation: 0
convergence: 0
homeStrength: 0
noiseStrength: 0.037
noiseStrength: 0.055
noiseSeed: 0.5
noiseTimeScale: 1
noiseFrequency: 0.29
forceDirection: {x: 0, y: -1, z: 0}
forceStrength: 0.05
noiseFrequency: 0.731
forceDirection: {x: 0, y: 0, z: 1}
forceStrength: 0.493
impulsePosition: {x: 0, y: 0, z: 0}
impulseRadius: 3
impulseStrength: 1
impulseStrength: 0.05

@ -33,7 +33,6 @@ namespace UltraCombos.Frozen
public float rate = 1.0f;
[SerializeField] DFVolume.VolumeData volumeData;
ComputeBuffer volume_buffer;
[SerializeField, Range(0, 1)]
float value = 0;
@ -58,15 +57,12 @@ namespace UltraCombos.Frozen
OnReset();
}
debug = string.Format("{0}", volumeData.data[(int)Mathf.Min(volumeData.data.Count * value, volumeData.data.Count - 1)]);
UpdateParticle(Time.fixedDeltaTime);
}
private void OnDestroy()
{
Utilities.Release(ref args_buffer);
Utilities.Release(ref volume_buffer);
}
private void OnReset()
@ -80,12 +76,6 @@ namespace UltraCombos.Frozen
args_buffer = shader.CreateIndirectComputeArgsBuffer(maxParticles, 1, 1);
}
{
var data = volumeData.data;
volume_buffer = new ComputeBuffer(data.Count, sizeof(float) * 4);
volume_buffer.SetData(data);
}
{
buffer_data = new List<Particle>();
yield return Utilities.GetRandomParticleData(maxParticles, buffer_data);
@ -120,7 +110,7 @@ namespace UltraCombos.Frozen
shader.SetBuffer(0, "home_position_buffer", kinectOpticalFlow.HomePositionBuffer);
shader.SetBuffer(0, "home_velocity_buffer", kinectOpticalFlow.HomeVelocityBuffer);
shader.SetBuffer(0, "fluid_velocity_buffer", smokeFluidSim.VelocityBuffer);
shader.SetBuffer(0, "volume_data", volume_buffer);
shader.SetTexture(0, "DFVolume", volumeData.texture);
shader.DispatchIndirect(0, args_buffer);

@ -53,7 +53,8 @@
{
v2g o = (v2g)0;
#ifdef SHADER_API_D3D11
o.vertex = mul(model_matrix, float4(ssbo[vid].position, ssbo[vid].life));
o.vertex = mul(model_matrix, float4(ssbo[vid].position, 1.0));
o.vertex.w = ssbo[vid].life;
#endif
return o;
}

@ -25,7 +25,7 @@ RWStructuredBuffer<ParticleUniforms> uniform_buffer;
RWStructuredBuffer<float4> home_position_buffer;
RWStructuredBuffer<float4> home_velocity_buffer;
RWStructuredBuffer<float3> fluid_velocity_buffer;
RWStructuredBuffer<float4> volume_data;
Texture3D<float4> DFVolume;
SamplerState samplerDFVolume;
@ -117,10 +117,12 @@ void CSMain(uint3 id : SV_DispatchThreadID)
float3 dim = ((p.position - FluidGridRoot) / FluidGridSize) * FluidGridDim;
dim = clamp(dim, float3(0, 0, 0), FluidGridDim - 1);
int idx = (int)dim.x + (int)dim.y * FluidGridDim.x + (int)dim.z * FluidGridDim.x * FluidGridDim.y;
float3 F = fluid_velocity_buffer[idx].xyz * 1.0f;
float3 F = fluid_velocity_buffer[idx].xyz * 5.0f;
acc += F * uni.impulseStrength;
}
float3 volume_cc = float3(0.0, 0.424, 2.853);
// volume
{
//float3 volume_dim = float3(50, 50, 50);
@ -128,33 +130,47 @@ void CSMain(uint3 id : SV_DispatchThreadID)
//dim = clamp(dim, float3(0, 0, 0), volume_dim - 1);
//int idx = (int)dim.x + (int)dim.y * volume_dim.x + (int)dim.z * volume_dim.x * volume_dim.y;
float4 df = SampleVolume((p.position - FluidGridRoot) / FluidGridSize);
float3 F = -df.xyz * pow(df.w / 0.5, 2.2);
F += cross(-df.xyz, float3(1, 0, 0)) * (1.0 - saturate(df.w / 0.2)) * 0.05;
float3 F = -df.xyz * pow(saturate(df.w / 1.0), 1.0 / 2.2) * 0.9;
float3 np = p.position * uni.noiseFrequency;
float3 n1 = float3(0, 0, 0);
snoise(np + float3(uni.noiseSeed, p.seed, timeValue * 5.0), n1);
//F = float3(0, 0, 0);
//F += cross(-df.xyz, float3(0, -1, 0)) * (1.0 - saturate(df.w / 0.1)) * 0.95;
F += cross(-df.xyz, n1) * (1.0 - saturate(df.w / 0.1)) * 0.15;
//float4 data = volume_data[idx];
//float3 F = -data.xyz * pow(data.w, 2.2);
//F += cross(-data.xyz, float3(1, 0, 0)) * (1.0 - saturate(data.w)) * 0.1;
//if (data.w < 0.1) F += data.xyz * 10.0;
//float3 F = lerp(cross(data.xyz, p.velocity), -data.xyz, saturate(data.w));
acc += F * 60.0;
}
acc += F * 10.0;
// cosine gradient
{
float t = (uni.lifeDuration > 0.1f) ? clamp(p.life, 0.0f, 1.0f) : factor;
half3 rgb = cosine_gradient(coeffsA, coeffsB, coeffsC, coeffsD, t);
#if !defined(UNITY_COLORSPACE_GAMMA)
rgb = GammaToLinearSpace(rgb);
#endif
p.color.rgb = rgb;
//float th = 0.01;
//acc += float3(1, 0, 0) * (1.0 - saturate(df.w / th)) * 12.0;
if (abs(p.position.z - volume_cc.z) < 0.8)
acc += float3(1, 0, 0) * 7.0;
}
acc *= uni.movement;
p.velocity += acc * timeStep;
{
float4 df = SampleVolume((p.position - FluidGridRoot) / FluidGridSize);
float th = 0.01;
float3 dp = p.position - df.xyz * df.w;
p.velocity = lerp(df.xyz, p.velocity, saturate(df.w / th));
if (dot(p.position - dp, volume_cc - dp) > 0.0) p.position = dp + df.xyz * th;
}
p.position += p.velocity * timeStep;
//float damping = lerp(0.965f, 0.985f, p.seed) * velocityDamping;
p.velocity *= lerp(0.965f, 0.985f, p.seed) * uni.velocityDamping;
// calculate rotate quat
{
float vel = length(p.velocity);
@ -190,6 +206,16 @@ void CSMain(uint3 id : SV_DispatchThreadID)
p.position.y = 0.0f;
}
}
// cosine gradient
{
float t = (uni.lifeDuration > 0.1f) ? clamp(p.life, 0.0f, 1.0f) : factor;
half3 rgb = cosine_gradient(coeffsA, coeffsB, coeffsC, coeffsD, t);
#if !defined(UNITY_COLORSPACE_GAMMA)
rgb = GammaToLinearSpace(rgb);
#endif
p.color.rgb = rgb;
}
ssbo[id.x] = p;
}

@ -50,7 +50,7 @@ void CSMain (uint3 id : SV_DispatchThreadID)
grid_index = (int)grid_pos.x + (int)grid_pos.y * FluidDim.x + (int)grid_pos.z * FluidDim.x * FluidDim.y;
KinectGridBuffer[grid_index] += float4(vel.xyz, 1);
if (pos_mag > 1.0f)
if (pos_mag > 0.1f)
{
HomePositionBuffer.Append(float4(pos.xyz, 0));
HomeVelocityBuffer.Append(float4(vel.xyz, 0));

@ -125,7 +125,7 @@ namespace UltraCombos
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);
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;

Loading…
Cancel
Save