diff --git a/UnityProject/Assembly-CSharp.csproj b/UnityProject/Assembly-CSharp.csproj index 2225ad5..c1bd017 100644 --- a/UnityProject/Assembly-CSharp.csproj +++ b/UnityProject/Assembly-CSharp.csproj @@ -77,8 +77,11 @@ + + + @@ -175,6 +178,7 @@ + diff --git a/UnityProject/Assets/HDRP/Flare.vfx b/UnityProject/Assets/HDRP/Flare.vfx index e89a3f5..d907b3d 100644 --- a/UnityProject/Assets/HDRP/Flare.vfx +++ b/UnityProject/Assets/HDRP/Flare.vfx @@ -76,9 +76,7 @@ VisualEffectResource: 64\n#define VFX_USE_POSITION_CURRENT 1\n#define VFX_USE_SEED_CURRENT 1\n#define VFX_USE_DIRECTION_CURRENT 1\n#define VFX_USE_VELOCITY_CURRENT 1\n#define VFX_USE_LIFETIME_CURRENT 1\n#define VFX_USE_ALIVE_CURRENT 1\n#define VFX_USE_AGE_CURRENT 1\n#define VFX_LOCAL_SPACE - 1\n\n\nCBUFFER_START(parameters)\n float3 ArcSphere_sphere_center_a;\n float - ArcSphere_sphere_radius_a;\n float ArcSphere_arc_a;\n float Speed_b;\n - \ float DirectionBlend_b;\n float Min_c;\n float Max_c;\n uint3 PADDING_0;\nCBUFFER_END\n\n\n#include + 1\n\n\nCBUFFER_START(parameters)\n float Speed_b;\n uint3 PADDING_0;\nCBUFFER_END\n\n\n#include \"Packages/com.unity.visualeffectgraph/Shaders/Common/VFXCommonCompute.cginc\"\n#include \"Packages/com.unity.visualeffectgraph/Shaders/VFXCommon.cginc\"\n\n\n\nRWByteAddressBuffer attributeBuffer;\nByteAddressBuffer sourceAttributeBuffer;\n\nCBUFFER_START(initParams)\n#if @@ -129,17 +127,18 @@ VisualEffectResource: VFX_USE_PARTICLEID_CURRENT\n particleId = particleIndex;\n#endif\n#if VFX_USE_SEED_CURRENT\n seed = WangHash(particleIndex ^ systemSeed);\n#endif\n \ \n {\n PositionSphere_0( /*inout */position, /*inout - */seed, /*inout */direction, ArcSphere_sphere_center_a, ArcSphere_sphere_radius_a, - ArcSphere_arc_a, (float)1);\n }\n VelocityRandomize_18D( /*inout - */velocity, /*inout */direction, /*inout */seed, Speed_b, DirectionBlend_b);\n - \ SetAttribute_F01429A3( /*inout */lifetime, /*inout */seed, Min_c, Max_c);\n - \ \n\n\n#if VFX_USE_ALIVE_CURRENT\n if (alive)\n {\n\t\t\tuint - deadIndex = deadListIn.DecrementCounter();\n uint index = deadListIn[deadIndex];\n - \ attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(position));\n - \ attributeBuffer.Store3((index * 0x4 + 0x7F000) << 2,asuint(velocity));\n - \ attributeBuffer.Store((index * 0x4 + 0x7F003) << 2,asuint(lifetime));\n - \ attributeBuffer.Store((index * 0x8 + 0x3) << 2,uint(alive));\n attributeBuffer.Store((index - * 0x8 + 0x4) << 2,asuint(age));\n \n\n }\n#else\n uint + */seed, /*inout */direction, float3(0,0,0), (float)1, (float)6.283185, (float)1);\n + \ }\n {\n VelocityRandomize_18D( /*inout */velocity, + \ /*inout */direction, /*inout */seed, Speed_b, (float)1);\n }\n {\n + \ SetAttribute_F01429A3( /*inout */lifetime, /*inout */seed, (float)4, + (float)9);\n }\n \n\n\n#if VFX_USE_ALIVE_CURRENT\n if (alive)\n + \ {\n\t\t\tuint deadIndex = deadListIn.DecrementCounter();\n uint + index = deadListIn[deadIndex];\n attributeBuffer.Store3((index * + 0x8 + 0x0) << 2,asuint(position));\n attributeBuffer.Store3((index + * 0x4 + 0x7F000) << 2,asuint(velocity));\n attributeBuffer.Store((index + * 0x4 + 0x7F003) << 2,asuint(lifetime));\n attributeBuffer.Store((index + * 0x8 + 0x3) << 2,uint(alive));\n attributeBuffer.Store((index * + 0x8 + 0x4) << 2,asuint(age));\n \n\n }\n#else\n uint index = particleIndex;\n attributeBuffer.Store3((index * 0x8 + 0x0) << 2,asuint(position));\n attributeBuffer.Store3((index * 0x4 + 0x7F000) << 2,asuint(velocity));\n attributeBuffer.Store((index * 0x4 + 0x7F003) @@ -210,8 +209,8 @@ VisualEffectResource: VFX_USE_SCALEY_CURRENT 1\n\t\t#define VFX_USE_SCALEZ_CURRENT 1\n\t\t#define VFX_USE_AGE_CURRENT 1\n\t\t#define VFX_BLENDMODE_ADD 1\n\t\t\n\t\t\n\t\t\n\t\t#define VFX_LOCAL_SPACE 1\n\t\t\n\n\t\tCBUFFER_START(parameters)\n\t\t float4 Scale_d;\n\t\t - \ float Size_b;\n\t\t float Scale_c;\n\t\t float gradient_e;\n\t\t uint - PADDING_0;\n\t\tCBUFFER_END\n\t\tTexture2D mainTexture;\n\t\tSamplerState samplermainTexture;\n\t\t\n\n\t\t\n\t\t#define + \ float gradient_e;\n\t\t uint3 PADDING_0;\n\t\tCBUFFER_END\n\t\tTexture2D + mainTexture;\n\t\tSamplerState samplermainTexture;\n\t\t\n\n\t\t\n\t\t#define VFX_NEEDS_COLOR_INTERPOLATOR (VFX_USE_COLOR_CURRENT || VFX_USE_ALPHA_CURRENT)\n\t\t#define IS_TRANSPARENT_PARTICLE (!IS_OPAQUE_PARTICLE)\n\t\t\n\t\t#include \"Packages/com.unity.visualeffectgraph/Shaders/RenderPipeline/HDRP/VFXGlobalDefines.cginc\"\n\t\t\n\n\t\t\n\t\tByteAddressBuffer attributeBuffer;\t\n\t\t\n\t\t#if VFX_HAS_INDIRECT_DRAW\n\t\tStructuredBuffer @@ -289,8 +288,9 @@ VisualEffectResource: scaleX = (float)1;\n\t\t\t\t\t\tfloat scaleY = (float)1;\n\t\t\t\t\t\tfloat scaleZ = (float)1;\n\t\t\t\t\t\tfloat age = asfloat(attributeBuffer.Load((index * 0x8 + 0x4) << 2));\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t\n\t\t\t\tOrient_6( - /*inout */axisX, /*inout */axisY, /*inout */axisZ, position, velocity);\n\t\t\t\tSetAttribute_3278B22F( - /*inout */size, Size_b);\n\t\t\t\tSetAttribute_D5151644( /*inout */scaleX, Scale_c);\n\t\t\t\tAttributeFromCurve_5369138A( + /*inout */axisX, /*inout */axisY, /*inout */axisZ, position, velocity);\n\t\t\t\t{\n\t\t\t\t + \ SetAttribute_3278B22F( /*inout */size, (float)1);\n\t\t\t\t}\n\t\t\t\t{\n\t\t\t\t + \ SetAttribute_D5151644( /*inout */scaleX, (float)0.05);\n\t\t\t\t}\n\t\t\t\tAttributeFromCurve_5369138A( /*inout */scaleY, age, lifetime, Scale_d);\n\t\t\t\tColorOverLife_733E3(age, lifetime, /*inout */color, /*inout */alpha, gradient_e);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (!alive)\n\t\t\t\t\treturn o;\n\t\t\t\t\n\t\t\t\to.VFX_VARYING_UV.x = float(id @@ -335,13 +335,13 @@ VisualEffectResource: data[0]: -1 data[1]: -1 data[2]: -1 - data[3]: 1 + data[3]: 13 - op: 1 valueIndex: 1 data[0]: -1 data[1]: -1 data[2]: -1 - data[3]: 1 + data[3]: 14 - op: 1 valueIndex: 2 data[0]: -1 @@ -353,37 +353,13 @@ VisualEffectResource: data[0]: -1 data[1]: -1 data[2]: -1 - data[3]: 1 - - op: 26 - valueIndex: 4 - data[0]: 2 - data[1]: 0 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 5 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 14 + data[3]: 3 - op: 1 valueIndex: 6 data[0]: -1 data[1]: -1 data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 7 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 8 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 + data[3]: 3 - op: 1 valueIndex: 9 data[0]: -1 @@ -407,135 +383,39 @@ VisualEffectResource: data[0]: -1 data[1]: -1 data[2]: -1 - data[3]: 13 + data[3]: 1 - op: 1 valueIndex: 13 data[0]: -1 data[1]: -1 data[2]: -1 data[3]: 1 - - op: 1 + - op: 6 valueIndex: 14 data[0]: -1 data[1]: -1 data[2]: -1 - data[3]: 1 + data[3]: -1 - op: 1 valueIndex: 15 data[0]: -1 data[1]: -1 data[2]: -1 data[3]: 1 - - op: 26 - valueIndex: 16 - data[0]: 1 - data[1]: 0 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 17 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 18 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 6 - valueIndex: 19 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: -1 - - op: 26 - valueIndex: 20 - data[0]: 17 - data[1]: 0 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 21 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - op: 44 - valueIndex: 22 - data[0]: 12 + valueIndex: 16 + data[0]: 0 data[1]: -1 data[2]: -1 data[3]: 0 - op: 45 - valueIndex: 26 - data[0]: 5 + valueIndex: 20 + data[0]: 1 data[1]: -1 data[2]: -1 data[3]: 0 - op: 1 - valueIndex: 27 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 28 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 25 - valueIndex: 29 - data[0]: 4 - data[1]: 10 - data[2]: -1 - data[3]: 1 - - op: 25 - valueIndex: 30 - data[0]: 16 - data[1]: 6 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 31 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 3 - valueIndex: 32 - data[0]: 9 - data[1]: 8 - data[2]: 7 - data[3]: -1 - - op: 1 - valueIndex: 35 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 3 - valueIndex: 36 - data[0]: 11 - data[1]: 18 - data[2]: 3 - data[3]: -1 - - op: 3 - valueIndex: 39 - data[0]: 15 - data[1]: 14 - data[2]: 13 - data[3]: -1 - - op: 1 - valueIndex: 42 - data[0]: -1 - data[1]: -1 - data[2]: -1 - data[3]: 1 - - op: 1 - valueIndex: 43 + valueIndex: 21 data[0]: -1 data[1]: -1 data[2]: -1 @@ -545,52 +425,28 @@ VisualEffectResource: m_PropertySheet: m_Float: m_Array: - - m_ExpressionIndex: 0 - m_Value: 0 - - m_ExpressionIndex: 1 - m_Value: 1 - m_ExpressionIndex: 2 - m_Value: 6.2831855 - - m_ExpressionIndex: 3 - m_Value: 5 + m_Value: 25000 + - m_ExpressionIndex: 5 + m_Value: 0 - m_ExpressionIndex: 6 m_Value: 1 - m_ExpressionIndex: 7 - m_Value: 0 - - m_ExpressionIndex: 8 - m_Value: 0 - - m_ExpressionIndex: 9 - m_Value: 0 - - m_ExpressionIndex: 10 m_Value: 6.2831855 - - m_ExpressionIndex: 11 - m_Value: 5 - - m_ExpressionIndex: 13 - m_Value: 0 - - m_ExpressionIndex: 14 - m_Value: 0 - - m_ExpressionIndex: 15 - m_Value: 0 - - m_ExpressionIndex: 17 - m_Value: 25000 - - m_ExpressionIndex: 18 - m_Value: 5 - - m_ExpressionIndex: 21 - m_Value: 0.05 - - m_ExpressionIndex: 24 - m_Value: 1 - - m_ExpressionIndex: 25 - m_Value: 9 - - m_ExpressionIndex: 28 - m_Value: 1 - - m_ExpressionIndex: 30 - m_Value: 0 - - m_ExpressionIndex: 33 + - m_ExpressionIndex: 8 m_Value: 4 + - m_ExpressionIndex: 9 + m_Value: 9 + - m_ExpressionIndex: 11 + m_Value: 0.05 m_Vector2f: m_Array: [] m_Vector3f: - m_Array: [] + m_Array: + - m_ExpressionIndex: 3 + m_Value: {x: 0, y: 0, z: 0} + - m_ExpressionIndex: 4 + m_Value: {x: 5, y: 5, z: 5} m_Vector4f: m_Array: [] m_Uint: @@ -601,7 +457,7 @@ VisualEffectResource: m_Array: [] m_AnimationCurve: m_Array: - - m_ExpressionIndex: 12 + - m_ExpressionIndex: 0 m_Value: serializedVersion: 2 m_Curve: @@ -646,7 +502,7 @@ VisualEffectResource: m_RotationOrder: 4 m_Gradient: m_Array: - - m_ExpressionIndex: 5 + - m_ExpressionIndex: 1 m_Value: serializedVersion: 2 key0: {r: 2, g: 1.9294118, b: 1.3490196, a: 0} @@ -678,13 +534,13 @@ VisualEffectResource: m_NumAlphaKeys: 4 m_NamedObject: m_Array: - - m_ExpressionIndex: 34 + - m_ExpressionIndex: 14 m_Value: {fileID: 2800000, guid: 49cb5aa34272b034d8b754c65d9cdbfa, type: 3} m_Bool: m_Array: [] m_ExposedExpressions: - nameId: spread - index: 30 + index: 5 m_Buffers: - type: 1 size: 780192 @@ -830,7 +686,7 @@ VisualEffectResource: buffers: [] values: - nameId: Rate - index: 20 + index: 2 params: [] processor: {fileID: 0} shaderSourceIndex: -1 @@ -851,9 +707,9 @@ VisualEffectResource: index: 1 values: - nameId: bounds_center - index: 32 + index: 3 - nameId: bounds_size - index: 31 + index: 4 tasks: - type: 536870912 buffers: @@ -866,25 +722,13 @@ VisualEffectResource: - nameId: sourceAttributeBuffer index: 2 values: - - nameId: ArcSphere_sphere_center_a - index: 29 - - nameId: ArcSphere_sphere_radius_a - index: 28 - - nameId: ArcSphere_arc_a - index: 26 - nameId: Speed_b - index: 30 - - nameId: DirectionBlend_b - index: 27 - - nameId: Min_c - index: 33 - - nameId: Max_c - index: 25 + index: 5 params: - nameId: bounds_center - index: 32 + index: 3 - nameId: bounds_size - index: 31 + index: 4 processor: {fileID: 0} shaderSourceIndex: 0 - type: 805306368 @@ -895,7 +739,7 @@ VisualEffectResource: index: 3 values: - nameId: deltaTime_a - index: 19 + index: 10 params: [] processor: {fileID: 0} shaderSourceIndex: 1 @@ -904,16 +748,12 @@ VisualEffectResource: - nameId: attributeBuffer index: 0 values: - - nameId: Size_b - index: 24 - - nameId: Scale_c - index: 21 - nameId: Scale_d - index: 22 + index: 12 - nameId: gradient_e - index: 23 + index: 13 - nameId: mainTexture - index: 34 + index: 14 params: - nameId: sortPriority index: 0 diff --git a/UnityProject/Assets/Materials/Ball.mat b/UnityProject/Assets/Materials/Ball.mat index 41e5be4..0597b6b 100644 --- a/UnityProject/Assets/Materials/Ball.mat +++ b/UnityProject/Assets/Materials/Ball.mat @@ -8,14 +8,16 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Ball - m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3} m_ShaderKeywords: m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 + m_CustomRenderQueue: 2000 stringTagMap: {} - disabledShaderPasses: [] + disabledShaderPasses: + - DistortionVectors + - MOTIONVECTORS m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -103,6 +105,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _UnlitColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: - _AORemapMax: 1 - _AORemapMin: 0 @@ -129,16 +135,17 @@ Material: - _DisplacementMode: 0 - _DistortionBlendMode: 0 - _DistortionBlurBlendMode: 0 - - _DistortionBlurDstBlend: 0 + - _DistortionBlurDstBlend: 1 - _DistortionBlurRemapMax: 1 - _DistortionBlurRemapMin: 0 - _DistortionBlurScale: 1 - - _DistortionBlurSrcBlend: 0 + - _DistortionBlurSrcBlend: 1 - _DistortionDepthTest: 1 - - _DistortionDstBlend: 0 + - _DistortionDstBlend: 1 - _DistortionEnable: 0 + - _DistortionOnly: 0 - _DistortionScale: 1 - - _DistortionSrcBlend: 0 + - _DistortionSrcBlend: 1 - _DistortionVectorBias: -1 - _DistortionVectorScale: 2 - _DoubleSidedEnable: 0 @@ -213,12 +220,12 @@ Material: - _UseShadowThreshold: 0 - _ZTestDepthEqualForOpaque: 4 - _ZTestGBuffer: 4 - - _ZTestModeDistortion: 8 + - _ZTestModeDistortion: 4 - _ZWrite: 1 m_Colors: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 0, g: 0, b: 0, a: 1} - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} @@ -230,3 +237,4 @@ Material: - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _UnlitColor: {r: 1, g: 1, b: 1, a: 1} diff --git a/UnityProject/Assets/Prefabs/Specttrum.prefab b/UnityProject/Assets/Prefabs/Specttrum.prefab new file mode 100644 index 0000000..5d599eb --- /dev/null +++ b/UnityProject/Assets/Prefabs/Specttrum.prefab @@ -0,0 +1,92 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &6092934612178385049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2729856572329296726} + - component: {fileID: 8520952658703431917} + - component: {fileID: 2815943919782323988} + - component: {fileID: 2644534888280372563} + m_Layer: 0 + m_Name: Specttrum + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2729856572329296726 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6092934612178385049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8520952658703431917 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6092934612178385049} + m_Mesh: {fileID: 0} +--- !u!23 &2815943919782323988 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6092934612178385049} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, 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: 0 + 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!114 &2644534888280372563 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6092934612178385049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cf3fc2a6c7d2914409368a4c9c00e818, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/UnityProject/Assets/Prefabs/Specttrum.prefab.meta b/UnityProject/Assets/Prefabs/Specttrum.prefab.meta new file mode 100644 index 0000000..4aefbe9 --- /dev/null +++ b/UnityProject/Assets/Prefabs/Specttrum.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 805ab35afd02d9b469c52969e599418f +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Scenes/Examples/Composition/material/brownfloor.mat b/UnityProject/Assets/Scenes/Examples/Composition/material/brownfloor.mat index 7d5d77f..6d680f1 100644 --- a/UnityProject/Assets/Scenes/Examples/Composition/material/brownfloor.mat +++ b/UnityProject/Assets/Scenes/Examples/Composition/material/brownfloor.mat @@ -8,26 +8,54 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: brownfloor - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: _ALPHABLEND_ON + m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_ShaderKeywords: _ALPHABLEND_ON _NORMALMAP_TANGENT_SPACE m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 - m_CustomRenderQueue: 3000 - stringTagMap: - RenderType: Transparent - disabledShaderPasses: [] + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: + - DistortionVectors + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - MOTIONVECTORS m_SavedProperties: serializedVersion: 3 m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _BumpMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + 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} + - _DetailMap: + 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} @@ -36,18 +64,50 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + 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} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + 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} + - _MaskMap: + 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} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + 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} @@ -56,23 +116,167 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _Anisotropy: 0 + - _BlendMode: 0 - _BumpScale: 1 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 - _DetailNormalMapScale: 1 - - _DstBlend: 10 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 1 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 1 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 1 + - _DistortionEnable: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 1 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 1 + - _Drag: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnableMotionVectorForVertexAnimation: 0 + - _EnableSpecularOcclusion: 0 + - _EnableWind: 0 + - _EnergyConservingSpecularColor: 1 + - _FFTSize: 512 - _GlossMapScale: 1 - _Glossiness: 0.265 - _GlossyReflections: 1 + - _HdrpVersion: 2 + - _Height: 10 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InitialBend: 1 + - _InvTilingScale: 1 + - _Ior: 1 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 - _Metallic: 1 - _Mode: 2 + - _NormalMapSpace: 0 + - _NormalScale: 1 - _OcclusionStrength: 1 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 - _Parallax: 0.02 + - _PreRefractionPass: 0 + - _ReceivesSSR: 1 + - _RefractionModel: 0 + - _SSRefractionProjectionModel: 0 + - _ShiverDirectionality: 0.5 + - _ShiverDrag: 0.2 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 - _SmoothnessTextureChannel: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 - _SpecularHighlights: 1 - - _SrcBlend: 5 + - _SrcBlend: 1 + - _StencilRef: 2 + - _StencilRefMV: 128 + - _StencilWriteMask: 7 + - _StencilWriteMaskMV: 128 + - _Stiffness: 1 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _ThicknessMultiplier: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 - _UVSec: 0 - - _ZWrite: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 4 + - _ZWrite: 1 m_Colors: - - _Color: {r: 0.7075472, g: 0.3327384, b: 0, a: 0} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} diff --git a/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/VisualEffectGraph.unity b/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/VisualEffectGraph.unity index 06ebf59..857a66f 100644 --- a/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/VisualEffectGraph.unity +++ b/UnityProject/Assets/Scenes/Examples/VisualEffectGraph/VisualEffectGraph.unity @@ -466,7 +466,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &2068053807 Transform: m_ObjectHideFlags: 0 @@ -536,7 +536,7 @@ VFXRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2078212714} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 @@ -693,7 +693,7 @@ VFXRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2090901585} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 0 m_ReceiveShadows: 0 m_DynamicOccludee: 1 diff --git a/UnityProject/Assets/Scenes/Examples/Waterfall/waterfall.unity b/UnityProject/Assets/Scenes/Examples/Waterfall/waterfall.unity new file mode 100644 index 0000000..5a4c38f --- /dev/null +++ b/UnityProject/Assets/Scenes/Examples/Waterfall/waterfall.unity @@ -0,0 +1,596 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 0 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 0 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &835616342 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 835616345} + - component: {fileID: 835616344} + - component: {fileID: 835616343} + - component: {fileID: 835616346} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &835616343 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 835616342} + m_Enabled: 1 +--- !u!20 &835616344 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 835616342} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &835616345 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 835616342} + m_LocalRotation: {x: 0.07725137, y: 0.24776773, z: -0.037750125, w: 0.9649966} + m_LocalPosition: {x: -1.6, y: 1, z: -1.71} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 9.66, y: 28.63, z: -2.01} +--- !u!114 &835616346 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 835616342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + clearColorMode: 0 + backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} + clearDepth: 1 + renderingPath: 0 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + volumeAnchorOverride: {fileID: 0} + aperture: 8 + shutterSpeed: 0.005 + iso: 400 + m_FrameSettings: + overrides: 0 + enableShadow: 1 + enableContactShadows: 1 + enableShadowMask: 1 + enableSSR: 0 + enableSSAO: 1 + enableSubsurfaceScattering: 1 + enableTransmission: 1 + enableAtmosphericScattering: 1 + enableVolumetrics: 1 + enableReprojectionForVolumetrics: 1 + enableLightLayers: 1 + diffuseGlobalDimmer: 1 + specularGlobalDimmer: 1 + shaderLitMode: 1 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 1 + enableMotionVectors: 1 + enableObjectMotionVectors: 1 + enableDecals: 1 + enableRoughRefraction: 1 + enableTransparentPostpass: 1 + enableDistortion: 1 + enablePostprocess: 1 + enableOpaqueObjects: 1 + enableTransparentObjects: 1 + enableRealtimePlanarReflection: 1 + enableMSAA: 0 + enableAsyncCompute: 1 + runLightListAsync: 1 + runSSRAsync: 1 + runSSAOAsync: 1 + runContactShadowsAsync: 1 + runVolumeVoxelizationAsync: 1 + lightLoopSettings: + overrides: 0 + enableTileAndCluster: 1 + enableComputeLightEvaluation: 1 + enableComputeLightVariants: 1 + enableComputeMaterialVariants: 1 + enableFptlForForwardOpaque: 1 + enableBigTilePrepass: 1 + isFptlEnabled: 1 +--- !u!1 &1940730087 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1940730089} + - component: {fileID: 1940730088} + - component: {fileID: 1940730091} + - component: {fileID: 1940730090} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &1940730088 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1940730087} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 3.1415927 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1940730089 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1940730087} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!114 &1940730090 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1940730087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 1 + shadowResolution: 512 + shadowDimmer: 1 + volumetricShadowDimmer: 1 + shadowFadeDistance: 10000 + contactShadows: 0 + viewBiasMin: 0.2 + viewBiasMax: 100 + viewBiasScale: 1 + normalBiasMin: 0.5 + normalBiasMax: 0.5 + normalBiasScale: 1 + sampleBiasScale: 0 + edgeLeakFixup: 1 + edgeToleranceNormal: 1 + edgeTolerance: 1 + shadowCascadeCount: 4 + shadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + shadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + shadowAlgorithm: 0 + shadowVariant: 0 + shadowPrecision: 0 + shadowData: + format: 0 + data: + shadowDatas: [] +--- !u!114 &1940730091 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1940730087} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 3 + m_Version: 3 + directionalIntensity: 3.1415927 + punctualIntensity: 600 + areaIntensity: 200 + enableSpotReflector: 0 + luxAtDistance: 1 + m_InnerSpotPercent: 0 + lightDimmer: 1 + m_VolumetricDimmer: 1 + lightUnit: 2 + sunDiskSize: 1 + sunHaloSize: 0.1 + fadeDistance: 10000 + affectDiffuse: 1 + affectSpecular: 1 + nonLightmappedOnly: 0 + lightTypeExtent: 0 + spotLightShape: 0 + shapeWidth: 0.5 + shapeHeight: 0.5 + aspectRatio: 1 + shapeRadius: 0 + maxSmoothness: 0.99 + applyRangeAttenuation: 1 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + showAdditionalSettings: 0 + displayLightIntensity: 3.1415927 + displayAreaLightEmissiveMesh: 0 + lightLayers: 1 + shadowNearPlane: 0.1 + shadowSoftness: 0.5 + blockerSampleCount: 24 + filterSampleCount: 16 + minFilterSize: 0.00001 +--- !u!1 &2007453103 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2007453104} + - component: {fileID: 2007453105} + m_Layer: 0 + m_Name: Waterfall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2007453104 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2007453103} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 500, y: 100, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2007453105 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2007453103} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0c82a77964e24d32b62dbe21578d8d79, type: 3} + m_Name: + m_EditorClassIdentifier: + pdBackend: {fileID: 2059902904} + spectrumPrefab: {fileID: 6092934612178385049, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + channel: 1 +--- !u!1 &2059902903 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2059902905} + - component: {fileID: 2059902904} + m_Layer: 0 + m_Name: PdBackend + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2059902904 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2059902903} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3ba69cee3466a304d9d570268f717413, type: 3} + m_Name: + m_EditorClassIdentifier: + mainPatch: analyzer.pd + samplePlayback: 0 +--- !u!4 &2059902905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2059902903} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &8066417063808250947 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 6092934612178385049, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_Name + value: Specttrum + objectReference: {fileID: 0} + - target: {fileID: 6092934612178385049, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2729856572329296726, guid: 805ab35afd02d9b469c52969e599418f, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 805ab35afd02d9b469c52969e599418f, type: 3} diff --git a/UnityProject/Assets/Scenes/Examples/Waterfall/waterfall.unity.meta b/UnityProject/Assets/Scenes/Examples/Waterfall/waterfall.unity.meta new file mode 100644 index 0000000..2e2696b --- /dev/null +++ b/UnityProject/Assets/Scenes/Examples/Waterfall/waterfall.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4a45607ec357c954294a02f52f867a1a +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Scripts/Math.meta b/UnityProject/Assets/Scripts/Math.meta new file mode 100644 index 0000000..14ec199 --- /dev/null +++ b/UnityProject/Assets/Scripts/Math.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42036e1cf2185d6498fc9655190f1fe8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs b/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs new file mode 100644 index 0000000..9fd2350 --- /dev/null +++ b/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs @@ -0,0 +1,85 @@ +using UnityEngine; + +namespace cylvester +{ + public interface ICombMesh + { + Vector3[] Vertices { get; } + int[] Indices { get; } + void Update(float[] spectrum); + } + + public class CombMesh : ICombMesh + { + public Vector3[] Vertices { get; } + public int[] Indices { get; } + private IPdArray fftArray_; + private int numberOfTeeth_; + + public CombMesh (int numberOfTeeth, float gap) + { + numberOfTeeth_ = numberOfTeeth; + Vertices = CreateVertices(gap); + Indices = CreateIndices(); + } + + public void Update(float[] spectrum) + { + var index = numberOfTeeth_ * 2; + + for (var i = 0; i < numberOfTeeth_; ++i) + { + Vertices[index++].y = spectrum[i]; + Vertices[index++].y = spectrum[i]; + } + } + + private Vector3[] CreateVertices(float gap) + { + var numVerticesPerLine = numberOfTeeth_ * 2; + var numTotalLineVertices = numberOfTeeth_ * 4; + var currentPos = -1f; + var step = 2f / (numberOfTeeth_ - 1); + var width = (1f - gap) * step; + + var vertices = new Vector3[numTotalLineVertices]; + for (var i = 0; i < numberOfTeeth_ - 1; ++i) + { + var index = i * 2; + vertices[index] = new Vector3(currentPos, 0, 0); + vertices[index+1] = new Vector3(currentPos + width , 0, 0); + + vertices[index+numVerticesPerLine] = new Vector3(currentPos, 1, 0); + vertices[index+1+numVerticesPerLine] = new Vector3(currentPos + width, 1, 0); + + currentPos += step; + } + + return vertices; + } + + private int[] CreateIndices( ) + { + var numIndices = numberOfTeeth_ * 6; + + var offset = numberOfTeeth_ * 2; + var indices = new int[numIndices]; + var index = 0; + for (var i = 0; i < numberOfTeeth_; ++i) + { + var onset = i * 2; + indices[index++] = 0 + onset; + indices[index++] = offset + onset; + indices[index++] = 1 + onset; + + indices[index++] = offset + onset; + indices[index++] = offset + 1 + onset; + indices[index++] = 1 + onset; + } + + return indices; + } + + + } +} \ No newline at end of file diff --git a/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs.meta b/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs.meta new file mode 100644 index 0000000..33aa249 --- /dev/null +++ b/UnityProject/Assets/Scripts/Visualizer/CombMesh.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ba75af803c66466f9abcab717aeae230 +timeCreated: 1570103181 \ No newline at end of file diff --git a/UnityProject/Assets/Scripts/Visualizer/SpectrumVisualizer.cs b/UnityProject/Assets/Scripts/Visualizer/SpectrumVisualizer.cs new file mode 100644 index 0000000..00d65f1 --- /dev/null +++ b/UnityProject/Assets/Scripts/Visualizer/SpectrumVisualizer.cs @@ -0,0 +1,39 @@ +using UnityEngine; + +namespace cylvester +{ + + public interface ISpectrumVisualizer + { + float[] Spectrum { set; } + } + + [RequireComponent(typeof(MeshFilter))] + [RequireComponent(typeof(MeshRenderer))] + public class SpectrumVisualizer : MonoBehaviour, ISpectrumVisualizer + { + private MeshFilter meshFilter_; + private ICombMesh combMesh_; + + private void Start() + { + combMesh_ = new CombMesh(512, 0.1f); + + meshFilter_ = GetComponent(); + meshFilter_.mesh = new Mesh + { + vertices = combMesh_.Vertices, + triangles = combMesh_.Indices + }; + } + + public float[] Spectrum + { + set + { + combMesh_.Update(value); + meshFilter_.mesh.vertices = combMesh_.Vertices; + } + } + } +} \ No newline at end of file diff --git a/UnityProject/Assets/Scripts/Visualizer/SpectrumVisualizer.cs.meta b/UnityProject/Assets/Scripts/Visualizer/SpectrumVisualizer.cs.meta new file mode 100644 index 0000000..283b146 --- /dev/null +++ b/UnityProject/Assets/Scripts/Visualizer/SpectrumVisualizer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf3fc2a6c7d2914409368a4c9c00e818 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs b/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs new file mode 100644 index 0000000..92297cf --- /dev/null +++ b/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs @@ -0,0 +1,45 @@ +using UnityEngine; + +namespace cylvester +{ + public class WaterfallVisualizer : MonoBehaviour + { + private const int historySize = 32; + + [SerializeField] private PdBackend pdBackend; + [SerializeField] private GameObject spectrumPrefab; + [SerializeField, Range(1, 16)] private int channel = 1; + + private IPdArray spectrumArray_; + private ISpectrumVisualizer[] visualizers_; + private Transform[] transforms_; + private int head_; + + private void Start() + { + visualizers_ = new ISpectrumVisualizer[historySize]; + transforms_ = new Transform[historySize]; + + for (var i = 0; i < historySize; ++i) + { + var instance = Instantiate(spectrumPrefab, gameObject.transform, true); + transforms_[i] = instance.transform; + visualizers_[i] = instance.GetComponent(); + } + } + + public void Update() + { + spectrumArray_ = pdBackend.fftArrayContainer[channel-1]; + visualizers_[head_].Spectrum = spectrumArray_.Data; + head_++; + head_ %= historySize; + + for (var i = 0; i < historySize; ++i) + { + var index = (head_ + i) % historySize; + transforms_[index].localPosition = new Vector3(0, 0, 1f * i); + } + } + } +} \ No newline at end of file diff --git a/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs.meta b/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs.meta new file mode 100644 index 0000000..bd3a2bc --- /dev/null +++ b/UnityProject/Assets/Scripts/Visualizer/WaterfallVisualizer.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0c82a77964e24d32b62dbe21578d8d79 +timeCreated: 1570117849 \ No newline at end of file