├── .gitignore ├── Assets ├── Audio.wav ├── Audio.wav.meta ├── Material.mat ├── Material.mat.meta ├── Render Pipeline Asset.asset ├── Render Pipeline Asset.asset.meta ├── Scene.unity ├── Scene.unity.meta ├── Source.meta └── Source │ ├── Audio.cs │ ├── Audio.cs.meta │ ├── CustomRenderPipeline.cs │ ├── CustomRenderPipeline.cs.meta │ ├── CustomRenderPipelineAsset.cs │ ├── CustomRenderPipelineAsset.cs.meta │ ├── Lib.meta │ ├── Lib │ ├── Coordinates.hlsl │ ├── Coordinates.hlsl.meta │ ├── GameObjects.hlsl │ ├── GameObjects.hlsl.meta │ ├── Input.hlsl │ ├── Input.hlsl.meta │ ├── Persistence.hlsl │ ├── Persistence.hlsl.meta │ ├── Physics.hlsl │ ├── Physics.hlsl.meta │ ├── Pong.hlsl │ ├── Pong.hlsl.meta │ ├── Rendering.hlsl │ ├── Rendering.hlsl.meta │ ├── Vertex.hlsl │ └── Vertex.hlsl.meta │ ├── PongShader.shader │ └── PongShader.shader.meta ├── LICENSE ├── Packages ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── BurstAotSettings_StandaloneWindows.json ├── ClusterInputManager.asset ├── CommonBurstAotSettings.json ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── MemorySettings.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── SceneTemplateSettings.json ├── ShaderGraphSettings.asset ├── TagManager.asset ├── TimeManager.asset ├── URPProjectSettings.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Uu]ser[Ss]ettings/ 12 | 13 | # MemoryCaptures can get excessive in size. 14 | # They also could contain extremely sensitive data 15 | /[Mm]emoryCaptures/ 16 | 17 | # Recordings can get excessive in size 18 | /[Rr]ecordings/ 19 | 20 | # Uncomment this line if you wish to ignore the asset store tools plugin 21 | # /[Aa]ssets/AssetStoreTools* 22 | 23 | # Autogenerated Jetbrains Rider plugin 24 | /[Aa]ssets/Plugins/Editor/JetBrains* 25 | 26 | # Visual Studio cache directory 27 | .vs/ 28 | 29 | # Gradle cache directory 30 | .gradle/ 31 | 32 | # Autogenerated VS/MD/Consulo solution and project files 33 | ExportedObj/ 34 | .consulo/ 35 | *.csproj 36 | *.unityproj 37 | *.sln 38 | *.suo 39 | *.tmp 40 | *.user 41 | *.userprefs 42 | *.pidb 43 | *.booproj 44 | *.svd 45 | *.pdb 46 | *.mdb 47 | *.opendb 48 | *.VC.db 49 | 50 | # Unity3D generated meta files 51 | *.pidb.meta 52 | *.pdb.meta 53 | *.mdb.meta 54 | 55 | # Unity3D generated file on crash reports 56 | sysinfo.txt 57 | 58 | # Builds 59 | *.apk 60 | *.aab 61 | *.unitypackage 62 | *.app 63 | 64 | # Crashlytics generated file 65 | crashlytics-build.properties 66 | 67 | # Packed Addressables 68 | /[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* 69 | 70 | # Temporary auto-generated Android Assets 71 | /[Aa]ssets/[Ss]treamingAssets/aa.meta 72 | /[Aa]ssets/[Ss]treamingAssets/aa/* 73 | 74 | .idea/ 75 | .DS_Store 76 | -------------------------------------------------------------------------------- /Assets/Audio.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KyleBanks/shader-pong/624f6178fb8e9be01af6b9cfb4cc61e8d92905d3/Assets/Audio.wav -------------------------------------------------------------------------------- /Assets/Audio.wav.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc30ccbc8f0934629b6748d3d698aa94 3 | AudioImporter: 4 | externalObjects: {} 5 | serializedVersion: 6 6 | defaultSettings: 7 | loadType: 0 8 | sampleRateSetting: 0 9 | sampleRateOverride: 44100 10 | compressionFormat: 1 11 | quality: 1 12 | conversionMode: 0 13 | platformSettingOverrides: {} 14 | forceToMono: 0 15 | normalize: 1 16 | preloadAudioData: 1 17 | loadInBackground: 0 18 | ambisonic: 0 19 | 3D: 1 20 | userData: 21 | assetBundleName: 22 | assetBundleVariant: 23 | -------------------------------------------------------------------------------- /Assets/Material.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Material 11 | m_Shader: {fileID: 4800000, guid: 1f52a9f53bafb4a0eb30c530df1f317b, type: 3} 12 | m_Parent: {fileID: 0} 13 | m_ModifiedSerializedProperties: 0 14 | m_ValidKeywords: [] 15 | m_InvalidKeywords: [] 16 | m_LightmapFlags: 4 17 | m_EnableInstancingVariants: 0 18 | m_DoubleSidedGI: 0 19 | m_CustomRenderQueue: -1 20 | stringTagMap: {} 21 | disabledShaderPasses: [] 22 | m_LockedProperties: _TestTex 23 | m_SavedProperties: 24 | serializedVersion: 3 25 | m_TexEnvs: 26 | - _MainTex: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _TestTex: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | m_Ints: [] 35 | m_Floats: 36 | - _AISpeed: 0.2 37 | - _BallRadius: 0.05 38 | - _BallSize: 0.02 39 | - _BallSpeed: 0.2 40 | - _DebugMemory: 0 41 | - _GameSpeed: 1 42 | - _MaxVolume: 1 43 | - _Multiplayer: 0 44 | - _NewGame: 0 45 | - _PaddleOffsetX: 0.08 46 | - _PauseGame: 0 47 | - _Player1: 0 48 | - _Player1PaddlePos: 0.39 49 | - _Player2: 0 50 | - _Player2PaddlePos: 0.534 51 | - _ScoreOffsetX: 0.1 52 | - _ScoreOffsetY: 0.1 53 | - _ScoreSpacing: 0.03 54 | - _ShadowSteps: 150 55 | - _VignetteRadius: 0.553 56 | - _VolumeDecaySpeed: 1.53 57 | m_Colors: 58 | - _BackgroundColor: {r: 0.4078431, g: 0.5170923, b: 0.8392157, a: 0} 59 | - _BackgroundColorInner: {r: 0.1344178, g: 0.11814703, b: 0.4245283, a: 0} 60 | - _BackgroundColorOuter: {r: 0.051049262, g: 0.04360982, b: 0.18867922, a: 0} 61 | - _BallColor: {r: 1, g: 1, b: 1, a: 1} 62 | - _BallSize: {r: 0.05, g: 0.05, b: 0, a: 0} 63 | - _BallStartPos: {r: 0.5, g: 0.7, b: 0, a: 0} 64 | - _Light: {r: 0.5, g: 0.5, b: 0, a: 0} 65 | - _ObjectColor: {r: 1, g: 1, b: 1, a: 1} 66 | - _PaddleColor: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} 67 | - _PaddleSize: {r: 0.01, g: 0.15, b: 0, a: 0} 68 | - _ScoreColor: {r: 0.8207547, g: 0.8207547, b: 0.8207547, a: 1} 69 | - _ScoreSize: {r: 0.005, g: 0.01, b: 0, a: 0} 70 | - _ScoreSpacing: {r: 0.02, g: 0.02, b: 0, a: 0} 71 | - _ShadowColor: {r: 0.12149655, g: 0.070309706, b: 0.18867922, a: 0.65882355} 72 | - _Vignette: {r: 0.050980344, g: 0.043137193, b: 0.139, a: 0.6666667} 73 | m_BuildTextureStacks: [] 74 | -------------------------------------------------------------------------------- /Assets/Material.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c449973efff394af9a4bef0ef868be82 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Render Pipeline Asset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: e3ec2aa39fff84b7ab4b519bff9b76ae, type: 3} 13 | m_Name: Render Pipeline Asset 14 | m_EditorClassIdentifier: 15 | Material: {fileID: 2100000, guid: c449973efff394af9a4bef0ef868be82, type: 2} 16 | -------------------------------------------------------------------------------- /Assets/Render Pipeline Asset.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 700540befca0f43909989a33577e7f05 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.12731689, g: 0.13414702, b: 0.1210784, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 256 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 1 83 | m_PVRDenoiserTypeDirect: 1 84 | m_PVRDenoiserTypeIndirect: 1 85 | m_PVRDenoiserTypeAO: 1 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 1 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 0} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &330585543 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 330585546} 135 | - component: {fileID: 330585545} 136 | m_Layer: 0 137 | m_Name: Main Camera 138 | m_TagString: MainCamera 139 | m_Icon: {fileID: 0} 140 | m_NavMeshLayer: 0 141 | m_StaticEditorFlags: 0 142 | m_IsActive: 1 143 | --- !u!20 &330585545 144 | Camera: 145 | m_ObjectHideFlags: 0 146 | m_CorrespondingSourceObject: {fileID: 0} 147 | m_PrefabInstance: {fileID: 0} 148 | m_PrefabAsset: {fileID: 0} 149 | m_GameObject: {fileID: 330585543} 150 | m_Enabled: 1 151 | serializedVersion: 2 152 | m_ClearFlags: 4 153 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 154 | m_projectionMatrixMode: 1 155 | m_GateFitMode: 2 156 | m_FOVAxisMode: 0 157 | m_SensorSize: {x: 36, y: 24} 158 | m_LensShift: {x: 0, y: 0} 159 | m_FocalLength: 50 160 | m_NormalizedViewPortRect: 161 | serializedVersion: 2 162 | x: 0 163 | y: 0 164 | width: 1 165 | height: 1 166 | near clip plane: 0.01 167 | far clip plane: 0.02 168 | field of view: 0.00001 169 | orthographic: 0 170 | orthographic size: 0 171 | m_Depth: -1 172 | m_CullingMask: 173 | serializedVersion: 2 174 | m_Bits: 0 175 | m_RenderingPath: -1 176 | m_TargetTexture: {fileID: 0} 177 | m_TargetDisplay: 0 178 | m_TargetEye: 3 179 | m_HDR: 0 180 | m_AllowMSAA: 0 181 | m_AllowDynamicResolution: 0 182 | m_ForceIntoRT: 0 183 | m_OcclusionCulling: 0 184 | m_StereoConvergence: 10 185 | m_StereoSeparation: 0.022 186 | --- !u!4 &330585546 187 | Transform: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | m_GameObject: {fileID: 330585543} 193 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 194 | m_LocalPosition: {x: 0, y: 1, z: -10} 195 | m_LocalScale: {x: 1, y: 1, z: 1} 196 | m_ConstrainProportionsScale: 0 197 | m_Children: [] 198 | m_Father: {fileID: 0} 199 | m_RootOrder: 0 200 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 201 | --- !u!1 &1577821799 202 | GameObject: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | serializedVersion: 6 208 | m_Component: 209 | - component: {fileID: 1577821803} 210 | - component: {fileID: 1577821801} 211 | - component: {fileID: 1577821802} 212 | - component: {fileID: 1577821800} 213 | m_Layer: 0 214 | m_Name: Audio 215 | m_TagString: Untagged 216 | m_Icon: {fileID: 0} 217 | m_NavMeshLayer: 0 218 | m_StaticEditorFlags: 0 219 | m_IsActive: 1 220 | --- !u!81 &1577821800 221 | AudioListener: 222 | m_ObjectHideFlags: 0 223 | m_CorrespondingSourceObject: {fileID: 0} 224 | m_PrefabInstance: {fileID: 0} 225 | m_PrefabAsset: {fileID: 0} 226 | m_GameObject: {fileID: 1577821799} 227 | m_Enabled: 1 228 | --- !u!114 &1577821801 229 | MonoBehaviour: 230 | m_ObjectHideFlags: 0 231 | m_CorrespondingSourceObject: {fileID: 0} 232 | m_PrefabInstance: {fileID: 0} 233 | m_PrefabAsset: {fileID: 0} 234 | m_GameObject: {fileID: 1577821799} 235 | m_Enabled: 1 236 | m_EditorHideFlags: 0 237 | m_Script: {fileID: 11500000, guid: b8ee3ad5d89984a2085b271530836f65, type: 3} 238 | m_Name: 239 | m_EditorClassIdentifier: 240 | RenderPipeline: {fileID: 11400000, guid: 700540befca0f43909989a33577e7f05, type: 2} 241 | MemoryBlock: {x: 3, y: 0} 242 | --- !u!82 &1577821802 243 | AudioSource: 244 | m_ObjectHideFlags: 0 245 | m_CorrespondingSourceObject: {fileID: 0} 246 | m_PrefabInstance: {fileID: 0} 247 | m_PrefabAsset: {fileID: 0} 248 | m_GameObject: {fileID: 1577821799} 249 | m_Enabled: 1 250 | serializedVersion: 4 251 | OutputAudioMixerGroup: {fileID: 0} 252 | m_audioClip: {fileID: 8300000, guid: dc30ccbc8f0934629b6748d3d698aa94, type: 3} 253 | m_PlayOnAwake: 1 254 | m_Volume: 1 255 | m_Pitch: 1 256 | Loop: 0 257 | Mute: 0 258 | Spatialize: 0 259 | SpatializePostEffects: 0 260 | Priority: 128 261 | DopplerLevel: 1 262 | MinDistance: 1 263 | MaxDistance: 500 264 | Pan2D: 0 265 | rolloffMode: 0 266 | BypassEffects: 0 267 | BypassListenerEffects: 0 268 | BypassReverbZones: 0 269 | rolloffCustomCurve: 270 | serializedVersion: 2 271 | m_Curve: 272 | - serializedVersion: 3 273 | time: 0 274 | value: 1 275 | inSlope: 0 276 | outSlope: 0 277 | tangentMode: 0 278 | weightedMode: 0 279 | inWeight: 0.33333334 280 | outWeight: 0.33333334 281 | - serializedVersion: 3 282 | time: 1 283 | value: 0 284 | inSlope: 0 285 | outSlope: 0 286 | tangentMode: 0 287 | weightedMode: 0 288 | inWeight: 0.33333334 289 | outWeight: 0.33333334 290 | m_PreInfinity: 2 291 | m_PostInfinity: 2 292 | m_RotationOrder: 4 293 | panLevelCustomCurve: 294 | serializedVersion: 2 295 | m_Curve: 296 | - serializedVersion: 3 297 | time: 0 298 | value: 0 299 | inSlope: 0 300 | outSlope: 0 301 | tangentMode: 0 302 | weightedMode: 0 303 | inWeight: 0.33333334 304 | outWeight: 0.33333334 305 | m_PreInfinity: 2 306 | m_PostInfinity: 2 307 | m_RotationOrder: 4 308 | spreadCustomCurve: 309 | serializedVersion: 2 310 | m_Curve: 311 | - serializedVersion: 3 312 | time: 0 313 | value: 0 314 | inSlope: 0 315 | outSlope: 0 316 | tangentMode: 0 317 | weightedMode: 0 318 | inWeight: 0.33333334 319 | outWeight: 0.33333334 320 | m_PreInfinity: 2 321 | m_PostInfinity: 2 322 | m_RotationOrder: 4 323 | reverbZoneMixCustomCurve: 324 | serializedVersion: 2 325 | m_Curve: 326 | - serializedVersion: 3 327 | time: 0 328 | value: 1 329 | inSlope: 0 330 | outSlope: 0 331 | tangentMode: 0 332 | weightedMode: 0 333 | inWeight: 0.33333334 334 | outWeight: 0.33333334 335 | m_PreInfinity: 2 336 | m_PostInfinity: 2 337 | m_RotationOrder: 4 338 | --- !u!4 &1577821803 339 | Transform: 340 | m_ObjectHideFlags: 0 341 | m_CorrespondingSourceObject: {fileID: 0} 342 | m_PrefabInstance: {fileID: 0} 343 | m_PrefabAsset: {fileID: 0} 344 | m_GameObject: {fileID: 1577821799} 345 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 346 | m_LocalPosition: {x: 0, y: 0, z: 0} 347 | m_LocalScale: {x: 1, y: 1, z: 1} 348 | m_ConstrainProportionsScale: 0 349 | m_Children: [] 350 | m_Father: {fileID: 0} 351 | m_RootOrder: 1 352 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 353 | -------------------------------------------------------------------------------- /Assets/Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc13af70161ec408595e6eed45015034 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Source/Audio.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using Unity.Collections; 4 | using UnityEngine.Rendering; 5 | using UnityEngine.Experimental.Rendering; 6 | 7 | [RequireComponent(typeof(AudioSource))] 8 | public class Audio : MonoBehaviour 9 | { 10 | 11 | const float MEMORY_BLOCK_SIZE = .015f; 12 | const float MEMORY_BLOCK_SPACING = .05f; 13 | 14 | public CustomRenderPipelineAsset RenderPipeline; 15 | public Vector2 MemoryBlock = new(3, 0); 16 | 17 | private AudioSource _audio; 18 | private NativeArray _bufferArr; 19 | private Texture2D _bufferTex; 20 | 21 | private void Awake() 22 | { 23 | this._audio = this.GetComponent(); 24 | this._bufferArr = new NativeArray(4, Allocator.Persistent, NativeArrayOptions.UninitializedMemory); 25 | } 26 | 27 | private void OnEnable() 28 | { 29 | this.SetVolume(0); 30 | this.SampleVolume(); 31 | } 32 | 33 | private void OnDestroy() 34 | { 35 | AsyncGPUReadback.WaitAllRequests(); 36 | this._bufferArr.Dispose(); 37 | 38 | if (this._bufferTex != null) 39 | Destroy(this._bufferTex); 40 | } 41 | 42 | private void SetVolume(float volume) 43 | => this._audio.volume = volume; 44 | 45 | private void SampleVolume() 46 | { 47 | Camera camera = Camera.main; 48 | RenderTexture frameTex = this.RenderPipeline.GetLatestFrameTexture(camera); 49 | 50 | if (this._bufferTex == null) 51 | { 52 | TextureFormat tf = GraphicsFormatUtility.GetTextureFormat(frameTex.graphicsFormat); 53 | this._bufferTex = new Texture2D(1, 1, tf, false, true); 54 | this._bufferTex.hideFlags = HideFlags.HideAndDontSave; 55 | } 56 | 57 | // reconstruct the block position 58 | Vector2 blockPos = this.MemoryBlock * MEMORY_BLOCK_SIZE 59 | + ((this.MemoryBlock + Vector2.one) * MEMORY_BLOCK_SPACING); 60 | 61 | int x = Mathf.RoundToInt(blockPos.x * camera.pixelWidth); 62 | int y = Mathf.RoundToInt(blockPos.y * camera.pixelHeight); 63 | 64 | // copy one pixel from the render texture on the GPU 65 | Graphics.CopyTexture( 66 | frameTex, 67 | 0, 0, x, y, 1, 1, 68 | this._bufferTex, 69 | 0, 0, 0, 0 70 | ); 71 | 72 | // load the pixel back onto the CPU async 73 | AsyncGPUReadback.RequestIntoNativeArray(ref this._bufferArr, this._bufferTex, 0, this.OnSampleComplete); 74 | } 75 | 76 | private void OnSampleComplete(AsyncGPUReadbackRequest req) 77 | { 78 | if (this == null || !this.isActiveAndEnabled) 79 | return; 80 | 81 | if (req.hasError) 82 | { 83 | Debug.LogError("Failed to sample volume"); 84 | return; 85 | } 86 | 87 | // set volume equal to the alpha channel of the pixel 88 | this.SetVolume(this._bufferArr[3]); 89 | 90 | // recursively sample volume 91 | this.SampleVolume(); 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /Assets/Source/Audio.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8ee3ad5d89984a2085b271530836f65 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Source/CustomRenderPipeline.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Rendering; 3 | 4 | [System.Serializable] 5 | public class CustomRenderPipeline : RenderPipeline 6 | { 7 | 8 | private static readonly int SHADER_PARAM_SCREEN_PARAMS = Shader.PropertyToID("_ScreenParams"); 9 | private static readonly int SHADER_PARAM_TIME = Shader.PropertyToID("_Time"); 10 | private static readonly int SHADER_PARAM_SIN_TIME = Shader.PropertyToID("_SinTime"); 11 | private static readonly int DOUBLE_BUFFER_ID = Shader.PropertyToID("_DoubleBuffer"); 12 | 13 | private readonly CommandBuffer _commandBuffer; 14 | private readonly Material _material; 15 | 16 | private RenderTexture _frameTex; 17 | 18 | public CustomRenderPipeline(Material material) 19 | { 20 | this._commandBuffer = new CommandBuffer(); 21 | this._material = material; 22 | } 23 | 24 | // Render all active cameras 25 | protected override void Render(ScriptableRenderContext ctx, Camera[] cameras) 26 | { 27 | this.SetTime(Time.time); 28 | 29 | for (int i = 0; i < cameras.Length; i++) 30 | { 31 | Camera camera = cameras[i]; 32 | if (!camera.CompareTag("MainCamera")) 33 | continue; 34 | 35 | this.SetCamera(camera); 36 | this.Render(ctx, camera); 37 | } 38 | } 39 | 40 | // Render a specific camera 41 | private void Render(ScriptableRenderContext ctx, Camera camera) 42 | { 43 | RenderTexture lastFrame = this.GetLatestFrameTexture(camera); 44 | this._commandBuffer.Clear(); 45 | 46 | // windows requires double-buffering, can't blit the frame over itself! 47 | #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN 48 | this._commandBuffer.GetTemporaryRT(DOUBLE_BUFFER_ID, lastFrame.descriptor); 49 | this._commandBuffer.Blit(lastFrame, DOUBLE_BUFFER_ID, this._material); 50 | this._commandBuffer.Blit(DOUBLE_BUFFER_ID, lastFrame); 51 | this._commandBuffer.ReleaseTemporaryRT(DOUBLE_BUFFER_ID); 52 | #else 53 | this._commandBuffer.Blit(lastFrame, lastFrame, this._material); 54 | #endif 55 | 56 | this._commandBuffer.Blit(lastFrame, BuiltinRenderTextureType.CameraTarget); 57 | 58 | ctx.ExecuteCommandBuffer(this._commandBuffer); 59 | ctx.Submit(); 60 | } 61 | 62 | public RenderTexture GetLatestFrameTexture(Camera camera) 63 | { 64 | int width = camera.pixelWidth; 65 | int height = camera.pixelHeight; 66 | 67 | if (this._frameTex != null && (this._frameTex.width != width || this._frameTex.height != height)) 68 | { 69 | this._frameTex.Release(); 70 | Object.Destroy(this._frameTex); 71 | this._frameTex = null; 72 | } 73 | 74 | if (this._frameTex == null) 75 | this._frameTex = new RenderTexture(camera.pixelWidth, camera.pixelHeight, 0, RenderTextureFormat.ARGBFloat); 76 | 77 | return this._frameTex; 78 | } 79 | 80 | // Standard Unity time shader parameters 81 | // https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html 82 | private void SetTime(float t) 83 | { 84 | Shader.SetGlobalVector(SHADER_PARAM_TIME, new Vector4( 85 | t / 20, t, t * 2, t * 3 86 | )); 87 | Shader.SetGlobalVector(SHADER_PARAM_SIN_TIME, new Vector4( 88 | Mathf.Sin(t / 8), 89 | Mathf.Sin(t / 4), 90 | Mathf.Sin(t / 2), 91 | Mathf.Sin(t) 92 | )); 93 | } 94 | 95 | // Standard Unity camera shader parameters 96 | // https://docs.unity3d.com/Manual/SL-UnityShaderVariables.html 97 | private void SetCamera(Camera camera) 98 | { 99 | Shader.SetGlobalVector(SHADER_PARAM_SCREEN_PARAMS, new Vector2( 100 | camera.pixelWidth, camera.pixelHeight 101 | )); 102 | } 103 | 104 | } -------------------------------------------------------------------------------- /Assets/Source/CustomRenderPipeline.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85cd302017c4740f9891dd12a3fc0d96 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Source/CustomRenderPipelineAsset.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Rendering; 3 | 4 | [CreateAssetMenu(menuName = "Rendering/Custom Render Pipeline")] 5 | public class CustomRenderPipelineAsset : RenderPipelineAsset 6 | { 7 | 8 | public Material Material; 9 | 10 | private CustomRenderPipeline _pipeline; 11 | 12 | protected override RenderPipeline CreatePipeline() 13 | { 14 | this._pipeline = new CustomRenderPipeline(this.Material); 15 | return this._pipeline; 16 | } 17 | 18 | public RenderTexture GetLatestFrameTexture(Camera camera) 19 | => this._pipeline.GetLatestFrameTexture(camera); 20 | 21 | } -------------------------------------------------------------------------------- /Assets/Source/CustomRenderPipelineAsset.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3ec2aa39fff84b7ab4b519bff9b76ae 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Source/Lib.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d521e9b469a9b4b8db2ae6b472779ae3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Coordinates.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef COORDINATES_INCLUDED 2 | #define COORDINATES_INCLUDED 3 | 4 | // Convert a point from UV to Pixel space. 5 | float2 UVToPixels(float2 uv) 6 | { 7 | return float2(_ScreenParams.x * uv.x, _ScreenParams.y * uv.y); 8 | } 9 | 10 | // Convert a point from Pixel to UV space. 11 | float2 PixelsToUV(float2 pixels) 12 | { 13 | return float2(pixels.x / _ScreenParams.x, pixels.y / _ScreenParams.y); 14 | } 15 | 16 | // Create a UV point that represents a square in its equivalent Pixel space, regardless of resolution. 17 | float2 SquareUV(float len) 18 | { 19 | float2 size = UVToPixels(len.xx); 20 | size.x = size.y = min(size.x, size.y); 21 | return PixelsToUV(size); 22 | } 23 | 24 | // Returns true if the UV point is contained within a rect defined in Pixel space. 25 | bool InPixelRect(float2 center, float2 extents, float2 uv) 26 | { 27 | uv = UVToPixels(uv); 28 | return (abs(center.x - uv.x) < extents.x) * (abs(center.y - uv.y) < extents.y); 29 | } 30 | 31 | // Returns true if the UV point is contained within a rect defined in UV space. 32 | bool InUVRect(float2 center, float2 extents, float2 uv) 33 | { 34 | center = UVToPixels(center); 35 | extents = UVToPixels(extents); 36 | return InPixelRect(center, extents, uv); 37 | } 38 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Coordinates.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf1aa127437454f009d9171828fea924 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/GameObjects.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef GAMEOBJECTS_INCLUDED 2 | #define GAMEOBJECTS_INCLUDED 3 | 4 | #define MAX_GAME_OBJECTS 3 5 | 6 | struct GameObjects 7 | { 8 | int NumObjects; 9 | float4 Objects[MAX_GAME_OBJECTS]; 10 | }; 11 | 12 | void RegisterGameObject(inout GameObjects gameObjects, float2 center, float2 extents) 13 | { 14 | gameObjects.Objects[gameObjects.NumObjects] = float4( 15 | UVToPixels(center), 16 | UVToPixels(extents) 17 | ); 18 | gameObjects.NumObjects ++; 19 | } 20 | 21 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/GameObjects.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: accd0069c02464088843630e25e3f5ba 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Input.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef INPUT_INCLUDED 2 | #define INPUT_INCLUDED 3 | 4 | // Recreate Standard Unity Input 5 | // 6 | float2 _ScreenParams; 7 | float4 _Time; 8 | float4 _SinTime; 9 | 10 | float4 unity_DeltaTime; 11 | float4x4 unity_ObjectToWorld; 12 | float4x4 unity_MatrixVP; 13 | 14 | // Vertex Input 15 | // 16 | struct Attributes 17 | { 18 | float4 vertex : POSITION; 19 | float2 uv : TEXCOORD0; 20 | }; 21 | 22 | // Frag Input 23 | // 24 | struct Varyings 25 | { 26 | float4 vertex : SV_POSITION; 27 | float2 uv : TEXCOORD0; 28 | }; 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | // Material Input 37 | // 38 | Texture2D _MainTex; 39 | SamplerState sampler_MainTex; 40 | 41 | cbuffer UnityPerMaterial 42 | { 43 | float _GameSpeed; 44 | 45 | float2 _BallStartPos; 46 | float3 _BackgroundColor; 47 | float3 _ObjectColor; 48 | 49 | float4 _Vignette; 50 | float2 _Light; 51 | float4 _ShadowColor; 52 | 53 | float _BallSize; 54 | float _BallSpeed; 55 | 56 | float _AISpeed; 57 | 58 | float _PaddleOffsetX; 59 | float2 _PaddleSize; 60 | float _Player1PaddlePos; 61 | float _Player2PaddlePos; 62 | 63 | float _ScoreOffsetX; 64 | float _ScoreOffsetY; 65 | float2 _ScoreSize; 66 | float _ScoreSpacing; 67 | float4 _ScoreColor; 68 | 69 | float _MaxVolume; 70 | float _VolumeDecaySpeed; 71 | }; 72 | 73 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Input.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 593009e6da961400bafd739418eb936a 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Persistence.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef PERSISTENCE_INCLUDED 2 | #define PERSISTENCE_INCLUDED 3 | 4 | struct GameState 5 | { 6 | bool Started; 7 | 8 | float2 BallPos; 9 | float2 BallVelocity; 10 | float2 Player1Pos; 11 | float2 Player2Pos; 12 | int2 Score; 13 | 14 | float Volume; 15 | }; 16 | 17 | #define MEMORY_BLOCK_SIZE .015 18 | #define MEMORY_BLOCK_SPACING .05 19 | #define MEMORY_BLOCK_POS(slot) \ 20 | slot * MEMORY_BLOCK_SIZE + ((slot + 1) * MEMORY_BLOCK_SPACING) 21 | 22 | #define GAME_STARTED_BLOCK MEMORY_BLOCK_POS(int2(0, 0)) 23 | #define BALL_POS_X_BLOCK MEMORY_BLOCK_POS(int2(0, 1)) 24 | #define BALL_POS_Y_BLOCK MEMORY_BLOCK_POS(int2(0, 2)) 25 | #define BALL_VEL_X_BLOCK MEMORY_BLOCK_POS(int2(0, 3)) 26 | #define BALL_VEL_Y_BLOCK MEMORY_BLOCK_POS(int2(0, 4)) 27 | #define P1_PADDLE_POS_BLOCK MEMORY_BLOCK_POS(int2(1, 0)) 28 | #define P2_PADDLE_POS_BLOCK MEMORY_BLOCK_POS(int2(1, 1)) 29 | #define SCORE_P1_BLOCK MEMORY_BLOCK_POS(int2(2, 0)) 30 | #define SCORE_P2_BLOCK MEMORY_BLOCK_POS(int2(2, 1)) 31 | #define VOLUME_BLOCK MEMORY_BLOCK_POS(int2(3, 0)) 32 | 33 | float SampleGameState(float2 block) 34 | { 35 | #ifdef NEW_GAME 36 | return 0; 37 | #else 38 | return _MainTex.Sample(sampler_MainTex, block).a; 39 | #endif 40 | } 41 | 42 | GameState LoadGameState() 43 | { 44 | GameState gameState = (GameState) 0; 45 | gameState.Started = SampleGameState(GAME_STARTED_BLOCK) > 0.5; 46 | gameState.BallPos = float2( 47 | SampleGameState(BALL_POS_X_BLOCK), 48 | SampleGameState(BALL_POS_Y_BLOCK) 49 | ); 50 | gameState.BallVelocity = float2( 51 | SampleGameState(BALL_VEL_X_BLOCK), 52 | SampleGameState(BALL_VEL_Y_BLOCK) 53 | ); 54 | 55 | gameState.Player1Pos.x = _PaddleOffsetX; 56 | #ifdef PLAYER_1 57 | gameState.Player1Pos.y = _Player1PaddlePos; 58 | #else 59 | gameState.Player1Pos.y = SampleGameState(P1_PADDLE_POS_BLOCK); 60 | #endif 61 | 62 | gameState.Player2Pos.x = 1 - _PaddleOffsetX; 63 | #ifdef PLAYER_2 64 | gameState.Player2Pos.y = _Player2PaddlePos; 65 | #else 66 | gameState.Player2Pos.y = SampleGameState(P2_PADDLE_POS_BLOCK); 67 | #endif 68 | 69 | gameState.Score = int2( 70 | round(SampleGameState(SCORE_P1_BLOCK)), 71 | round(SampleGameState(SCORE_P2_BLOCK)) 72 | ); 73 | 74 | gameState.Volume = SampleGameState(VOLUME_BLOCK); 75 | 76 | return gameState; 77 | } 78 | 79 | float SaveGameState(GameState gameState, float2 uv) 80 | { 81 | float2 blockSize = SquareUV(MEMORY_BLOCK_SIZE); 82 | if (InUVRect(GAME_STARTED_BLOCK, blockSize, uv)) 83 | return gameState.Started; 84 | if (InUVRect(BALL_POS_X_BLOCK, blockSize, uv)) 85 | return gameState.BallPos.x; 86 | if (InUVRect(BALL_POS_Y_BLOCK, blockSize, uv)) 87 | return gameState.BallPos.y; 88 | if (InUVRect(BALL_VEL_X_BLOCK, blockSize, uv)) 89 | return gameState.BallVelocity.x; 90 | if (InUVRect(BALL_VEL_Y_BLOCK, blockSize, uv)) 91 | return gameState.BallVelocity.y; 92 | if (InUVRect(P1_PADDLE_POS_BLOCK, blockSize, uv)) 93 | return gameState.Player1Pos.y; 94 | if (InUVRect(P2_PADDLE_POS_BLOCK, blockSize, uv)) 95 | return gameState.Player2Pos.y; 96 | if (InUVRect(SCORE_P1_BLOCK, blockSize, uv)) 97 | return gameState.Score.x; 98 | if (InUVRect(SCORE_P2_BLOCK, blockSize, uv)) 99 | return gameState.Score.y; 100 | if (InUVRect(VOLUME_BLOCK, blockSize, uv)) 101 | return gameState.Volume; 102 | return 0; 103 | } 104 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Persistence.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9569ebe3b10bf4306a11b2c6527a3e59 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Physics.hlsl: -------------------------------------------------------------------------------- 1 | // _lineLine and _lineRect adapted from jeffreythompson.org under the 2 | // Creative Commons Attribution, Non-Commercial, Share-Alike license. 3 | 4 | #ifndef PHYSICS_INCLUDED 5 | #define PHYSICS_INCLUDED 6 | 7 | // returns true if the two lines intersect, and populates the collision point. 8 | // http://www.jeffreythompson.org/collision-detection/line-line.php 9 | bool _lineLine(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, out float2 collision) 10 | { 11 | // calculate the distance to intersection point 12 | float uA = ((x4-x3)*(y1-y3) - (y4-y3)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1)); 13 | float uB = ((x2-x1)*(y1-y3) - (y2-y1)*(x1-x3)) / ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1)); 14 | 15 | // if uA and uB are between 0-1, lines are colliding 16 | bool hit = uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1; 17 | if (hit) 18 | collision = float2(x1 + (uA * (x2-x1)), y1 + (uA * (y2-y1))); 19 | return hit; 20 | } 21 | 22 | // returns true if the line intersects the rect, and populates the collision point. 23 | // http://www.jeffreythompson.org/collision-detection/line-rect.php 24 | bool _lineRect(float x1, float y1, float x2, float y2, float rx, float ry, float rw, float rh, out float2 collision) 25 | { 26 | bool left = _lineLine(x1, y1, x2, y2, rx - rw, ry - rh, rx - rw, ry + rh, collision); 27 | if (left) 28 | return true; 29 | bool right = _lineLine(x1, y1, x2, y2, rx + rw, ry - rh, rx + rw, ry + rh, collision); 30 | if (right) 31 | return true; 32 | bool top = _lineLine(x1, y1, x2, y2, rx - rw, ry + rh, rx + rw, ry + rh, collision); 33 | if (top) 34 | return true; 35 | bool bottom = _lineLine(x1, y1, x2, y2, rx - rw, ry - rh, rx + rw, ry - rh, collision); 36 | if (bottom) 37 | return true; 38 | 39 | return false; 40 | } 41 | 42 | bool LineCollides(GameObjects physicsObjects, float2 start, float2 end, out float2 collision) 43 | { 44 | start = UVToPixels(start); 45 | end = UVToPixels(end); 46 | 47 | for (int i = 0; i < physicsObjects.NumObjects; i++) 48 | { 49 | float4 object = physicsObjects.Objects[i]; 50 | if (_lineRect(start.x, start.y, end.x, end.y, object.x, object.y, object.z, object.w, collision)) 51 | { 52 | collision = PixelsToUV(collision); 53 | return true; 54 | } 55 | } 56 | return false; 57 | } 58 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Physics.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c46e38e6ab3d4bb893713056838b1f3 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Pong.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef PONG_INCLUDED 2 | #define PONG_INCLUDED 3 | 4 | void ResetBall(inout GameState gameState) 5 | { 6 | gameState.BallPos = _BallStartPos; 7 | gameState.BallVelocity = float2( 8 | floor(_Time.y) % 2 == 0 ? 1 : -1, 9 | _SinTime.y 10 | ); 11 | } 12 | 13 | void StartGame(inout GameState gameState) 14 | { 15 | if (gameState.Started) 16 | return; 17 | 18 | gameState.Started = true; 19 | gameState.Player1Pos.y = 0.5; 20 | gameState.Player2Pos.y = 0.5; 21 | gameState.Score = int2(0, 0); 22 | ResetBall(gameState); 23 | } 24 | 25 | void UpdateAI(inout float2 pos, GameState gameState, float deltaTime) 26 | { 27 | float2 ballEndPos = gameState.BallPos + (gameState.BallVelocity * 10); 28 | float2 targetPos = 0; 29 | if (!_lineLine(pos.x, -100, pos.x, 100, gameState.BallPos.x, gameState.BallPos.y, ballEndPos.x, ballEndPos.y, targetPos)) 30 | return; 31 | 32 | float targetDir = sign(targetPos.y - pos.y); 33 | float targetDist = abs(targetPos.y - pos.y); 34 | float movement = targetDir * min(targetDist, _AISpeed * deltaTime); 35 | pos.y = saturate(pos.y + movement); 36 | } 37 | 38 | void UpdateGame(inout GameState gameState, float deltaTime) 39 | { 40 | #if defined(NEW_GAME) || defined(PAUSE_GAME) 41 | return; 42 | #endif 43 | 44 | // apply velocity 45 | float2 previousBallPos = gameState.BallPos; 46 | gameState.BallPos += gameState.BallVelocity * deltaTime * _BallSpeed; 47 | 48 | // update AI paddles 49 | #ifndef PLAYER_1 50 | UpdateAI(gameState.Player1Pos, gameState, deltaTime); 51 | #endif 52 | #ifndef PLAYER_2 53 | UpdateAI(gameState.Player2Pos, gameState, deltaTime); 54 | #endif 55 | 56 | // check for paddle collisions 57 | GameObjects paddles = (GameObjects) 0; 58 | RegisterGameObject(paddles, gameState.Player1Pos, _PaddleSize); 59 | RegisterGameObject(paddles, gameState.Player2Pos, _PaddleSize); 60 | 61 | // check the line from previous to current position so you can't jump through the paddles 62 | float2 paddleCollisionPoint = 0; 63 | bool collision = LineCollides(paddles, previousBallPos, gameState.BallPos, paddleCollisionPoint); 64 | // flip the ball direction on paddle hit 65 | if (collision) 66 | { 67 | float2 ballSize = SquareUV(_BallSize); 68 | gameState.BallPos = paddleCollisionPoint - float2( 69 | // add a slight buffer to avoid getting stuck inside paddle 70 | sign(gameState.BallVelocity.x) * ballSize.x * 1.01, 71 | 0 72 | ); 73 | gameState.BallVelocity.x *= -1; 74 | } 75 | 76 | // update volume, decaying if no collision 77 | gameState.Volume = max( 78 | collision ? _MaxVolume : 0, 79 | gameState.Volume - deltaTime * _VolumeDecaySpeed 80 | ); 81 | 82 | // scoring 83 | if (gameState.BallPos.x < 0) 84 | { 85 | gameState.Score.y ++; 86 | ResetBall(gameState); 87 | } 88 | else if (gameState.BallPos.x > 1) 89 | { 90 | gameState.Score.x ++; 91 | ResetBall(gameState); 92 | } 93 | // handle vertical boundaries 94 | else if (gameState.BallPos.y < 0 || gameState.BallPos.y > 1) 95 | { 96 | gameState.BallPos.y = saturate(gameState.BallPos.y); 97 | gameState.BallVelocity.y *= -1; 98 | } 99 | } 100 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Pong.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66dd19d93d4ac4b44911074868f5b1d2 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Rendering.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef RENDERING_INCLUDED 2 | #define RENDERING_INCLUDED 3 | 4 | void DrawBackground(inout float3 output, float2 uv) 5 | { 6 | // vignette based on distance to center of the screen 7 | float t = distance(uv, float2(0.5, 0.5)) / _Vignette.a; 8 | output = lerp( 9 | _BackgroundColor, 10 | _Vignette.rgb, 11 | t 12 | ); 13 | } 14 | 15 | void DrawShadows(inout float3 output, float2 uv, GameObjects shadowCasters) 16 | { 17 | // check for collision between the current pixel and the light source 18 | // if a collision is found, then we're in a shadow 19 | float2 _; 20 | bool shadow = LineCollides(shadowCasters, uv, _Light, _); 21 | output = lerp( 22 | output, 23 | _ShadowColor.rgb, 24 | shadow * _ShadowColor.a 25 | ); 26 | } 27 | 28 | void DrawObjects(inout float3 output, float2 uv, GameObjects gameObjects) 29 | { 30 | for (int i = 0; i < gameObjects.NumObjects; i++) 31 | { 32 | float4 object = gameObjects.Objects[i]; 33 | if (InPixelRect(object.xy, object.zw, uv)) 34 | output = _ObjectColor; 35 | } 36 | } 37 | 38 | void DrawUI(inout float3 output, float2 uv, int2 fullScore) 39 | { 40 | int score; 41 | float spacingX; 42 | float2 startPos; 43 | if (uv.x < 0.5) 44 | { 45 | score = fullScore.x; 46 | spacingX = _ScoreSpacing; 47 | startPos = float2(_ScoreOffsetX, _ScoreOffsetY); 48 | } 49 | else 50 | { 51 | score = fullScore.y; 52 | spacingX = - _ScoreSpacing; 53 | startPos = float2(1 - _ScoreOffsetX, _ScoreOffsetY); 54 | } 55 | 56 | int rowLen = (int) floor((0.5 - _ScoreOffsetX) / (_ScoreSize + _ScoreSpacing)); 57 | float2 currentPos = startPos; 58 | for (int i = 1; i <= score; i++) 59 | { 60 | if (InUVRect(currentPos, _ScoreSize, uv)) 61 | { 62 | output = _ScoreColor.rgb; 63 | return; 64 | } 65 | 66 | if (i % rowLen == 0) 67 | { 68 | currentPos.x = startPos.x; 69 | currentPos.y += _ScoreSpacing; 70 | } 71 | else 72 | { 73 | currentPos.x += spacingX; 74 | } 75 | } 76 | } 77 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Rendering.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7b434e148c954e89ac506f8886ff14f 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/Lib/Vertex.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef VERTEX_INCLUDED 2 | #define VERTEX_INCLUDED 3 | 4 | Varyings vert(Attributes i) 5 | { 6 | Varyings o; 7 | o.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, i.vertex)); 8 | o.uv = i.uv.xy; 9 | return o; 10 | } 11 | 12 | #endif -------------------------------------------------------------------------------- /Assets/Source/Lib/Vertex.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb68edca54d3a43839699c49dc3553dd 3 | ShaderIncludeImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Source/PongShader.shader: -------------------------------------------------------------------------------- 1 | Shader "Pong/Final" 2 | { 3 | Properties 4 | { 5 | [HideInInspector] _MainTex("Texture", 2D) = "black" {} 6 | [Toggle(DEBUG_MEMORY)] _DebugMemory("Debug Memory", Float) = 0 7 | [Toggle(NEW_GAME)] _NewGame("New Game", Float) = 0 8 | [Toggle(PAUSE_GAME)] _PauseGame("Pause Game", Float) = 0 9 | _GameSpeed("Game Speed", Range(0, 10)) = 1 10 | 11 | [Header(AI)] 12 | _AISpeed("AI Speed", Range(0, 1)) = 0.1 13 | 14 | [Header(Player 1)] 15 | [Toggle(PLAYER_1)] _Player1("Player 1", Float) = 1.0 16 | _Player1PaddlePos("Paddle Pos", Range(0, 1)) = 0.5 17 | 18 | [Header(Player 2)] 19 | [Toggle(PLAYER_2)] _Player2("Player 2", Float) = 0.0 20 | _Player2PaddlePos("Paddle Pos", Range(0, 1)) = 0.5 21 | 22 | [Header(Color)] 23 | _BackgroundColor("Background Color", Color) = (0, 0, 0, 0) 24 | _ObjectColor("Object Color", Color) = (1, 1, 1, 1) 25 | 26 | [Header(Lighting)] 27 | _Vignette("Vignette (rgb=color, a=radius)", Color) = (0, 0, 0, 0.5) 28 | _Light("Light (xy=position)", Vector) = (0.5, 1, 0, 0) 29 | _ShadowColor("Shadow Color (a=intensity)", Color) = (0, 0, 0, 0) 30 | 31 | [Header(Ball)] 32 | _BallStartPos("Ball Start Pos", Vector) = (0.5, 0.7, 0, 0) 33 | _BallSize("Ball Size", Range(0, 1)) = 0.05 34 | _BallSpeed("Ball Speed", Range(0, 5)) = 0.05 35 | 36 | [Header(Paddles)] 37 | _PaddleOffsetX("Paddle Offset X", Range(0, 1)) = 0.05 38 | _PaddleSize("Paddle Size", Vector) = (0.05, 0.2, 0, 0) 39 | 40 | [Header(Score)] 41 | _ScoreOffsetX("Score Offset X", Range(0, 1)) = 0.1 42 | _ScoreOffsetY("Score Offset Y", Range(0, 1)) = 0.1 43 | _ScoreSize("Score Size", Vector) = (0.01, 0.01, 0, 0) 44 | _ScoreSpacing("Score Spacing", Range(0, 1)) = 0.02 45 | _ScoreColor("Score Color", Color) = (1, 1, 1, 1) 46 | 47 | [Header(Volume)] 48 | _MaxVolume("Max Volume", Range(0.0, 1.0)) = 1.0 49 | _VolumeDecaySpeed("Volume Decay Speed", Range(0.0, 2.0)) = 0.2 50 | } 51 | SubShader 52 | { 53 | Pass 54 | { 55 | Name "Pong" 56 | 57 | HLSLPROGRAM 58 | 59 | #pragma vertex vert 60 | #pragma fragment frag 61 | 62 | #pragma shader_feature_local_fragment DEBUG_MEMORY 63 | #pragma shader_feature_local_fragment NEW_GAME 64 | #pragma shader_feature_local_fragment PAUSE_GAME 65 | #pragma shader_feature_local_fragment PLAYER_1 66 | #pragma shader_feature_local_fragment PLAYER_2 67 | 68 | #include "Assets/Source/Lib/Input.hlsl" 69 | #include "Assets/Source/Lib/Coordinates.hlsl" 70 | #include "Assets/Source/Lib/GameObjects.hlsl" 71 | #include "Assets/Source/Lib/Persistence.hlsl" 72 | #include "Assets/Source/Lib/Physics.hlsl" 73 | #include "Assets/Source/Lib/Pong.hlsl" 74 | #include "Assets/Source/Lib/Rendering.hlsl" 75 | #include "Assets/Source/Lib/Vertex.hlsl" 76 | 77 | float4 frag(Varyings i) : SV_Target 78 | { 79 | // Game Loop 80 | GameState gameState = LoadGameState(); 81 | StartGame(gameState); 82 | UpdateGame(gameState, unity_DeltaTime.x * _GameSpeed); 83 | 84 | // Persistence 85 | float memory = SaveGameState(gameState, i.uv); 86 | #ifdef DEBUG_MEMORY 87 | return memory; 88 | #endif 89 | 90 | // Setup "Scene" 91 | GameObjects gameObjects = (GameObjects) 0; 92 | RegisterGameObject(gameObjects, gameState.BallPos, SquareUV(_BallSize)); 93 | RegisterGameObject(gameObjects, gameState.Player1Pos, _PaddleSize); 94 | RegisterGameObject(gameObjects, gameState.Player2Pos, _PaddleSize); 95 | 96 | // Rendering 97 | float3 output; 98 | DrawBackground(output, i.uv); 99 | DrawShadows(output, i.uv, gameObjects); 100 | DrawObjects(output, i.uv, gameObjects); 101 | DrawUI(output, i.uv, gameState.Score); 102 | 103 | return float4(output, memory); 104 | } 105 | ENDHLSL 106 | } 107 | 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /Assets/Source/PongShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f52a9f53bafb4a0eb30c530df1f317b 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Kyle Banks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.modules.audio": "1.0.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.modules.audio": { 4 | "version": "1.0.0", 5 | "depth": 0, 6 | "source": "builtin", 7 | "dependencies": {} 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_EnableOutputSuspension: 1 16 | m_SpatializerPlugin: 17 | m_AmbisonicDecoderPlugin: 18 | m_DisableAudio: 0 19 | m_VirtualizeEffects: 1 20 | m_RequestedDSPBufferSize: 0 21 | -------------------------------------------------------------------------------- /ProjectSettings/BurstAotSettings_StandaloneWindows.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "UsePlatformSDKLinker": false, 9 | "CpuMinTargetX32": 0, 10 | "CpuMaxTargetX32": 0, 11 | "CpuMinTargetX64": 0, 12 | "CpuMaxTargetX64": 0, 13 | "CpuTargetsX32": 6, 14 | "CpuTargetsX64": 72 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/CommonBurstAotSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "DisabledWarnings": "" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 2 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 0 13 | m_SpritePackerCacheSize: 10 14 | m_SpritePackerPaddingPower: 1 15 | m_Bc7TextureCompressor: 0 16 | m_EtcTextureCompressorBehavior: 1 17 | m_EtcTextureFastCompressor: 1 18 | m_EtcTextureNormalCompressor: 2 19 | m_EtcTextureBestCompressor: 4 20 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 21 | m_ProjectGenerationRootNamespace: 22 | m_EnableTextureStreamingInEditMode: 1 23 | m_EnableTextureStreamingInPlayMode: 1 24 | m_EnableEditorAsyncCPUTextureLoading: 0 25 | m_AsyncShaderCompilation: 1 26 | m_PrefabModeAllowAutoSave: 1 27 | m_EnterPlayModeOptionsEnabled: 1 28 | m_EnterPlayModeOptions: 3 29 | m_GameObjectNamingDigits: 1 30 | m_GameObjectNamingScheme: 0 31 | m_AssetNamingUsesSpace: 1 32 | m_UseLegacyProbeSampleCount: 0 33 | m_SerializeInlineMappingsOnOneLine: 0 34 | m_DisableCookiesInLightmapper: 1 35 | m_AssetPipelineMode: 1 36 | m_RefreshImportMode: 0 37 | m_CacheServerMode: 0 38 | m_CacheServerEndpoint: 39 | m_CacheServerNamespacePrefix: default 40 | m_CacheServerEnableDownload: 1 41 | m_CacheServerEnableUpload: 1 42 | m_CacheServerEnableAuth: 0 43 | m_CacheServerEnableTls: 0 44 | m_CacheServerValidationMode: 2 45 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 14 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_PreloadShadersBatchTimeLimit: -1 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 11400000, guid: 700540befca0f43909989a33577e7f05, 45 | type: 2} 46 | m_TransparencySortMode: 0 47 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 48 | m_DefaultRenderingPath: 1 49 | m_DefaultMobileRenderingPath: 1 50 | m_TierSettings: [] 51 | m_LightmapStripping: 0 52 | m_FogStripping: 0 53 | m_InstancingStripping: 0 54 | m_BrgStripping: 0 55 | m_LightmapKeepPlain: 1 56 | m_LightmapKeepDirCombined: 1 57 | m_LightmapKeepDynamicPlain: 1 58 | m_LightmapKeepDynamicDirCombined: 1 59 | m_LightmapKeepShadowMask: 1 60 | m_LightmapKeepSubtractive: 1 61 | m_FogKeepLinear: 1 62 | m_FogKeepExp: 1 63 | m_FogKeepExp2: 1 64 | m_AlbedoSwatchInfos: [] 65 | m_LightsUseLinearIntensity: 1 66 | m_LightsUseColorTemperature: 1 67 | m_DefaultRenderingLayerMask: 1 68 | m_LogWhenShaderIsCompiled: 0 69 | m_SRPDefaultSettings: 70 | UnityEngine.Rendering.Universal.UniversalRenderPipeline: {fileID: 11400000, guid: 18dc0cd2c080841dea60987a38ce93fa, 71 | type: 2} 72 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Enable Debug Button 1 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: left ctrl 302 | altNegativeButton: 303 | altPositiveButton: joystick button 8 304 | gravity: 0 305 | dead: 0 306 | sensitivity: 0 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Enable Debug Button 2 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: backspace 318 | altNegativeButton: 319 | altPositiveButton: joystick button 9 320 | gravity: 0 321 | dead: 0 322 | sensitivity: 0 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: Debug Reset 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: left alt 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0 338 | sensitivity: 0 339 | snap: 0 340 | invert: 0 341 | type: 0 342 | axis: 0 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: Debug Next 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: page down 350 | altNegativeButton: 351 | altPositiveButton: joystick button 5 352 | gravity: 0 353 | dead: 0 354 | sensitivity: 0 355 | snap: 0 356 | invert: 0 357 | type: 0 358 | axis: 0 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Debug Previous 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: page up 366 | altNegativeButton: 367 | altPositiveButton: joystick button 4 368 | gravity: 0 369 | dead: 0 370 | sensitivity: 0 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | - serializedVersion: 3 377 | m_Name: Debug Validate 378 | descriptiveName: 379 | descriptiveNegativeName: 380 | negativeButton: 381 | positiveButton: return 382 | altNegativeButton: 383 | altPositiveButton: joystick button 0 384 | gravity: 0 385 | dead: 0 386 | sensitivity: 0 387 | snap: 0 388 | invert: 0 389 | type: 0 390 | axis: 0 391 | joyNum: 0 392 | - serializedVersion: 3 393 | m_Name: Debug Persistent 394 | descriptiveName: 395 | descriptiveNegativeName: 396 | negativeButton: 397 | positiveButton: right shift 398 | altNegativeButton: 399 | altPositiveButton: joystick button 2 400 | gravity: 0 401 | dead: 0 402 | sensitivity: 0 403 | snap: 0 404 | invert: 0 405 | type: 0 406 | axis: 0 407 | joyNum: 0 408 | - serializedVersion: 3 409 | m_Name: Debug Multiplier 410 | descriptiveName: 411 | descriptiveNegativeName: 412 | negativeButton: 413 | positiveButton: left shift 414 | altNegativeButton: 415 | altPositiveButton: joystick button 3 416 | gravity: 0 417 | dead: 0 418 | sensitivity: 0 419 | snap: 0 420 | invert: 0 421 | type: 0 422 | axis: 0 423 | joyNum: 0 424 | - serializedVersion: 3 425 | m_Name: Debug Horizontal 426 | descriptiveName: 427 | descriptiveNegativeName: 428 | negativeButton: left 429 | positiveButton: right 430 | altNegativeButton: 431 | altPositiveButton: 432 | gravity: 1000 433 | dead: 0.001 434 | sensitivity: 1000 435 | snap: 0 436 | invert: 0 437 | type: 0 438 | axis: 0 439 | joyNum: 0 440 | - serializedVersion: 3 441 | m_Name: Debug Vertical 442 | descriptiveName: 443 | descriptiveNegativeName: 444 | negativeButton: down 445 | positiveButton: up 446 | altNegativeButton: 447 | altPositiveButton: 448 | gravity: 1000 449 | dead: 0.001 450 | sensitivity: 1000 451 | snap: 0 452 | invert: 0 453 | type: 0 454 | axis: 0 455 | joyNum: 0 456 | - serializedVersion: 3 457 | m_Name: Debug Vertical 458 | descriptiveName: 459 | descriptiveNegativeName: 460 | negativeButton: down 461 | positiveButton: up 462 | altNegativeButton: 463 | altPositiveButton: 464 | gravity: 1000 465 | dead: 0.001 466 | sensitivity: 1000 467 | snap: 0 468 | invert: 0 469 | type: 2 470 | axis: 6 471 | joyNum: 0 472 | - serializedVersion: 3 473 | m_Name: Debug Horizontal 474 | descriptiveName: 475 | descriptiveNegativeName: 476 | negativeButton: left 477 | positiveButton: right 478 | altNegativeButton: 479 | altPositiveButton: 480 | gravity: 1000 481 | dead: 0.001 482 | sensitivity: 1000 483 | snap: 0 484 | invert: 0 485 | type: 2 486 | axis: 5 487 | joyNum: 0 488 | -------------------------------------------------------------------------------- /ProjectSettings/MemorySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!387306366 &1 4 | MemorySettings: 5 | m_ObjectHideFlags: 0 6 | m_EditorMemorySettings: 7 | m_MainAllocatorBlockSize: -1 8 | m_ThreadAllocatorBlockSize: -1 9 | m_MainGfxBlockSize: -1 10 | m_ThreadGfxBlockSize: -1 11 | m_CacheBlockSize: -1 12 | m_TypetreeBlockSize: -1 13 | m_ProfilerBlockSize: -1 14 | m_ProfilerEditorBlockSize: -1 15 | m_BucketAllocatorGranularity: -1 16 | m_BucketAllocatorBucketsCount: -1 17 | m_BucketAllocatorBlockSize: -1 18 | m_BucketAllocatorBlockCount: -1 19 | m_ProfilerBucketAllocatorGranularity: -1 20 | m_ProfilerBucketAllocatorBucketsCount: -1 21 | m_ProfilerBucketAllocatorBlockSize: -1 22 | m_ProfilerBucketAllocatorBlockCount: -1 23 | m_TempAllocatorSizeMain: -1 24 | m_JobTempAllocatorBlockSize: -1 25 | m_BackgroundJobTempAllocatorBlockSize: -1 26 | m_JobTempAllocatorReducedBlockSize: -1 27 | m_TempAllocatorSizeGIBakingWorker: -1 28 | m_TempAllocatorSizeNavMeshWorker: -1 29 | m_TempAllocatorSizeAudioWorker: -1 30 | m_TempAllocatorSizeCloudWorker: -1 31 | m_TempAllocatorSizeGfx: -1 32 | m_TempAllocatorSizeJobWorker: -1 33 | m_TempAllocatorSizeBackgroundWorker: -1 34 | m_TempAllocatorSizePreloadManager: -1 35 | m_PlatformMemorySettings: {} 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 24 7 | productGUID: 728fb45c8b71e4f56aa9b3d23bbac848 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: shader-pong 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_SpriteBatchVertexThreshold: 300 52 | m_MTRendering: 1 53 | mipStripping: 0 54 | numberOfMipsStripped: 0 55 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 56 | iosShowActivityIndicatorOnLoading: -1 57 | androidShowActivityIndicatorOnLoading: -1 58 | iosUseCustomAppBackgroundBehavior: 0 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 0 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 0 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 0 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 0 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 1 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 1048576 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchGpuScratchPoolGranularity: 2097152 123 | switchAllowGpuScratchShrinking: 0 124 | switchNVNMaxPublicTextureIDCount: 0 125 | switchNVNMaxPublicSamplerIDCount: 0 126 | switchNVNGraphicsFirmwareMemory: 32 127 | stadiaPresentMode: 0 128 | stadiaTargetFramerate: 0 129 | vulkanNumSwapchainBuffers: 3 130 | vulkanEnableSetSRGBWrite: 0 131 | vulkanEnablePreTransform: 0 132 | vulkanEnableLateAcquireNextImage: 0 133 | vulkanEnableCommandBufferRecycling: 1 134 | m_SupportedAspectRatios: 135 | 4:3: 1 136 | 5:4: 1 137 | 16:10: 1 138 | 16:9: 1 139 | Others: 1 140 | bundleVersion: 0.1.0 141 | preloadedAssets: [] 142 | metroInputSource: 0 143 | wsaTransparentSwapchain: 0 144 | m_HolographicPauseOnTrackingLoss: 1 145 | xboxOneDisableKinectGpuReservation: 1 146 | xboxOneEnable7thCore: 1 147 | vrSettings: 148 | enable360StereoCapture: 0 149 | isWsaHolographicRemotingEnabled: 0 150 | enableFrameTimingStats: 0 151 | useHDRDisplay: 0 152 | D3DHDRBitDepth: 0 153 | m_ColorGamuts: 00000000 154 | targetPixelDensity: 30 155 | resolutionScalingMode: 0 156 | resetResolutionOnWindowResize: 0 157 | androidSupportedAspectRatio: 1 158 | androidMaxAspectRatio: 2.1 159 | applicationIdentifier: 160 | Standalone: com.UnityTechnologies.com.unity.template-starter-kit 161 | buildNumber: 162 | Standalone: 0 163 | iPhone: 0 164 | tvOS: 0 165 | overrideDefaultApplicationIdentifier: 1 166 | AndroidBundleVersionCode: 1 167 | AndroidMinSdkVersion: 22 168 | AndroidTargetSdkVersion: 0 169 | AndroidPreferredInstallLocation: 1 170 | aotOptions: 171 | stripEngineCode: 1 172 | iPhoneStrippingLevel: 0 173 | iPhoneScriptCallOptimization: 0 174 | ForceInternetPermission: 0 175 | ForceSDCardPermission: 0 176 | CreateWallpaper: 0 177 | APKExpansionFiles: 0 178 | keepLoadedShadersAlive: 0 179 | StripUnusedMeshComponents: 0 180 | strictShaderVariantMatching: 0 181 | VertexChannelCompressionMask: 4054 182 | iPhoneSdkVersion: 988 183 | iOSTargetOSVersionString: 12.0 184 | tvOSSdkVersion: 0 185 | tvOSRequireExtendedGameController: 0 186 | tvOSTargetOSVersionString: 12.0 187 | uIPrerenderedIcon: 0 188 | uIRequiresPersistentWiFi: 0 189 | uIRequiresFullScreen: 1 190 | uIStatusBarHidden: 1 191 | uIExitOnSuspend: 0 192 | uIStatusBarStyle: 0 193 | appleTVSplashScreen: {fileID: 0} 194 | appleTVSplashScreen2x: {fileID: 0} 195 | tvOSSmallIconLayers: [] 196 | tvOSSmallIconLayers2x: [] 197 | tvOSLargeIconLayers: [] 198 | tvOSLargeIconLayers2x: [] 199 | tvOSTopShelfImageLayers: [] 200 | tvOSTopShelfImageLayers2x: [] 201 | tvOSTopShelfImageWideLayers: [] 202 | tvOSTopShelfImageWideLayers2x: [] 203 | iOSLaunchScreenType: 0 204 | iOSLaunchScreenPortrait: {fileID: 0} 205 | iOSLaunchScreenLandscape: {fileID: 0} 206 | iOSLaunchScreenBackgroundColor: 207 | serializedVersion: 2 208 | rgba: 0 209 | iOSLaunchScreenFillPct: 100 210 | iOSLaunchScreenSize: 100 211 | iOSLaunchScreenCustomXibPath: 212 | iOSLaunchScreeniPadType: 0 213 | iOSLaunchScreeniPadImage: {fileID: 0} 214 | iOSLaunchScreeniPadBackgroundColor: 215 | serializedVersion: 2 216 | rgba: 0 217 | iOSLaunchScreeniPadFillPct: 100 218 | iOSLaunchScreeniPadSize: 100 219 | iOSLaunchScreeniPadCustomXibPath: 220 | iOSLaunchScreenCustomStoryboardPath: 221 | iOSLaunchScreeniPadCustomStoryboardPath: 222 | iOSDeviceRequirements: [] 223 | iOSURLSchemes: [] 224 | macOSURLSchemes: [] 225 | iOSBackgroundModes: 0 226 | iOSMetalForceHardShadows: 0 227 | metalEditorSupport: 1 228 | metalAPIValidation: 1 229 | iOSRenderExtraFrameOnPause: 0 230 | iosCopyPluginsCodeInsteadOfSymlink: 0 231 | appleDeveloperTeamID: 232 | iOSManualSigningProvisioningProfileID: 233 | tvOSManualSigningProvisioningProfileID: 234 | iOSManualSigningProvisioningProfileType: 0 235 | tvOSManualSigningProvisioningProfileType: 0 236 | appleEnableAutomaticSigning: 0 237 | iOSRequireARKit: 0 238 | iOSAutomaticallyDetectAndAddCapabilities: 1 239 | appleEnableProMotion: 0 240 | shaderPrecisionModel: 0 241 | clonedFromGUID: 3c72c65a16f0acb438eed22b8b16c24a 242 | templatePackageId: com.unity.template.urp-blank@2.0.3 243 | templateDefaultScene: Assets/Scenes/SampleScene.unity 244 | useCustomMainManifest: 0 245 | useCustomLauncherManifest: 0 246 | useCustomMainGradleTemplate: 0 247 | useCustomLauncherGradleManifest: 0 248 | useCustomBaseGradleTemplate: 0 249 | useCustomGradlePropertiesTemplate: 0 250 | useCustomProguardFile: 0 251 | AndroidTargetArchitectures: 1 252 | AndroidTargetDevices: 0 253 | AndroidSplashScreenScale: 0 254 | androidSplashScreen: {fileID: 0} 255 | AndroidKeystoreName: 256 | AndroidKeyaliasName: 257 | AndroidBuildApkPerCpuArchitecture: 0 258 | AndroidTVCompatibility: 0 259 | AndroidIsGame: 1 260 | AndroidEnableTango: 0 261 | androidEnableBanner: 1 262 | androidUseLowAccuracyLocation: 0 263 | androidUseCustomKeystore: 0 264 | m_AndroidBanners: 265 | - width: 320 266 | height: 180 267 | banner: {fileID: 0} 268 | androidGamepadSupportLevel: 0 269 | chromeosInputEmulation: 1 270 | AndroidMinifyWithR8: 0 271 | AndroidMinifyRelease: 0 272 | AndroidMinifyDebug: 0 273 | AndroidValidateAppBundleSize: 1 274 | AndroidAppBundleSizeToValidate: 150 275 | m_BuildTargetIcons: [] 276 | m_BuildTargetPlatformIcons: 277 | - m_BuildTarget: iPhone 278 | m_Icons: 279 | - m_Textures: [] 280 | m_Width: 180 281 | m_Height: 180 282 | m_Kind: 0 283 | m_SubKind: iPhone 284 | - m_Textures: [] 285 | m_Width: 120 286 | m_Height: 120 287 | m_Kind: 0 288 | m_SubKind: iPhone 289 | - m_Textures: [] 290 | m_Width: 167 291 | m_Height: 167 292 | m_Kind: 0 293 | m_SubKind: iPad 294 | - m_Textures: [] 295 | m_Width: 152 296 | m_Height: 152 297 | m_Kind: 0 298 | m_SubKind: iPad 299 | - m_Textures: [] 300 | m_Width: 76 301 | m_Height: 76 302 | m_Kind: 0 303 | m_SubKind: iPad 304 | - m_Textures: [] 305 | m_Width: 120 306 | m_Height: 120 307 | m_Kind: 3 308 | m_SubKind: iPhone 309 | - m_Textures: [] 310 | m_Width: 80 311 | m_Height: 80 312 | m_Kind: 3 313 | m_SubKind: iPhone 314 | - m_Textures: [] 315 | m_Width: 80 316 | m_Height: 80 317 | m_Kind: 3 318 | m_SubKind: iPad 319 | - m_Textures: [] 320 | m_Width: 40 321 | m_Height: 40 322 | m_Kind: 3 323 | m_SubKind: iPad 324 | - m_Textures: [] 325 | m_Width: 87 326 | m_Height: 87 327 | m_Kind: 1 328 | m_SubKind: iPhone 329 | - m_Textures: [] 330 | m_Width: 58 331 | m_Height: 58 332 | m_Kind: 1 333 | m_SubKind: iPhone 334 | - m_Textures: [] 335 | m_Width: 29 336 | m_Height: 29 337 | m_Kind: 1 338 | m_SubKind: iPhone 339 | - m_Textures: [] 340 | m_Width: 58 341 | m_Height: 58 342 | m_Kind: 1 343 | m_SubKind: iPad 344 | - m_Textures: [] 345 | m_Width: 29 346 | m_Height: 29 347 | m_Kind: 1 348 | m_SubKind: iPad 349 | - m_Textures: [] 350 | m_Width: 60 351 | m_Height: 60 352 | m_Kind: 2 353 | m_SubKind: iPhone 354 | - m_Textures: [] 355 | m_Width: 40 356 | m_Height: 40 357 | m_Kind: 2 358 | m_SubKind: iPhone 359 | - m_Textures: [] 360 | m_Width: 40 361 | m_Height: 40 362 | m_Kind: 2 363 | m_SubKind: iPad 364 | - m_Textures: [] 365 | m_Width: 20 366 | m_Height: 20 367 | m_Kind: 2 368 | m_SubKind: iPad 369 | - m_Textures: [] 370 | m_Width: 1024 371 | m_Height: 1024 372 | m_Kind: 4 373 | m_SubKind: App Store 374 | - m_BuildTarget: Android 375 | m_Icons: 376 | - m_Textures: [] 377 | m_Width: 432 378 | m_Height: 432 379 | m_Kind: 2 380 | m_SubKind: 381 | - m_Textures: [] 382 | m_Width: 324 383 | m_Height: 324 384 | m_Kind: 2 385 | m_SubKind: 386 | - m_Textures: [] 387 | m_Width: 216 388 | m_Height: 216 389 | m_Kind: 2 390 | m_SubKind: 391 | - m_Textures: [] 392 | m_Width: 162 393 | m_Height: 162 394 | m_Kind: 2 395 | m_SubKind: 396 | - m_Textures: [] 397 | m_Width: 108 398 | m_Height: 108 399 | m_Kind: 2 400 | m_SubKind: 401 | - m_Textures: [] 402 | m_Width: 81 403 | m_Height: 81 404 | m_Kind: 2 405 | m_SubKind: 406 | - m_Textures: [] 407 | m_Width: 192 408 | m_Height: 192 409 | m_Kind: 1 410 | m_SubKind: 411 | - m_Textures: [] 412 | m_Width: 144 413 | m_Height: 144 414 | m_Kind: 1 415 | m_SubKind: 416 | - m_Textures: [] 417 | m_Width: 96 418 | m_Height: 96 419 | m_Kind: 1 420 | m_SubKind: 421 | - m_Textures: [] 422 | m_Width: 72 423 | m_Height: 72 424 | m_Kind: 1 425 | m_SubKind: 426 | - m_Textures: [] 427 | m_Width: 48 428 | m_Height: 48 429 | m_Kind: 1 430 | m_SubKind: 431 | - m_Textures: [] 432 | m_Width: 36 433 | m_Height: 36 434 | m_Kind: 1 435 | m_SubKind: 436 | - m_Textures: [] 437 | m_Width: 192 438 | m_Height: 192 439 | m_Kind: 0 440 | m_SubKind: 441 | - m_Textures: [] 442 | m_Width: 144 443 | m_Height: 144 444 | m_Kind: 0 445 | m_SubKind: 446 | - m_Textures: [] 447 | m_Width: 96 448 | m_Height: 96 449 | m_Kind: 0 450 | m_SubKind: 451 | - m_Textures: [] 452 | m_Width: 72 453 | m_Height: 72 454 | m_Kind: 0 455 | m_SubKind: 456 | - m_Textures: [] 457 | m_Width: 48 458 | m_Height: 48 459 | m_Kind: 0 460 | m_SubKind: 461 | - m_Textures: [] 462 | m_Width: 36 463 | m_Height: 36 464 | m_Kind: 0 465 | m_SubKind: 466 | - m_BuildTarget: tvOS 467 | m_Icons: 468 | - m_Textures: [] 469 | m_Width: 1280 470 | m_Height: 768 471 | m_Kind: 0 472 | m_SubKind: 473 | - m_Textures: [] 474 | m_Width: 800 475 | m_Height: 480 476 | m_Kind: 0 477 | m_SubKind: 478 | - m_Textures: [] 479 | m_Width: 400 480 | m_Height: 240 481 | m_Kind: 0 482 | m_SubKind: 483 | - m_Textures: [] 484 | m_Width: 4640 485 | m_Height: 1440 486 | m_Kind: 1 487 | m_SubKind: 488 | - m_Textures: [] 489 | m_Width: 2320 490 | m_Height: 720 491 | m_Kind: 1 492 | m_SubKind: 493 | - m_Textures: [] 494 | m_Width: 3840 495 | m_Height: 1440 496 | m_Kind: 1 497 | m_SubKind: 498 | - m_Textures: [] 499 | m_Width: 1920 500 | m_Height: 720 501 | m_Kind: 1 502 | m_SubKind: 503 | m_BuildTargetBatching: 504 | - m_BuildTarget: Standalone 505 | m_StaticBatching: 1 506 | m_DynamicBatching: 1 507 | m_BuildTargetShaderSettings: [] 508 | m_BuildTargetGraphicsJobs: [] 509 | m_BuildTargetGraphicsJobMode: [] 510 | m_BuildTargetGraphicsAPIs: 511 | - m_BuildTarget: iOSSupport 512 | m_APIs: 10000000 513 | m_Automatic: 1 514 | - m_BuildTarget: AndroidPlayer 515 | m_APIs: 0b00000008000000 516 | m_Automatic: 0 517 | - m_BuildTarget: WindowsStandaloneSupport 518 | m_APIs: 02000000 519 | m_Automatic: 1 520 | - m_BuildTarget: MacStandaloneSupport 521 | m_APIs: 10000000 522 | m_Automatic: 1 523 | m_BuildTargetVRSettings: [] 524 | m_DefaultShaderChunkSizeInMB: 16 525 | m_DefaultShaderChunkCount: 0 526 | openGLRequireES31: 0 527 | openGLRequireES31AEP: 0 528 | openGLRequireES32: 0 529 | m_TemplateCustomTags: {} 530 | mobileMTRendering: 531 | Android: 1 532 | iPhone: 1 533 | tvOS: 1 534 | m_BuildTargetGroupLightmapEncodingQuality: [] 535 | m_BuildTargetGroupHDRCubemapEncodingQuality: [] 536 | m_BuildTargetGroupLightmapSettings: [] 537 | m_BuildTargetNormalMapEncoding: [] 538 | m_BuildTargetDefaultTextureCompressionFormat: [] 539 | playModeTestRunnerEnabled: 0 540 | runPlayModeTestAsEditModeTest: 0 541 | actionOnDotNetUnhandledException: 1 542 | enableInternalProfiler: 0 543 | logObjCUncaughtExceptions: 1 544 | enableCrashReportAPI: 0 545 | cameraUsageDescription: 546 | locationUsageDescription: 547 | microphoneUsageDescription: 548 | bluetoothUsageDescription: 549 | macOSTargetOSVersion: 10.13.0 550 | switchNMETAOverride: 551 | switchNetLibKey: 552 | switchSocketMemoryPoolSize: 6144 553 | switchSocketAllocatorPoolSize: 128 554 | switchSocketConcurrencyLimit: 14 555 | switchScreenResolutionBehavior: 2 556 | switchUseCPUProfiler: 0 557 | switchUseGOLDLinker: 0 558 | switchLTOSetting: 0 559 | switchApplicationID: 0x01004b9000490000 560 | switchNSODependencies: 561 | switchCompilerFlags: 562 | switchTitleNames_0: 563 | switchTitleNames_1: 564 | switchTitleNames_2: 565 | switchTitleNames_3: 566 | switchTitleNames_4: 567 | switchTitleNames_5: 568 | switchTitleNames_6: 569 | switchTitleNames_7: 570 | switchTitleNames_8: 571 | switchTitleNames_9: 572 | switchTitleNames_10: 573 | switchTitleNames_11: 574 | switchTitleNames_12: 575 | switchTitleNames_13: 576 | switchTitleNames_14: 577 | switchTitleNames_15: 578 | switchPublisherNames_0: 579 | switchPublisherNames_1: 580 | switchPublisherNames_2: 581 | switchPublisherNames_3: 582 | switchPublisherNames_4: 583 | switchPublisherNames_5: 584 | switchPublisherNames_6: 585 | switchPublisherNames_7: 586 | switchPublisherNames_8: 587 | switchPublisherNames_9: 588 | switchPublisherNames_10: 589 | switchPublisherNames_11: 590 | switchPublisherNames_12: 591 | switchPublisherNames_13: 592 | switchPublisherNames_14: 593 | switchPublisherNames_15: 594 | switchIcons_0: {fileID: 0} 595 | switchIcons_1: {fileID: 0} 596 | switchIcons_2: {fileID: 0} 597 | switchIcons_3: {fileID: 0} 598 | switchIcons_4: {fileID: 0} 599 | switchIcons_5: {fileID: 0} 600 | switchIcons_6: {fileID: 0} 601 | switchIcons_7: {fileID: 0} 602 | switchIcons_8: {fileID: 0} 603 | switchIcons_9: {fileID: 0} 604 | switchIcons_10: {fileID: 0} 605 | switchIcons_11: {fileID: 0} 606 | switchIcons_12: {fileID: 0} 607 | switchIcons_13: {fileID: 0} 608 | switchIcons_14: {fileID: 0} 609 | switchIcons_15: {fileID: 0} 610 | switchSmallIcons_0: {fileID: 0} 611 | switchSmallIcons_1: {fileID: 0} 612 | switchSmallIcons_2: {fileID: 0} 613 | switchSmallIcons_3: {fileID: 0} 614 | switchSmallIcons_4: {fileID: 0} 615 | switchSmallIcons_5: {fileID: 0} 616 | switchSmallIcons_6: {fileID: 0} 617 | switchSmallIcons_7: {fileID: 0} 618 | switchSmallIcons_8: {fileID: 0} 619 | switchSmallIcons_9: {fileID: 0} 620 | switchSmallIcons_10: {fileID: 0} 621 | switchSmallIcons_11: {fileID: 0} 622 | switchSmallIcons_12: {fileID: 0} 623 | switchSmallIcons_13: {fileID: 0} 624 | switchSmallIcons_14: {fileID: 0} 625 | switchSmallIcons_15: {fileID: 0} 626 | switchManualHTML: 627 | switchAccessibleURLs: 628 | switchLegalInformation: 629 | switchMainThreadStackSize: 1048576 630 | switchPresenceGroupId: 631 | switchLogoHandling: 0 632 | switchReleaseVersion: 0 633 | switchDisplayVersion: 1.0.0 634 | switchStartupUserAccount: 0 635 | switchTouchScreenUsage: 0 636 | switchSupportedLanguagesMask: 0 637 | switchLogoType: 0 638 | switchApplicationErrorCodeCategory: 639 | switchUserAccountSaveDataSize: 0 640 | switchUserAccountSaveDataJournalSize: 0 641 | switchApplicationAttribute: 0 642 | switchCardSpecSize: -1 643 | switchCardSpecClock: -1 644 | switchRatingsMask: 0 645 | switchRatingsInt_0: 0 646 | switchRatingsInt_1: 0 647 | switchRatingsInt_2: 0 648 | switchRatingsInt_3: 0 649 | switchRatingsInt_4: 0 650 | switchRatingsInt_5: 0 651 | switchRatingsInt_6: 0 652 | switchRatingsInt_7: 0 653 | switchRatingsInt_8: 0 654 | switchRatingsInt_9: 0 655 | switchRatingsInt_10: 0 656 | switchRatingsInt_11: 0 657 | switchRatingsInt_12: 0 658 | switchLocalCommunicationIds_0: 659 | switchLocalCommunicationIds_1: 660 | switchLocalCommunicationIds_2: 661 | switchLocalCommunicationIds_3: 662 | switchLocalCommunicationIds_4: 663 | switchLocalCommunicationIds_5: 664 | switchLocalCommunicationIds_6: 665 | switchLocalCommunicationIds_7: 666 | switchParentalControl: 0 667 | switchAllowsScreenshot: 1 668 | switchAllowsVideoCapturing: 1 669 | switchAllowsRuntimeAddOnContentInstall: 0 670 | switchDataLossConfirmation: 0 671 | switchUserAccountLockEnabled: 0 672 | switchSystemResourceMemory: 16777216 673 | switchSupportedNpadStyles: 22 674 | switchNativeFsCacheSize: 32 675 | switchIsHoldTypeHorizontal: 0 676 | switchSupportedNpadCount: 8 677 | switchSocketConfigEnabled: 0 678 | switchTcpInitialSendBufferSize: 32 679 | switchTcpInitialReceiveBufferSize: 64 680 | switchTcpAutoSendBufferSizeMax: 256 681 | switchTcpAutoReceiveBufferSizeMax: 256 682 | switchUdpSendBufferSize: 9 683 | switchUdpReceiveBufferSize: 42 684 | switchSocketBufferEfficiency: 4 685 | switchSocketInitializeEnabled: 1 686 | switchNetworkInterfaceManagerInitializeEnabled: 1 687 | switchPlayerConnectionEnabled: 1 688 | switchUseNewStyleFilepaths: 0 689 | switchUseLegacyFmodPriorities: 0 690 | switchUseMicroSleepForYield: 1 691 | switchEnableRamDiskSupport: 0 692 | switchMicroSleepForYieldTime: 25 693 | switchRamDiskSpaceSize: 12 694 | ps4NPAgeRating: 12 695 | ps4NPTitleSecret: 696 | ps4NPTrophyPackPath: 697 | ps4ParentalLevel: 11 698 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 699 | ps4Category: 0 700 | ps4MasterVersion: 01.00 701 | ps4AppVersion: 01.00 702 | ps4AppType: 0 703 | ps4ParamSfxPath: 704 | ps4VideoOutPixelFormat: 0 705 | ps4VideoOutInitialWidth: 1920 706 | ps4VideoOutBaseModeInitialWidth: 1920 707 | ps4VideoOutReprojectionRate: 60 708 | ps4PronunciationXMLPath: 709 | ps4PronunciationSIGPath: 710 | ps4BackgroundImagePath: 711 | ps4StartupImagePath: 712 | ps4StartupImagesFolder: 713 | ps4IconImagesFolder: 714 | ps4SaveDataImagePath: 715 | ps4SdkOverride: 716 | ps4BGMPath: 717 | ps4ShareFilePath: 718 | ps4ShareOverlayImagePath: 719 | ps4PrivacyGuardImagePath: 720 | ps4ExtraSceSysFile: 721 | ps4NPtitleDatPath: 722 | ps4RemotePlayKeyAssignment: -1 723 | ps4RemotePlayKeyMappingDir: 724 | ps4PlayTogetherPlayerCount: 0 725 | ps4EnterButtonAssignment: 2 726 | ps4ApplicationParam1: 0 727 | ps4ApplicationParam2: 0 728 | ps4ApplicationParam3: 0 729 | ps4ApplicationParam4: 0 730 | ps4DownloadDataSize: 0 731 | ps4GarlicHeapSize: 2048 732 | ps4ProGarlicHeapSize: 2560 733 | playerPrefsMaxSize: 32768 734 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 735 | ps4pnSessions: 1 736 | ps4pnPresence: 1 737 | ps4pnFriends: 1 738 | ps4pnGameCustomData: 1 739 | playerPrefsSupport: 0 740 | enableApplicationExit: 0 741 | resetTempFolder: 1 742 | restrictedAudioUsageRights: 0 743 | ps4UseResolutionFallback: 0 744 | ps4ReprojectionSupport: 0 745 | ps4UseAudio3dBackend: 0 746 | ps4UseLowGarlicFragmentationMode: 1 747 | ps4SocialScreenEnabled: 0 748 | ps4ScriptOptimizationLevel: 2 749 | ps4Audio3dVirtualSpeakerCount: 14 750 | ps4attribCpuUsage: 0 751 | ps4PatchPkgPath: 752 | ps4PatchLatestPkgPath: 753 | ps4PatchChangeinfoPath: 754 | ps4PatchDayOne: 0 755 | ps4attribUserManagement: 0 756 | ps4attribMoveSupport: 0 757 | ps4attrib3DSupport: 0 758 | ps4attribShareSupport: 0 759 | ps4attribExclusiveVR: 0 760 | ps4disableAutoHideSplash: 0 761 | ps4videoRecordingFeaturesUsed: 0 762 | ps4contentSearchFeaturesUsed: 0 763 | ps4CompatibilityPS5: 0 764 | ps4AllowPS5Detection: 0 765 | ps4GPU800MHz: 1 766 | ps4attribEyeToEyeDistanceSettingVR: 0 767 | ps4IncludedModules: [] 768 | ps4attribVROutputEnabled: 0 769 | monoEnv: 770 | splashScreenBackgroundSourceLandscape: {fileID: 0} 771 | splashScreenBackgroundSourcePortrait: {fileID: 0} 772 | blurSplashScreenBackground: 1 773 | spritePackerPolicy: 774 | webGLMemorySize: 32 775 | webGLExceptionSupport: 1 776 | webGLNameFilesAsHashes: 0 777 | webGLDataCaching: 1 778 | webGLDebugSymbols: 0 779 | webGLEmscriptenArgs: 780 | webGLModulesDirectory: 781 | webGLTemplate: APPLICATION:Default 782 | webGLAnalyzeBuildSize: 0 783 | webGLUseEmbeddedResources: 0 784 | webGLCompressionFormat: 0 785 | webGLWasmArithmeticExceptions: 0 786 | webGLLinkerTarget: 1 787 | webGLThreadsSupport: 0 788 | webGLDecompressionFallback: 0 789 | webGLInitialMemorySize: 32 790 | webGLMaximumMemorySize: 2048 791 | webGLMemoryGrowthMode: 2 792 | webGLMemoryLinearGrowthStep: 16 793 | webGLMemoryGeometricGrowthStep: 0.2 794 | webGLMemoryGeometricGrowthCap: 96 795 | webGLPowerPreference: 2 796 | scriptingDefineSymbols: {} 797 | additionalCompilerArguments: {} 798 | platformArchitecture: {} 799 | scriptingBackend: {} 800 | il2cppCompilerConfiguration: {} 801 | il2cppCodeGeneration: {} 802 | managedStrippingLevel: {} 803 | incrementalIl2cppBuild: {} 804 | suppressCommonWarnings: 1 805 | allowUnsafeCode: 0 806 | useDeterministicCompilation: 1 807 | enableRoslynAnalyzers: 1 808 | selectedPlatform: 0 809 | additionalIl2CppArgs: 810 | scriptingRuntimeVersion: 1 811 | gcIncremental: 0 812 | assemblyVersionValidation: 1 813 | gcWBarrierValidation: 0 814 | apiCompatibilityLevelPerPlatform: {} 815 | m_RenderingPath: 1 816 | m_MobileRenderingPath: 1 817 | metroPackageName: com.unity.template-starter-kit 818 | metroPackageVersion: 819 | metroCertificatePath: 820 | metroCertificatePassword: 821 | metroCertificateSubject: 822 | metroCertificateIssuer: 823 | metroCertificateNotAfter: 0000000000000000 824 | metroApplicationDescription: com.unity.template-starter-kit 825 | wsaImages: {} 826 | metroTileShortName: 827 | metroTileShowName: 0 828 | metroMediumTileShowName: 0 829 | metroLargeTileShowName: 0 830 | metroWideTileShowName: 0 831 | metroSupportStreamingInstall: 0 832 | metroLastRequiredScene: 0 833 | metroDefaultTileSize: 1 834 | metroTileForegroundText: 2 835 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 836 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 837 | a: 1} 838 | metroSplashScreenUseBackgroundColor: 0 839 | platformCapabilities: {} 840 | metroTargetDeviceFamilies: {} 841 | metroFTAName: 842 | metroFTAFileTypes: [] 843 | metroProtocolName: 844 | vcxProjDefaultLanguage: 845 | XboxOneProductId: 846 | XboxOneUpdateKey: 847 | XboxOneSandboxId: 848 | XboxOneContentId: 849 | XboxOneTitleId: 850 | XboxOneSCId: 851 | XboxOneGameOsOverridePath: 852 | XboxOnePackagingOverridePath: 853 | XboxOneAppManifestOverridePath: 854 | XboxOneVersion: 1.0.0.0 855 | XboxOnePackageEncryption: 0 856 | XboxOnePackageUpdateGranularity: 2 857 | XboxOneDescription: 858 | XboxOneLanguage: 859 | - enus 860 | XboxOneCapability: [] 861 | XboxOneGameRating: {} 862 | XboxOneIsContentPackage: 0 863 | XboxOneEnhancedXboxCompatibilityMode: 0 864 | XboxOneEnableGPUVariability: 1 865 | XboxOneSockets: {} 866 | XboxOneSplashScreen: {fileID: 0} 867 | XboxOneAllowedProductIds: [] 868 | XboxOnePersistentLocalStorageSize: 0 869 | XboxOneXTitleMemory: 8 870 | XboxOneOverrideIdentityName: 871 | XboxOneOverrideIdentityPublisher: 872 | vrEditorSettings: {} 873 | cloudServicesEnabled: {} 874 | luminIcon: 875 | m_Name: 876 | m_ModelFolderPath: 877 | m_PortalFolderPath: 878 | luminCert: 879 | m_CertPath: 880 | m_SignPackage: 1 881 | luminIsChannelApp: 0 882 | luminVersion: 883 | m_VersionCode: 1 884 | m_VersionName: 885 | apiCompatibilityLevel: 6 886 | activeInputHandler: 0 887 | cloudProjectId: 888 | framebufferDepthMemorylessMode: 0 889 | qualitySettingsNames: [] 890 | projectName: 891 | organizationId: 892 | cloudEnabled: 0 893 | legacyClampBlendShapeWeights: 0 894 | playerDataPath: 895 | forceSRGBBlit: 1 896 | virtualTexturingSupportEnabled: 0 897 | insecureHttpOption: 0 898 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2022.1.23f1 2 | m_EditorVersionWithRevision: 2022.1.23f1 (9636b062134a) 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 2 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Performant 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 20 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 2 22 | textureQuality: 0 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.4 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1, 44 | type: 2} 45 | excludedTargetPlatforms: [] 46 | - serializedVersion: 2 47 | name: Balanced 48 | pixelLightCount: 1 49 | shadows: 1 50 | shadowResolution: 0 51 | shadowProjection: 1 52 | shadowCascades: 1 53 | shadowDistance: 20 54 | shadowNearPlaneOffset: 3 55 | shadowCascade2Split: 0.33333334 56 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 57 | shadowmaskMode: 0 58 | skinWeights: 4 59 | textureQuality: 0 60 | anisotropicTextures: 1 61 | antiAliasing: 0 62 | softParticles: 0 63 | softVegetation: 0 64 | realtimeReflectionProbes: 0 65 | billboardsFaceCameraPosition: 0 66 | vSyncCount: 1 67 | lodBias: 1 68 | maximumLODLevel: 0 69 | streamingMipmapsActive: 0 70 | streamingMipmapsAddAllCameras: 1 71 | streamingMipmapsMemoryBudget: 512 72 | streamingMipmapsRenderersPerFrame: 512 73 | streamingMipmapsMaxLevelReduction: 2 74 | streamingMipmapsMaxFileIORequests: 1024 75 | particleRaycastBudget: 64 76 | asyncUploadTimeSlice: 2 77 | asyncUploadBufferSize: 16 78 | asyncUploadPersistentBuffer: 1 79 | resolutionScalingFixedDPIFactor: 1 80 | customRenderPipeline: {fileID: 11400000, guid: e1260c1148f6143b28bae5ace5e9c5d1, 81 | type: 2} 82 | excludedTargetPlatforms: [] 83 | - serializedVersion: 2 84 | name: High Fidelity 85 | pixelLightCount: 2 86 | shadows: 2 87 | shadowResolution: 1 88 | shadowProjection: 1 89 | shadowCascades: 2 90 | shadowDistance: 40 91 | shadowNearPlaneOffset: 3 92 | shadowCascade2Split: 0.33333334 93 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 94 | shadowmaskMode: 1 95 | skinWeights: 255 96 | textureQuality: 0 97 | anisotropicTextures: 2 98 | antiAliasing: 0 99 | softParticles: 0 100 | softVegetation: 1 101 | realtimeReflectionProbes: 1 102 | billboardsFaceCameraPosition: 1 103 | vSyncCount: 1 104 | lodBias: 2 105 | maximumLODLevel: 0 106 | streamingMipmapsActive: 0 107 | streamingMipmapsAddAllCameras: 1 108 | streamingMipmapsMemoryBudget: 512 109 | streamingMipmapsRenderersPerFrame: 512 110 | streamingMipmapsMaxLevelReduction: 2 111 | streamingMipmapsMaxFileIORequests: 1024 112 | particleRaycastBudget: 2048 113 | asyncUploadTimeSlice: 2 114 | asyncUploadBufferSize: 16 115 | asyncUploadPersistentBuffer: 1 116 | resolutionScalingFixedDPIFactor: 1 117 | customRenderPipeline: {fileID: 11400000, guid: 700540befca0f43909989a33577e7f05, 118 | type: 2} 119 | excludedTargetPlatforms: [] 120 | m_PerPlatformDefaultQuality: 121 | Android: 1 122 | CloudRendering: 2 123 | GameCoreScarlett: 2 124 | GameCoreXboxOne: 2 125 | Lumin: 2 126 | Nintendo Switch: 2 127 | PS4: 2 128 | PS5: 2 129 | Server: 0 130 | Stadia: 2 131 | Standalone: 2 132 | WebGL: 1 133 | Windows Store Apps: 2 134 | XboxOne: 2 135 | iPhone: 1 136 | tvOS: 1 137 | -------------------------------------------------------------------------------- /ProjectSettings/SceneTemplateSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "templatePinStates": [], 3 | "dependencyTypeInfos": [ 4 | { 5 | "userAdded": false, 6 | "type": "UnityEngine.AnimationClip", 7 | "ignore": false, 8 | "defaultInstantiationMode": 0, 9 | "supportsModification": true 10 | }, 11 | { 12 | "userAdded": false, 13 | "type": "UnityEditor.Animations.AnimatorController", 14 | "ignore": false, 15 | "defaultInstantiationMode": 0, 16 | "supportsModification": true 17 | }, 18 | { 19 | "userAdded": false, 20 | "type": "UnityEngine.AnimatorOverrideController", 21 | "ignore": false, 22 | "defaultInstantiationMode": 0, 23 | "supportsModification": true 24 | }, 25 | { 26 | "userAdded": false, 27 | "type": "UnityEditor.Audio.AudioMixerController", 28 | "ignore": false, 29 | "defaultInstantiationMode": 0, 30 | "supportsModification": true 31 | }, 32 | { 33 | "userAdded": false, 34 | "type": "UnityEngine.ComputeShader", 35 | "ignore": true, 36 | "defaultInstantiationMode": 1, 37 | "supportsModification": true 38 | }, 39 | { 40 | "userAdded": false, 41 | "type": "UnityEngine.Cubemap", 42 | "ignore": false, 43 | "defaultInstantiationMode": 0, 44 | "supportsModification": true 45 | }, 46 | { 47 | "userAdded": false, 48 | "type": "UnityEngine.GameObject", 49 | "ignore": false, 50 | "defaultInstantiationMode": 0, 51 | "supportsModification": true 52 | }, 53 | { 54 | "userAdded": false, 55 | "type": "UnityEditor.LightingDataAsset", 56 | "ignore": false, 57 | "defaultInstantiationMode": 0, 58 | "supportsModification": false 59 | }, 60 | { 61 | "userAdded": false, 62 | "type": "UnityEngine.LightingSettings", 63 | "ignore": false, 64 | "defaultInstantiationMode": 0, 65 | "supportsModification": true 66 | }, 67 | { 68 | "userAdded": false, 69 | "type": "UnityEngine.Material", 70 | "ignore": false, 71 | "defaultInstantiationMode": 0, 72 | "supportsModification": true 73 | }, 74 | { 75 | "userAdded": false, 76 | "type": "UnityEditor.MonoScript", 77 | "ignore": true, 78 | "defaultInstantiationMode": 1, 79 | "supportsModification": true 80 | }, 81 | { 82 | "userAdded": false, 83 | "type": "UnityEngine.PhysicMaterial", 84 | "ignore": false, 85 | "defaultInstantiationMode": 0, 86 | "supportsModification": true 87 | }, 88 | { 89 | "userAdded": false, 90 | "type": "UnityEngine.PhysicsMaterial2D", 91 | "ignore": false, 92 | "defaultInstantiationMode": 0, 93 | "supportsModification": true 94 | }, 95 | { 96 | "userAdded": false, 97 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", 98 | "ignore": false, 99 | "defaultInstantiationMode": 0, 100 | "supportsModification": true 101 | }, 102 | { 103 | "userAdded": false, 104 | "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", 105 | "ignore": false, 106 | "defaultInstantiationMode": 0, 107 | "supportsModification": true 108 | }, 109 | { 110 | "userAdded": false, 111 | "type": "UnityEngine.Rendering.VolumeProfile", 112 | "ignore": false, 113 | "defaultInstantiationMode": 0, 114 | "supportsModification": true 115 | }, 116 | { 117 | "userAdded": false, 118 | "type": "UnityEditor.SceneAsset", 119 | "ignore": false, 120 | "defaultInstantiationMode": 0, 121 | "supportsModification": false 122 | }, 123 | { 124 | "userAdded": false, 125 | "type": "UnityEngine.Shader", 126 | "ignore": true, 127 | "defaultInstantiationMode": 1, 128 | "supportsModification": true 129 | }, 130 | { 131 | "userAdded": false, 132 | "type": "UnityEngine.ShaderVariantCollection", 133 | "ignore": true, 134 | "defaultInstantiationMode": 1, 135 | "supportsModification": true 136 | }, 137 | { 138 | "userAdded": false, 139 | "type": "UnityEngine.Texture", 140 | "ignore": false, 141 | "defaultInstantiationMode": 0, 142 | "supportsModification": true 143 | }, 144 | { 145 | "userAdded": false, 146 | "type": "UnityEngine.Texture2D", 147 | "ignore": false, 148 | "defaultInstantiationMode": 0, 149 | "supportsModification": true 150 | }, 151 | { 152 | "userAdded": false, 153 | "type": "UnityEngine.Timeline.TimelineAsset", 154 | "ignore": false, 155 | "defaultInstantiationMode": 0, 156 | "supportsModification": true 157 | } 158 | ], 159 | "defaultDependencyTypeInfo": { 160 | "userAdded": false, 161 | "type": "", 162 | "ignore": false, 163 | "defaultInstantiationMode": 1, 164 | "supportsModification": true 165 | }, 166 | "newSceneOverride": 0 167 | } -------------------------------------------------------------------------------- /ProjectSettings/ShaderGraphSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | customInterpolatorErrorThreshold: 32 16 | customInterpolatorWarningThreshold: 16 17 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 6 16 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # shader-pong 2 | 3 | A simplistic game of pong implemented in a fragment shader and custom Unity render pipeline, including Audio, AI, Physics and Gameplay, all controlled through the shader (as much as possible). This project is simply a proof of concept to see if it's feasible to build a game within a fragment shader, and certainly isn't meant to represent any kind of polished game. 4 | 5 | There are definitely bugs. 6 | 7 | For more information on the approach, [check out the YouTube video](https://www.youtube.com/watch?v=e-hTTVr_pDI)! 8 | 9 | ## License 10 | 11 | The majority of this project is made available under the [MIT License](./LICENSE), so you're free to use it for any purpose. 12 | 13 | The `_lineLine` and `_lineRect` functions in `Physics.hlsl` are adapted from [jeffreythompson.org](http://www.jeffreythompson.org/) under the [Creative Commons Attribution, Non-Commercial, Share-Alike license](http://www.jeffreythompson.org/collision-detection/license.php). 14 | --------------------------------------------------------------------------------