diff --git a/Assets/Scenes/Bloody Mary.unity b/Assets/Scenes/Bloody Mary.unity new file mode 100644 index 0000000..86a1649 --- /dev/null +++ b/Assets/Scenes/Bloody Mary.unity @@ -0,0 +1,956 @@ +%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: 1 + m_AmbientMode: 3 + 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: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 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: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + 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 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &86118774 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 86118775} + - component: {fileID: 86118778} + - component: {fileID: 86118777} + - component: {fileID: 86118776} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &86118775 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86118774} + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 310813064} + m_Father: {fileID: 185592112} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -464.5, y: -238} + m_SizeDelta: {x: 160, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &86118776 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86118774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 86118777} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1068354137} + m_TargetAssemblyTypeName: BloodComputeShader, Assembly-CSharp + m_MethodName: createBloodTest + m_Mode: 3 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 100 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &86118777 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86118774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &86118778 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 86118774} + m_CullTransparentMesh: 1 +--- !u!1 &177158864 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 177158867} + - component: {fileID: 177158866} + - component: {fileID: 177158865} + m_Layer: 0 + m_Name: Triangle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &177158865 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 177158864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!212 &177158866 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 177158864} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 75f5f34dc1b5347e0b8351032682f224, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &177158867 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 177158864} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3.55, y: -2.32, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &185592108 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 185592112} + - component: {fileID: 185592111} + - component: {fileID: 185592110} + - component: {fileID: 185592109} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &185592109 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185592108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &185592110 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185592108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &185592111 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185592108} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &185592112 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 185592108} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 86118775} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &310813063 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 310813064} + - component: {fileID: 310813066} + - component: {fileID: 310813065} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &310813064 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310813063} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 86118775} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &310813065 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310813063} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Pluh! + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &310813066 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 310813063} + m_CullTransparentMesh: 1 +--- !u!1 &687809407 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 687809410} + - component: {fileID: 687809409} + - component: {fileID: 687809408} + m_Layer: 0 + m_Name: Triangle (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &687809408 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687809407} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!212 &687809409 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687809407} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 7482667652216324306, guid: 75f5f34dc1b5347e0b8351032682f224, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!4 &687809410 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 687809407} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -3.55, y: 2.49, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1068354136 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1068354138} + - component: {fileID: 1068354137} + m_Layer: 0 + m_Name: Blood + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1068354137 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068354136} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ae39a1b1f810ba7a5bcfe4290cc2bbd6, type: 3} + m_Name: + m_EditorClassIdentifier: + numParticles: 100000 + bloodCompute: {fileID: 7200000, guid: 99867deda8cf464cd87542adcc3c08f2, type: 3} + mesh: {fileID: 6466198060863859617, guid: 803eb7ed90ad4b9388c2563597bd6db2, type: 3} + instancedMaterial: {fileID: 2100000, guid: 0d09c46ae354e8c49b2688cc4325b256, type: 2} + size: 0.22 + activeParticles: 0 + score: 0 + CleanRadius: 2 + bufferLookPointer: 0 +--- !u!4 &1068354138 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1068354136} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1199570134 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1199570137} + - component: {fileID: 1199570136} + - component: {fileID: 1199570135} + - component: {fileID: 1199570138} + 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 &1199570135 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1199570134} + m_Enabled: 1 +--- !u!20 &1199570136 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1199570134} + 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_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + 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: 1 + 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: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1199570137 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1199570134} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1199570138 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1199570134} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + quality: 3 + frameInfluence: 0.1 + jitterScale: 1 + mipBias: 0 + varianceClampScale: 0.9 + contrastAdaptiveSharpening: 0 +--- !u!1 &1311093279 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1311093282} + - component: {fileID: 1311093281} + - component: {fileID: 1311093280} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1311093280 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1311093279} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1311093281 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1311093279} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1311093282 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1311093279} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1199570137} + - {fileID: 1068354138} + - {fileID: 185592112} + - {fileID: 1311093282} + - {fileID: 177158867} + - {fileID: 687809410} diff --git a/Assets/Scenes/Bloody Mary.unity.meta b/Assets/Scenes/Bloody Mary.unity.meta new file mode 100644 index 0000000..95ee748 --- /dev/null +++ b/Assets/Scenes/Bloody Mary.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dbc458177844bf1ceae76a97e08d3140 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/BloodComputeShader.cs b/Assets/Scripts/BloodComputeShader.cs new file mode 100644 index 0000000..8b7881d --- /dev/null +++ b/Assets/Scripts/BloodComputeShader.cs @@ -0,0 +1,229 @@ +using System.Collections; +using System.Collections.Generic; +using ComputeShaderUtility; +using UnityEngine; +using UnityEngine.Rendering; + +public struct Droplet +{ + public Vector3 position; + public Vector3 velocity; + public uint enabled; +} + +public class BloodComputeShader : MonoBehaviour +{ + public int numParticles = 1000; + + public ComputeShader bloodCompute; + public Mesh mesh; + public Material instancedMaterial; + public float size; + + public int activeParticles = 0; + public int score = 0; + + ComputeBuffer particleBuffer; + ComputeBuffer positionBuffer; + ComputeBuffer numParticlesConsumedBuffer; + ComputeBuffer argsBuffer; + + ComputeBuffer freeParticleBuffer; + + const int InitDustKernel = 0; + const int UpdateDustKernel = 1; + AsyncGPUReadbackRequest readbackRequest; + + AsyncGPUReadbackRequest freeBloodReadRequest; + + Mop mop1; + Mop mop2; + + public float CleanRadius = 2f; + + [SerializeField] + uint bufferLookPointer = 0; + + // Start is called before the first frame update + void Start() + { + var mops = FindObjectsByType(FindObjectsSortMode.None); + + mop1 = mops[0]; + mop2 = mops[1]; + + ComputeHelper.CreateStructuredBuffer(ref particleBuffer, numParticles); + ComputeHelper.CreateStructuredBuffer(ref positionBuffer, numParticles); + + Droplet[] particles = new Droplet[numParticles]; + for (int i = 0; i < numParticles; i++) + { + + particles[i] = new Droplet() { position = Vector3.zero, velocity = Vector3.zero, enabled = 0 }; + + } + + particleBuffer.SetData(particles); + bloodCompute.SetBuffer(UpdateDustKernel, "particles", particleBuffer); + bloodCompute.SetBuffer(UpdateDustKernel, "positions", positionBuffer); + + // Init dust particle positions + bloodCompute.SetBuffer(InitDustKernel, "particles", particleBuffer); + bloodCompute.SetBuffer(InitDustKernel, "positions", positionBuffer); + bloodCompute.SetInt("numParticles", numParticles); + + // Create args buffer + uint[] args = new uint[5]; + args[0] = (uint)mesh.GetIndexCount(0); + args[1] = (uint)numParticles; + args[2] = (uint)mesh.GetIndexStart(0); + args[3] = (uint)mesh.GetBaseVertex(0); + args[4] = 0; // offset + + argsBuffer = new ComputeBuffer(1, 5 * sizeof(uint), ComputeBufferType.IndirectArguments); + argsBuffer.SetData(args); + + ComputeHelper.CreateStructuredBuffer(ref numParticlesConsumedBuffer, 1); + numParticlesConsumedBuffer.SetData(new uint[] { 0 }); + bloodCompute.SetBuffer(UpdateDustKernel, "numParticlesConsumed", numParticlesConsumedBuffer); + + // Initialize with empty data + ComputeHelper.CreateStructuredBuffer(ref freeParticleBuffer, numParticles); + + RequestAsyncReadback(); + + instancedMaterial.SetBuffer("positionBuffer", positionBuffer); + } + + void RequestAsyncReadback() + { + readbackRequest = AsyncGPUReadback.Request(numParticlesConsumedBuffer); + } + + void RequestAllBloodStates() + { + freeBloodReadRequest = AsyncGPUReadback.Request(freeParticleBuffer); + } + + // Update is called once per frame + void Update() + { + bloodCompute.SetFloat("deltaTime", Time.deltaTime); + bloodCompute.SetInt("numParticles", numParticles); + bloodCompute.SetFloat("size", size); + bloodCompute.SetFloat("gravity", 9.8f); + bloodCompute.SetVector("mop1Pos", mop1.transform.position); + bloodCompute.SetVector("mop2Pos", mop2.transform.position); + bloodCompute.SetFloat("CleanRadius", CleanRadius); + + if (readbackRequest.hasError) + { + RequestAllBloodStates(); + Debug.Log("Async readback error"); + return; + } + + if (readbackRequest.done) + { + uint data = readbackRequest.GetData()[0]; + + if (data > 0) + { + + Debug.Log("Cleaned " + data); + + activeParticles -= (int)data; + + score += (int)data; + + // Reset counter + numParticlesConsumedBuffer.SetData(new uint[] { 0 }); + bloodCompute.SetBuffer(UpdateDustKernel, "numParticlesConsumed", numParticlesConsumedBuffer); + + } + RequestAsyncReadback(); + } + + ComputeHelper.Dispatch(bloodCompute, numParticles, 1, 1, UpdateDustKernel); + + Graphics.DrawMeshInstancedIndirect(mesh, 0, instancedMaterial, new Bounds(Vector3.zero, Vector3.one * 1000), argsBuffer); + } + + void FixedUpdate() + { + } + + public void createBlood(Vector3 wher, int muchies, float powah) + { + StartCoroutine(penisBlood(wher, muchies, powah)); + } + + IEnumerator penisBlood(Vector3 loc, int amount, float power) + { + RequestAllBloodStates(); + + // Wait until we get the state of all the particles from the gpu + while (!freeBloodReadRequest.done) + { + yield return new WaitForEndOfFrame(); + } + + // Find N particles which are disabled + + uint i = bufferLookPointer; + int found = 0; + + Droplet[] particles = new Droplet[numParticles]; + var as_Particles = freeBloodReadRequest.GetData().ToArray(); + // particleBuffer.GetData(particles); + + uint[] particleIndeces = new uint[amount]; + + // oof + while (i < numParticles) + { + if (as_Particles[i % numParticles].enabled == 0) + { // Found unused particle + particleIndeces[found] = i; + found++; + + if (found >= amount) + break; + } + + i++; + } + + bufferLookPointer = (uint)((bufferLookPointer + amount) % numParticles); + + // Debug.Log(string.Join(", ", particleIndeces)); + + // send data to gpu + freeParticleBuffer.SetData(particleIndeces); + bloodCompute.SetBuffer(InitDustKernel, "freeParticles", freeParticleBuffer); + + + // Test for race conditions + // yield return new WaitForSeconds(1.0f); + + bloodCompute.SetFloat("particleVel", power); + bloodCompute.SetVector("particleInitPos", loc); + bloodCompute.SetInt("particlesToInitialize", found); + + ComputeHelper.Dispatch(bloodCompute, amount, 1, 1, InitDustKernel); + + activeParticles += found; + + yield return null; + } + + void OnDestroy() + { + ComputeHelper.Release(particleBuffer, positionBuffer, argsBuffer, numParticlesConsumedBuffer, freeParticleBuffer); + } + + public void createBloodTest(int amount) + { + createBlood(Vector3.zero, amount, 10.0f); + } +} diff --git a/Assets/Scripts/BloodComputeShader.cs.meta b/Assets/Scripts/BloodComputeShader.cs.meta new file mode 100644 index 0000000..588e7c1 --- /dev/null +++ b/Assets/Scripts/BloodComputeShader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ae39a1b1f810ba7a5bcfe4290cc2bbd6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Compute Helper.meta b/Assets/Scripts/Compute Helper.meta new file mode 100644 index 0000000..a575d13 --- /dev/null +++ b/Assets/Scripts/Compute Helper.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d16fc9442ef85ca80bf65d5627a67f82 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Compute Helper/Channel.cs b/Assets/Scripts/Compute Helper/Channel.cs new file mode 100644 index 0000000..199b4fc --- /dev/null +++ b/Assets/Scripts/Compute Helper/Channel.cs @@ -0,0 +1,12 @@ +namespace ComputeShaderUtility +{ + + public enum Channel + { + Red, + Green, + Blue, + Alpha, + Zero + } +} diff --git a/Assets/Scripts/Compute Helper/Channel.cs.meta b/Assets/Scripts/Compute Helper/Channel.cs.meta new file mode 100644 index 0000000..a21dadf --- /dev/null +++ b/Assets/Scripts/Compute Helper/Channel.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 75ac0d6117304c67ca10449a6382dc84 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Compute Helper/ComputeHelper.cs b/Assets/Scripts/Compute Helper/ComputeHelper.cs new file mode 100644 index 0000000..c0b854b --- /dev/null +++ b/Assets/Scripts/Compute Helper/ComputeHelper.cs @@ -0,0 +1,372 @@ +namespace ComputeShaderUtility +{ + using UnityEngine; + using UnityEngine.Experimental.Rendering; + + // This class contains some helper functions to make life a little easier working with compute shaders + // (Very work-in-progress!) + + public static class ComputeHelper + { + + public const FilterMode defaultFilterMode = FilterMode.Bilinear; + public const GraphicsFormat defaultGraphicsFormat = GraphicsFormat.R32G32B32A32_SFloat; + + static ComputeShader normalizeTextureCompute; + static ComputeShader clearTextureCompute; + static ComputeShader swizzleTextureCompute; + static ComputeShader copy3DCompute; + + + + // Subscribe to this event to be notified when buffers created in edit mode should be released + // (i.e before script compilation occurs, and when exitting edit mode) + public static event System.Action shouldReleaseEditModeBuffers; + + /// Convenience method for dispatching a compute shader. + /// It calculates the number of thread groups based on the number of iterations needed. + public static void Dispatch(ComputeShader cs, int numIterationsX, int numIterationsY = 1, int numIterationsZ = 1, int kernelIndex = 0) + { + Vector3Int threadGroupSizes = GetThreadGroupSizes(cs, kernelIndex); + int numGroupsX = Mathf.CeilToInt(numIterationsX / (float)threadGroupSizes.x); + int numGroupsY = Mathf.CeilToInt(numIterationsY / (float)threadGroupSizes.y); + int numGroupsZ = Mathf.CeilToInt(numIterationsZ / (float)threadGroupSizes.y); + cs.Dispatch(kernelIndex, numGroupsX, numGroupsY, numGroupsZ); + } + + public static int GetStride() + { + return System.Runtime.InteropServices.Marshal.SizeOf(typeof(T)); + } + + + public static void CreateStructuredBuffer(ref ComputeBuffer buffer, int count) + { + int stride = System.Runtime.InteropServices.Marshal.SizeOf(typeof(T)); + bool createNewBuffer = buffer == null || !buffer.IsValid() || buffer.count != count || buffer.stride != stride; + if (createNewBuffer) + { + Release(buffer); + buffer = new ComputeBuffer(count, stride); + } + } + + public static void CreateStructuredBuffer(ref ComputeBuffer buffer, T[] data) + { + CreateStructuredBuffer(ref buffer, data.Length); + buffer.SetData(data); + } + + public static ComputeBuffer CreateAndSetBuffer(T[] data, ComputeShader cs, string nameID, int kernelIndex = 0) + { + ComputeBuffer buffer = null; + CreateAndSetBuffer(ref buffer, data, cs, nameID, kernelIndex); + return buffer; + } + + public static void CreateAndSetBuffer(ref ComputeBuffer buffer, T[] data, ComputeShader cs, string nameID, int kernelIndex = 0) + { + int stride = System.Runtime.InteropServices.Marshal.SizeOf(typeof(T)); + CreateStructuredBuffer(ref buffer, data.Length); + buffer.SetData(data); + cs.SetBuffer(kernelIndex, nameID, buffer); + } + + public static ComputeBuffer CreateAndSetBuffer(int length, ComputeShader cs, string nameID, int kernelIndex = 0) + { + ComputeBuffer buffer = null; + CreateAndSetBuffer(ref buffer, length, cs, nameID, kernelIndex); + return buffer; + } + + public static void CreateAndSetBuffer(ref ComputeBuffer buffer, int length, ComputeShader cs, string nameID, int kernelIndex = 0) + { + CreateStructuredBuffer(ref buffer, length); + cs.SetBuffer(kernelIndex, nameID, buffer); + } + + /// Releases supplied buffer/s if not null + public static void Release(params ComputeBuffer[] buffers) + { + for (int i = 0; i < buffers.Length; i++) + { + if (buffers[i] != null) + { + buffers[i].Release(); + } + } + } + + /// Releases supplied render textures/s if not null + public static void Release(params RenderTexture[] textures) + { + for (int i = 0; i < textures.Length; i++) + { + if (textures[i] != null) + { + textures[i].Release(); + } + } + } + + public static Vector3Int GetThreadGroupSizes(ComputeShader compute, int kernelIndex = 0) + { + uint x, y, z; + compute.GetKernelThreadGroupSizes(kernelIndex, out x, out y, out z); + return new Vector3Int((int)x, (int)y, (int)z); + } + + // ------ Texture Helpers ------ + + public static void CreateRenderTexture(ref RenderTexture texture, int width, int height) + { + CreateRenderTexture(ref texture, width, height, defaultFilterMode, defaultGraphicsFormat); + } + + + public static void CreateRenderTexture(ref RenderTexture texture, int width, int height, FilterMode filterMode, GraphicsFormat format, string name = "Unnamed") + { + if (texture == null || !texture.IsCreated() || texture.width != width || texture.height != height || texture.graphicsFormat != format) + { + if (texture != null) + { + texture.Release(); + } + texture = new RenderTexture(width, height, 0); + texture.graphicsFormat = format; + texture.enableRandomWrite = true; + + texture.autoGenerateMips = false; + texture.Create(); + } + texture.name = name; + texture.wrapMode = TextureWrapMode.Clamp; + texture.filterMode = filterMode; + } + + public static void CreateRenderTexture3D(ref RenderTexture texture, int size, string name = "Untitled") + { + var format = UnityEngine.Experimental.Rendering.GraphicsFormat.R16_SFloat; + if (texture == null || !texture.IsCreated() || texture.width != size || texture.height != size || texture.volumeDepth != size || texture.graphicsFormat != format) + { + //Debug.Log ("Create tex: update noise: " + updateNoise); + if (texture != null) + { + texture.Release(); + } + const int numBitsInDepthBuffer = 0; + texture = new RenderTexture(size, size, numBitsInDepthBuffer); + texture.graphicsFormat = format; + texture.volumeDepth = size; + texture.enableRandomWrite = true; + texture.dimension = UnityEngine.Rendering.TextureDimension.Tex3D; + texture.Create(); + } + texture.wrapMode = TextureWrapMode.Repeat; + texture.filterMode = FilterMode.Bilinear; + texture.name = name; + } + + /// Copy the contents of one render texture into another. Assumes textures are the same size. + public static void CopyRenderTexture(Texture source, RenderTexture target) + { + Graphics.Blit(source, target); + } + + /// Copy the contents of one render texture into another. Assumes textures are the same size. + public static void CopyRenderTexture3D(Texture source, RenderTexture target) + { + LoadComputeShader(ref copy3DCompute, "Copy3D"); + copy3DCompute.SetInts("dimensions", target.width, target.height, target.volumeDepth); + copy3DCompute.SetTexture(0, "Source", source); + copy3DCompute.SetTexture(0, "Target", target); + Dispatch(copy3DCompute, target.width, target.height, target.volumeDepth);// + + } + + + /// Swap channels of texture, or set to zero. For example, if inputs are: (green, red, zero, zero) + /// then red and green channels will be swapped, and blue and alpha channels will be set to zero. + public static void SwizzleTexture(Texture texture, Channel x, Channel y, Channel z, Channel w) + { + if (swizzleTextureCompute == null) + { + swizzleTextureCompute = (ComputeShader)Resources.Load("Swizzle"); + } + + swizzleTextureCompute.SetInt("width", texture.width); + swizzleTextureCompute.SetInt("height", texture.height); + swizzleTextureCompute.SetTexture(0, "Source", texture); + swizzleTextureCompute.SetVector("x", ChannelToMask(x)); + swizzleTextureCompute.SetVector("y", ChannelToMask(y)); + swizzleTextureCompute.SetVector("z", ChannelToMask(z)); + swizzleTextureCompute.SetVector("w", ChannelToMask(w)); + Dispatch(swizzleTextureCompute, texture.width, texture.height, 1, 0); + } + + /// Sets all pixels of supplied texture to 0 + public static void ClearRenderTexture(RenderTexture source) + { + LoadComputeShader(ref clearTextureCompute, "ClearTexture"); + + clearTextureCompute.SetInt("width", source.width); + clearTextureCompute.SetInt("height", source.height); + clearTextureCompute.SetTexture(0, "Source", source); + Dispatch(clearTextureCompute, source.width, source.height, 1, 0); + } + + /// Work in progress, currently only works with one channel and very slow + public static void NormalizeRenderTexture(RenderTexture source) + { + LoadComputeShader(ref normalizeTextureCompute, "NormalizeTexture"); + + normalizeTextureCompute.SetInt("width", source.width); + normalizeTextureCompute.SetInt("height", source.height); + normalizeTextureCompute.SetTexture(0, "Source", source); + normalizeTextureCompute.SetTexture(1, "Source", source); + + ComputeBuffer minMaxBuffer = CreateAndSetBuffer(new int[] { int.MaxValue, 0 }, normalizeTextureCompute, "minMaxBuffer", 0); + normalizeTextureCompute.SetBuffer(1, "minMaxBuffer", minMaxBuffer); + + Dispatch(normalizeTextureCompute, source.width, source.height, 1, 0); + Dispatch(normalizeTextureCompute, source.width, source.height, 1, 1); + + //int[] data = new int[2]; + //minMaxBuffer.GetData(data); + //Debug.Log(data[0] + " " + data[1]); + + Release(minMaxBuffer); + } + + // https://cmwdexint.com/2017/12/04/computeshader-setfloats/ + public static float[] PackFloats(params float[] values) + { + float[] packed = new float[values.Length * 4]; + for (int i = 0; i < values.Length; i++) + { + packed[i * 4] = values[i]; + } + return values; + } + + // Only run compute shaders if this is true + // This is only relevant for compute shaders that run outside of playmode + public static bool CanRunEditModeCompute + { + get + { + return CheckIfCanRunInEditMode(); + } + } + + // Set all values from settings object on the shader. Note, variable names must be an exact match in the shader. + // Settings object can be any class/struct containing vectors/ints/floats/bools + public static void SetParams(System.Object settings, ComputeShader shader, string variableNamePrefix = "", string variableNameSuffix = "") + { + var fields = settings.GetType().GetFields(); + foreach (var field in fields) + { + var fieldType = field.FieldType; + string shaderVariableName = variableNamePrefix + field.Name + variableNameSuffix; + + if (fieldType == typeof(UnityEngine.Vector4) || fieldType == typeof(Vector3) || fieldType == typeof(Vector2)) + { + shader.SetVector(shaderVariableName, (Vector4)field.GetValue(settings)); + } + else if (fieldType == typeof(int)) + { + shader.SetInt(shaderVariableName, (int)field.GetValue(settings)); + } + else if (fieldType == typeof(float)) + { + shader.SetFloat(shaderVariableName, (float)field.GetValue(settings)); + } + else if (fieldType == typeof(bool)) + { + shader.SetBool(shaderVariableName, (bool)field.GetValue(settings)); + } + else + { + Debug.Log($"Type {fieldType} not implemented"); + } + } + } + + + + static Vector4 ChannelToMask(Channel channel) + { + switch (channel) + { + case Channel.Red: + return new Vector4(1, 0, 0, 0); + case Channel.Green: + return new Vector4(0, 1, 0, 0); + case Channel.Blue: + return new Vector4(0, 0, 1, 0); + case Channel.Alpha: + return new Vector4(0, 0, 0, 1); + case Channel.Zero: + return new Vector4(0, 0, 0, 0); + default: + return Vector4.zero; + } + } + + static void LoadComputeShader(ref ComputeShader shader, string name) + { + if (shader == null) + { + shader = (ComputeShader)Resources.Load(name); + } + } + + + // Editor helpers: + +#if UNITY_EDITOR + static UnityEditor.PlayModeStateChange playModeState; + + static ComputeHelper() + { + // Monitor play mode state + UnityEditor.EditorApplication.playModeStateChanged -= MonitorPlayModeState; + UnityEditor.EditorApplication.playModeStateChanged += MonitorPlayModeState; + // Monitor script compilation + UnityEditor.Compilation.CompilationPipeline.compilationStarted -= OnCompilationStarted; + UnityEditor.Compilation.CompilationPipeline.compilationStarted += OnCompilationStarted; + } + + static void MonitorPlayModeState(UnityEditor.PlayModeStateChange state) + { + playModeState = state; + if (state == UnityEditor.PlayModeStateChange.ExitingEditMode) + { + if (shouldReleaseEditModeBuffers != null) + { + shouldReleaseEditModeBuffers(); // + } + } + } + + static void OnCompilationStarted(System.Object obj) + { + if (shouldReleaseEditModeBuffers != null) + { + shouldReleaseEditModeBuffers(); + } + } +#endif + + static bool CheckIfCanRunInEditMode() + { + bool isCompilingOrExitingEditMode = false; +#if UNITY_EDITOR + isCompilingOrExitingEditMode |= UnityEditor.EditorApplication.isCompiling; + isCompilingOrExitingEditMode |= playModeState == UnityEditor.PlayModeStateChange.ExitingEditMode; +#endif + bool canRun = !isCompilingOrExitingEditMode; + return canRun; + } + } +} diff --git a/Assets/Scripts/Compute Helper/ComputeHelper.cs.meta b/Assets/Scripts/Compute Helper/ComputeHelper.cs.meta new file mode 100644 index 0000000..eaee615 --- /dev/null +++ b/Assets/Scripts/Compute Helper/ComputeHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f6d587b8d79646d2e892003e62b67307 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ComputeShaders.meta b/Assets/Scripts/ComputeShaders.meta new file mode 100644 index 0000000..fde82b4 --- /dev/null +++ b/Assets/Scripts/ComputeShaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6492179fee5e58e6add7b0ab96056dd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ComputeShaders/BloodCompute.compute b/Assets/Scripts/ComputeShaders/BloodCompute.compute new file mode 100644 index 0000000..12590bb --- /dev/null +++ b/Assets/Scripts/ComputeShaders/BloodCompute.compute @@ -0,0 +1,132 @@ +#pragma kernel InitDust +#pragma kernel UpdateDust + +struct Particle { + float3 position; + float3 velocity; + uint enabled; +}; + +RWStructuredBuffer positions; +RWStructuredBuffer particles; +RWStructuredBuffer numParticlesConsumed; +RWStructuredBuffer freeParticles; +uint numParticles; +uint particlesToInitialize; +float3 particleInitPos; +float deltaTime; +// float3 attractPos; +// float3 xAxis; +// float attractRadius; +// float attractForce; + +float3 mop1Pos; +float3 mop2Pos; + +float CleanRadius; + +float size; +float gravity; +float particleVel; + +// Hash function www.cs.ubc.ca/~rbridson/docs/schechter-sca08-turbulence.pdf +uint hash(uint state) +{ + state ^= 2747636419u; + state *= 2654435769u; + state ^= state >> 16; + state *= 2654435769u; + state ^= state >> 16; + state *= 2654435769u; + return state; +} + +float scaleToRange01(uint state) +{ + return state / 4294967295.0; +} + + +[numthreads(64,1,1)] +void InitDust (uint3 id : SV_DispatchThreadID) +{ + if (id.x > particlesToInitialize) { + return; + } + + uint i = freeParticles[id.x]; + + // if (particles[id.x].enabled != 0 || numParticlesInitialized[0] >= numParticles ) { + while (i <= numParticles) { + if (i == numParticles) { + return; + } + + if (particles[i].enabled == 0) { + break; + } + + i++; + } + + uint randState = i; + + randState = hash(randState); + float dv = scaleToRange01(randState) * 3.14f*2.0f; + float dx = cos(dv); + float dy = sin(dv); + randState = hash(randState); + float dz = scaleToRange01(randState); + + float3 nvel = float3(dx, dy, dz) * particleVel; + + randState = hash(randState); + nvel.xy *= scaleToRange01(randState); + + particles[i].velocity = nvel; + + particles[i].position = particleInitPos; + particles[i].enabled = 1; + positions[i] = float4(particles[i].position, 1 * size); + // particles[i].position = positions[i].xyz; + + // InterlockedAdd(numParticlesInitialized[0],1); +} + +[numthreads(64,1,1)] +void UpdateDust (uint3 id : SV_DispatchThreadID) +{ + uint i = id.x; + + if (particles[i].enabled == 0) { + return; + } + + float3 pos = particles[i].position; + + if (particles[i].position.z > 0) { + particles[i].velocity.z -= gravity * deltaTime; + } else { + particles[i].velocity -= particles[i].velocity * deltaTime * 15; + + + float3 offset1 = mop1Pos - pos; + offset1.z = 0; + float dist1 = dot(offset1, offset1); + + float3 offset2 = mop2Pos - pos; + offset2.z = 0; + float dist2 = dot(offset2, offset2); + + float dist = min(dist1, dist2); + + if (dist < CleanRadius) { + particles[i].enabled = 0; + InterlockedAdd(numParticlesConsumed[0],1); + } + } + + particles[i].position += particles[i].velocity * deltaTime; + positions[i] = float4(particles[i].position, particles[i].enabled * size); +} + diff --git a/Assets/Scripts/ComputeShaders/BloodCompute.compute.meta b/Assets/Scripts/ComputeShaders/BloodCompute.compute.meta new file mode 100644 index 0000000..5ad2b1d --- /dev/null +++ b/Assets/Scripts/ComputeShaders/BloodCompute.compute.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 99867deda8cf464cd87542adcc3c08f2 +ComputeShaderImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dust.blend b/Assets/Scripts/Dust.blend new file mode 100644 index 0000000..9a1bf30 Binary files /dev/null and b/Assets/Scripts/Dust.blend differ diff --git a/Assets/Scripts/Dust.blend.meta b/Assets/Scripts/Dust.blend.meta new file mode 100644 index 0000000..6f0937b --- /dev/null +++ b/Assets/Scripts/Dust.blend.meta @@ -0,0 +1,109 @@ +fileFormatVersion: 2 +guid: 803eb7ed90ad4b9388c2563597bd6db2 +ModelImporter: + serializedVersion: 22200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dust.blend1 b/Assets/Scripts/Dust.blend1 new file mode 100644 index 0000000..3854838 Binary files /dev/null and b/Assets/Scripts/Dust.blend1 differ diff --git a/Assets/Scripts/Dust.blend1.meta b/Assets/Scripts/Dust.blend1.meta new file mode 100644 index 0000000..82956af --- /dev/null +++ b/Assets/Scripts/Dust.blend1.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8ae14ba256def45b8a6943fc4a194a25 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Dust.mat b/Assets/Scripts/Dust.mat new file mode 100644 index 0000000..9430376 --- /dev/null +++ b/Assets/Scripts/Dust.mat @@ -0,0 +1,83 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Dust + m_Shader: {fileID: 4800000, guid: 40faca80867901d8292aa8afa1ff218e, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + 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_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0 + - _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: 0.8490566, g: 0.18431373, b: 0.16862746, a: 0.24705882} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Scripts/Dust.mat.meta b/Assets/Scripts/Dust.mat.meta new file mode 100644 index 0000000..58c4f43 --- /dev/null +++ b/Assets/Scripts/Dust.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d09c46ae354e8c49b2688cc4325b256 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/DustShader.shader b/Assets/Scripts/DustShader.shader new file mode 100644 index 0000000..7c5a118 --- /dev/null +++ b/Assets/Scripts/DustShader.shader @@ -0,0 +1,75 @@ +Shader "Instanced/DustShader" { + Properties { + _Color ("Colour", Color) = (1,1,1,1) + } + SubShader { + + Tags {"Queue"="Geometry" "IgnoreProjector"="True" "RenderType"="Transparent"} + ZWrite Off + Lighting Off + Fog { Mode Off } + + Blend SrcAlpha OneMinusSrcAlpha + + + Pass { + + CGPROGRAM + + #pragma vertex vert + #pragma fragment frag + #pragma multi_compile_fwdbase nolightmap nodirlightmap nodynlightmap novertexlight + #pragma target 4.5 + + #include "UnityCG.cginc" + #include "UnityLightingCommon.cginc" + #include "AutoLight.cginc" + + float4 _Color; + + #if SHADER_TARGET >= 45 + StructuredBuffer positionBuffer; + #endif + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + }; + + v2f vert (appdata_full v, uint instanceID : SV_InstanceID) + { + #if SHADER_TARGET >= 45 + float4 data = positionBuffer[instanceID]; + #else + float4 data = 0; + #endif + + float3 localPosition = v.vertex.xzy * data.w; + float3 worldPosition = data.xyz + localPosition; + worldPosition.y += worldPosition.z; + worldPosition.z = 0; + + v2f o; + o.pos = mul(UNITY_MATRIX_VP, float4(worldPosition, 1.0f)); + o.uv = v.texcoord; + return o; + } + + fixed4 frag (v2f i) : SV_Target + { + float2 offsetFromCentre = 0.5 - i.uv; + float r = length(offsetFromCentre) * 2; + float alpha = smoothstep(1,0.5,r); + //float alpha = max(0, 1 - (length(offsetFromCentre) * 2)); + //alpha = 1; + // float a = min(0.1f, _Color.a); + fixed4 col = float4(_Color.rgb, alpha * _Color.a); + + return col; + } + + ENDCG + } + } +} diff --git a/Assets/Scripts/DustShader.shader.meta b/Assets/Scripts/DustShader.shader.meta new file mode 100644 index 0000000..e0c358b --- /dev/null +++ b/Assets/Scripts/DustShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 40faca80867901d8292aa8afa1ff218e +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Mop.cs b/Assets/Scripts/Mop.cs new file mode 100644 index 0000000..00a35cc --- /dev/null +++ b/Assets/Scripts/Mop.cs @@ -0,0 +1,8 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Mop : MonoBehaviour +{ + // Empy +} diff --git a/Assets/Scripts/Mop.cs.meta b/Assets/Scripts/Mop.cs.meta new file mode 100644 index 0000000..af7cc60 --- /dev/null +++ b/Assets/Scripts/Mop.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b097a132c072b72fbc7808ebf263e52 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TextMesh Pro.meta b/Assets/TextMesh Pro.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Documentation.meta b/Assets/TextMesh Pro/Documentation.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf b/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta b/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Fonts.meta b/Assets/TextMesh Pro/Fonts.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt b/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta b/Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Fonts/LiberationSans.ttf b/Assets/TextMesh Pro/Fonts/LiberationSans.ttf old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta b/Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources.meta b/Assets/TextMesh Pro/Resources.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials.meta b/Assets/TextMesh Pro/Resources/Fonts & Materials.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta b/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt b/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta b/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt b/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta b/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Sprite Assets.meta b/Assets/TextMesh Pro/Resources/Sprite Assets.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset b/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta b/Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Style Sheets.meta b/Assets/TextMesh Pro/Resources/Style Sheets.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset b/Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/TMP Settings.asset b/Assets/TextMesh Pro/Resources/TMP Settings.asset old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Resources/TMP Settings.asset.meta b/Assets/TextMesh Pro/Resources/TMP Settings.asset.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders.meta b/Assets/TextMesh Pro/Shaders.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader b/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Custom-Atlas.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader b/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_Bitmap-Mobile.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader b/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_Bitmap.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF Overlay.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF SSD.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Masking.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile Overlay.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile SSD.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-Mobile.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface-Mobile.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-Surface.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF.shader b/Assets/TextMesh Pro/Shaders/TMP_SDF.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader b/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta b/Assets/TextMesh Pro/Shaders/TMP_Sprite.shader.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro.cginc b/Assets/TextMesh Pro/Shaders/TMPro.cginc old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta b/Assets/TextMesh Pro/Shaders/TMPro.cginc.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc b/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta b/Assets/TextMesh Pro/Shaders/TMPro_Mobile.cginc.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc b/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta b/Assets/TextMesh Pro/Shaders/TMPro_Properties.cginc.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc b/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta b/Assets/TextMesh Pro/Shaders/TMPro_Surface.cginc.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Sprites.meta b/Assets/TextMesh Pro/Sprites.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt b/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt old mode 100644 new mode 100755 index 384180a..10c4be3 --- a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt +++ b/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt @@ -1,3 +1,3 @@ -This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ - +This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ + Please visit their website to view the complete set of their emojis and review their licensing terms. \ No newline at end of file diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta b/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.json b/Assets/TextMesh Pro/Sprites/EmojiOne.json old mode 100644 new mode 100755 index 6c4e50b..16c800d --- a/Assets/TextMesh Pro/Sprites/EmojiOne.json +++ b/Assets/TextMesh Pro/Sprites/EmojiOne.json @@ -1,156 +1,156 @@ -{"frames": [ - -{ - "filename": "1f60a.png", - "frame": {"x":0,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f60b.png", - "frame": {"x":128,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f60d.png", - "frame": {"x":256,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f60e.png", - "frame": {"x":384,"y":0,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f600.png", - "frame": {"x":0,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f601.png", - "frame": {"x":128,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f602.png", - "frame": {"x":256,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f603.png", - "frame": {"x":384,"y":128,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f604.png", - "frame": {"x":0,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f605.png", - "frame": {"x":128,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f606.png", - "frame": {"x":256,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f609.png", - "frame": {"x":384,"y":256,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f618.png", - "frame": {"x":0,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "1f923.png", - "frame": {"x":128,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "263a.png", - "frame": {"x":256,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}, -{ - "filename": "2639.png", - "frame": {"x":384,"y":384,"w":128,"h":128}, - "rotated": false, - "trimmed": false, - "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, - "sourceSize": {"w":128,"h":128}, - "pivot": {"x":0.5,"y":0.5} -}], -"meta": { - "app": "http://www.codeandweb.com/texturepacker", - "version": "1.0", - "image": "EmojiOne.png", - "format": "RGBA8888", - "size": {"w":512,"h":512}, - "scale": "1", - "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$" -} -} +{"frames": [ + +{ + "filename": "1f60a.png", + "frame": {"x":0,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f60b.png", + "frame": {"x":128,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f60d.png", + "frame": {"x":256,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f60e.png", + "frame": {"x":384,"y":0,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f600.png", + "frame": {"x":0,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f601.png", + "frame": {"x":128,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f602.png", + "frame": {"x":256,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f603.png", + "frame": {"x":384,"y":128,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f604.png", + "frame": {"x":0,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f605.png", + "frame": {"x":128,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f606.png", + "frame": {"x":256,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f609.png", + "frame": {"x":384,"y":256,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f618.png", + "frame": {"x":0,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "1f923.png", + "frame": {"x":128,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "263a.png", + "frame": {"x":256,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}, +{ + "filename": "2639.png", + "frame": {"x":384,"y":384,"w":128,"h":128}, + "rotated": false, + "trimmed": false, + "spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, + "sourceSize": {"w":128,"h":128}, + "pivot": {"x":0.5,"y":0.5} +}], +"meta": { + "app": "http://www.codeandweb.com/texturepacker", + "version": "1.0", + "image": "EmojiOne.png", + "format": "RGBA8888", + "size": {"w":512,"h":512}, + "scale": "1", + "smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$" +} +} diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta b/Assets/TextMesh Pro/Sprites/EmojiOne.json.meta old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.png b/Assets/TextMesh Pro/Sprites/EmojiOne.png old mode 100644 new mode 100755 diff --git a/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta b/Assets/TextMesh Pro/Sprites/EmojiOne.png.meta old mode 100644 new mode 100755 diff --git a/Packages/manifest.json b/Packages/manifest.json index 39a06c6..7e622d8 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -10,6 +10,7 @@ "com.unity.test-framework": "1.1.33", "com.unity.textmeshpro": "3.0.6", "com.unity.timeline": "1.7.6", + "com.unity.toolchain.linux-x86_64": "2.0.6", "com.unity.ugui": "1.0.0", "com.unity.visualscripting": "1.9.1", "com.unity.modules.ai": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index f1b3bba..4b6f8bd 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -232,6 +232,22 @@ "com.unity.searcher": "4.9.2" } }, + "com.unity.sysroot": { + "version": "2.0.7", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.sysroot.linux-x86_64": { + "version": "2.0.6", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.sysroot": "2.0.7" + }, + "url": "https://packages.unity.com" + }, "com.unity.test-framework": { "version": "1.1.33", "depth": 0, @@ -264,6 +280,16 @@ }, "url": "https://packages.unity.com" }, + "com.unity.toolchain.linux-x86_64": { + "version": "2.0.6", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.sysroot": "2.0.7", + "com.unity.sysroot.linux-x86_64": "2.0.6" + }, + "url": "https://packages.unity.com" + }, "com.unity.ugui": { "version": "1.0.0", "depth": 0,