├── .gitignore ├── LICENSE ├── README.md └── UnityProject ├── Assets ├── GameOfLife.unity ├── GameOfLife.unity.meta ├── Materials.meta ├── Materials │ ├── Ball10Mat.mat │ ├── Ball10Mat.mat.meta │ ├── Ball11Mat.mat │ ├── Ball11Mat.mat.meta │ ├── Ball12Mat.mat │ ├── Ball12Mat.mat.meta │ ├── Ball13Mat.mat │ ├── Ball13Mat.mat.meta │ ├── Ball14Mat.mat │ ├── Ball14Mat.mat.meta │ ├── Ball15Mat.mat │ ├── Ball15Mat.mat.meta │ ├── Ball1Mat.mat │ ├── Ball1Mat.mat.meta │ ├── Ball2Mat.mat │ ├── Ball2Mat.mat.meta │ ├── Ball3Mat.mat │ ├── Ball3Mat.mat.meta │ ├── Ball4Mat.mat │ ├── Ball4Mat.mat.meta │ ├── Ball5Mat.mat │ ├── Ball5Mat.mat.meta │ ├── Ball6Mat.mat │ ├── Ball6Mat.mat.meta │ ├── Ball7Mat.mat │ ├── Ball7Mat.mat.meta │ ├── Ball8Mat.mat │ ├── Ball8Mat.mat.meta │ ├── Ball9Mat.mat │ ├── Ball9Mat.mat.meta │ ├── BasicMat.mat │ ├── BasicMat.mat.meta │ ├── FloorMat.mat │ └── FloorMat.mat.meta ├── Resources.meta ├── Resources │ ├── CustomBall1.prefab │ ├── CustomBall1.prefab.meta │ ├── CustomBall10.prefab │ ├── CustomBall10.prefab.meta │ ├── CustomBall11.prefab │ ├── CustomBall11.prefab.meta │ ├── CustomBall12.prefab │ ├── CustomBall12.prefab.meta │ ├── CustomBall13.prefab │ ├── CustomBall13.prefab.meta │ ├── CustomBall14.prefab │ ├── CustomBall14.prefab.meta │ ├── CustomBall15.prefab │ ├── CustomBall15.prefab.meta │ ├── CustomBall2.prefab │ ├── CustomBall2.prefab.meta │ ├── CustomBall3.prefab │ ├── CustomBall3.prefab.meta │ ├── CustomBall4.prefab │ ├── CustomBall4.prefab.meta │ ├── CustomBall5.prefab │ ├── CustomBall5.prefab.meta │ ├── CustomBall6.prefab │ ├── CustomBall6.prefab.meta │ ├── CustomBall7.prefab │ ├── CustomBall7.prefab.meta │ ├── CustomBall8.prefab │ ├── CustomBall8.prefab.meta │ ├── CustomBall9.prefab │ ├── CustomBall9.prefab.meta │ ├── StandardBall1.prefab │ ├── StandardBall1.prefab.meta │ ├── StandardBall10.prefab │ ├── StandardBall10.prefab.meta │ ├── StandardBall11.prefab │ ├── StandardBall11.prefab.meta │ ├── StandardBall12.prefab │ ├── StandardBall12.prefab.meta │ ├── StandardBall13.prefab │ ├── StandardBall13.prefab.meta │ ├── StandardBall14.prefab │ ├── StandardBall14.prefab.meta │ ├── StandardBall15.prefab │ ├── StandardBall15.prefab.meta │ ├── StandardBall2.prefab │ ├── StandardBall2.prefab.meta │ ├── StandardBall3.prefab │ ├── StandardBall3.prefab.meta │ ├── StandardBall4.prefab │ ├── StandardBall4.prefab.meta │ ├── StandardBall5.prefab │ ├── StandardBall5.prefab.meta │ ├── StandardBall6.prefab │ ├── StandardBall6.prefab.meta │ ├── StandardBall7.prefab │ ├── StandardBall7.prefab.meta │ ├── StandardBall8.prefab │ ├── StandardBall8.prefab.meta │ ├── StandardBall9.prefab │ └── StandardBall9.prefab.meta ├── RigidBodyCPU.unity ├── RigidBodyCPU.unity.meta ├── RigidBodyOrientation.unity ├── RigidBodyOrientation.unity.meta ├── RigidBodyPosition.unity ├── RigidBodyPosition.unity.meta ├── Samples.meta ├── Samples │ ├── BlendModes.meta │ ├── BlendModes │ │ ├── BlendModes.unity │ │ ├── BlendModes.unity.meta │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── BackgroundMat.mat │ │ │ ├── BackgroundMat.mat.meta │ │ │ ├── MultiplyMat.mat │ │ │ ├── MultiplyMat.mat.meta │ │ │ ├── ScreenMat.mat │ │ │ ├── ScreenMat.mat.meta │ │ │ ├── SoftLightMat.mat │ │ │ └── SoftLightMat.mat.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ │ ├── BlendModes.cs │ │ │ └── BlendModes.cs.meta │ │ ├── Shaders.meta │ │ └── Shaders │ │ │ ├── BlendModes.cginc │ │ │ ├── BlendModes.cginc.meta │ │ │ ├── BlendModes.shader │ │ │ └── BlendModes.shader.meta │ ├── CommonAssets.meta │ ├── CommonAssets │ │ ├── Textures.meta │ │ └── Textures │ │ │ ├── DistortionBump.bmp │ │ │ ├── DistortionBump.bmp.meta │ │ │ ├── Jellyfish.jpg │ │ │ ├── Jellyfish.jpg.meta │ │ │ ├── Tulips.jpg │ │ │ ├── Tulips.jpg.meta │ │ │ ├── gradient.png │ │ │ └── gradient.png.meta │ ├── GrabPassDistortion.meta │ ├── GrabPassDistortion │ │ ├── GrabPassDistortion.unity │ │ ├── GrabPassDistortion.unity.meta │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── BackgroundMat.mat │ │ │ ├── BackgroundMat.mat.meta │ │ │ ├── DistortionMat.mat │ │ │ └── DistortionMat.mat.meta │ │ ├── Shaders.meta │ │ └── Shaders │ │ │ ├── GrabPassDistortion.cginc │ │ │ ├── GrabPassDistortion.cginc.meta │ │ │ ├── GrabPassDistortion.shader │ │ │ └── GrabPassDistortion.shader.meta │ ├── JuliaSet.meta │ ├── JuliaSet │ │ ├── JuliaSet.unity │ │ ├── JuliaSet.unity.meta │ │ ├── Materials.meta │ │ ├── Materials │ │ │ ├── JuliaSetMat.mat │ │ │ └── JuliaSetMat.mat.meta │ │ ├── Scripts.meta │ │ ├── Scripts │ │ │ ├── JuliaSet.cs │ │ │ └── JuliaSet.cs.meta │ │ ├── Shaders.meta │ │ └── Shaders │ │ │ ├── JuliaSet.cginc │ │ │ ├── JuliaSet.cginc.meta │ │ │ ├── JuliaSet.shader │ │ │ └── JuliaSet.shader.meta │ ├── MeshExplode.meta │ └── MeshExplode │ │ ├── Materials.meta │ │ ├── Materials │ │ ├── MeshExplodeMat.mat │ │ └── MeshExplodeMat.mat.meta │ │ ├── MeshExplode.unity │ │ ├── MeshExplode.unity.meta │ │ ├── Shaders.meta │ │ └── Shaders │ │ ├── MeshExplode.cginc │ │ ├── MeshExplode.cginc.meta │ │ ├── MeshExplode.shader │ │ └── MeshExplode.shader.meta ├── Scripts.meta ├── Scripts │ ├── BallGenerator.cs │ ├── BallGenerator.cs.meta │ ├── BufferExample.cs │ ├── BufferExample.cs.meta │ ├── IObjectGenerator.cs │ ├── IObjectGenerator.cs.meta │ ├── RigidBodyOrientation.cs │ ├── RigidBodyOrientation.cs.meta │ ├── RigidBodyPosition.cs │ ├── RigidBodyPosition.cs.meta │ ├── TextureExample.cs │ ├── TextureExample.cs.meta │ ├── UnityStandardPhysicsExample.cs │ ├── UnityStandardPhysicsExample.cs.meta │ ├── Utilities.meta │ └── Utilities │ │ ├── ClickAndDrag.cs │ │ ├── ClickAndDrag.cs.meta │ │ ├── FPSDisplay.cs │ │ └── FPSDisplay.cs.meta ├── Shaders.meta ├── Shaders │ ├── ComputeShaders.meta │ ├── ComputeShaders │ │ ├── BasicBuffer.compute │ │ ├── BasicBuffer.compute.meta │ │ ├── BasicTexture.compute │ │ ├── BasicTexture.compute.meta │ │ ├── IntegrateOrientation.compute │ │ ├── IntegrateOrientation.compute.meta │ │ ├── IntegratePosition.compute │ │ ├── IntegratePosition.compute.meta │ │ ├── TextureCopy.compute │ │ └── TextureCopy.compute.meta │ ├── GSPassThrough.shader │ ├── GSPassThrough.shader.meta │ ├── Unlit.shader │ └── Unlit.shader.meta ├── Textures.meta └── Textures │ ├── Ball1.png │ ├── Ball1.png.meta │ ├── Ball10.png │ ├── Ball10.png.meta │ ├── Ball11.png │ ├── Ball11.png.meta │ ├── Ball12.png │ ├── Ball12.png.meta │ ├── Ball13.png │ ├── Ball13.png.meta │ ├── Ball14.png │ ├── Ball14.png.meta │ ├── Ball15.png │ ├── Ball15.png.meta │ ├── Ball2.png │ ├── Ball2.png.meta │ ├── Ball3.png │ ├── Ball3.png.meta │ ├── Ball4.png │ ├── Ball4.png.meta │ ├── Ball5.png │ ├── Ball5.png.meta │ ├── Ball6.png │ ├── Ball6.png.meta │ ├── Ball7.png │ ├── Ball7.png.meta │ ├── Ball8.png │ ├── Ball8.png.meta │ ├── Ball9.png │ ├── Ball9.png.meta │ ├── Floor.jpg │ └── Floor.jpg.meta ├── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset └── Screenshots └── CPU.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | 45 | bin 46 | obj 47 | Library 48 | UnityVS 49 | UnityVS.meta 50 | Temp 51 | *.csproj 52 | *.sln 53 | *.DotSettings 54 | *.suo 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rigidbody-gpu 2 | Rigid Body Simulation on the GPU 3 | 4 | ## Inspiration 5 | * [Real-Time Rigid Body Simulation on GPUs](http://http.developer.nvidia.com/GPUGems3/gpugems3_ch29.html) 6 | * [Unity Compute Shaders](https://www.youtube.com/watch?v=wf9nadEEmtw) 7 | 8 | ###### Please see the wiki for further information 9 | 10 | ## Screenshots 11 | Unity example - 10240 spheres with colliders attached 12 | ![Alt text](https://github.com/ajon542/rigidbody-gpu/blob/master/UnityProject/Screenshots/CPU.png "Unity CPU Example") -------------------------------------------------------------------------------- /UnityProject/Assets/GameOfLife.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/GameOfLife.unity -------------------------------------------------------------------------------- /UnityProject/Assets/GameOfLife.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09d8ce11a930ae04395b6dcff578f223 3 | timeCreated: 1462916889 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 512ffec89d780e446ad171e4c8e119bf 3 | folderAsset: yes 4 | timeCreated: 1462916818 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball10Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball10Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball10Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3443a311a19dc3e4c8d570edd5b8aed2 3 | timeCreated: 1463343333 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball11Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball11Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball11Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc55fc2606dd63f45aea9d1bdec1a49b 3 | timeCreated: 1463343388 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball12Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball12Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball12Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca1b0c0a59c242e4fa7a1f397d917547 3 | timeCreated: 1463343389 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball13Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball13Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball13Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8ebd712a4d86b143947750bfc836726 3 | timeCreated: 1463343389 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball14Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball14Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball14Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8897894e20a3abd47b91252f00ba05c7 3 | timeCreated: 1463343390 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball15Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball15Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball15Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a07bf7d6b6f6cbf4ea98c4d6e1e0d4ef 3 | timeCreated: 1463343390 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball1Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball1Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball1Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a9b4c187c3726c43bc6b7d908fcc7b4 3 | timeCreated: 1463343266 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball2Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball2Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball2Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed0dd89f876c7874a8a1a1eb477dd578 3 | timeCreated: 1463343329 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball3Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball3Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball3Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ecc18be8727b304dac3d7998b4eb3a2 3 | timeCreated: 1463343330 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball4Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball4Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball4Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a8aa292b9b10e8489deb6869281732c 3 | timeCreated: 1463343331 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball5Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball5Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball5Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75f231be01d6d00439150f421d83043a 3 | timeCreated: 1463343331 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball6Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball6Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball6Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4440cfd4b70f4b440a38a7ccd808f755 3 | timeCreated: 1463343332 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball7Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball7Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball7Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c39248d09954b34ba2d0fc0e27f56a1 3 | timeCreated: 1463343332 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball8Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball8Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball8Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59407abb4cb4ba2428f9ddd025de8dcb 3 | timeCreated: 1463343332 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball9Mat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/Ball9Mat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/Ball9Mat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e48303bc8a57dff48beeb30a951e66fa 3 | timeCreated: 1463343333 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/BasicMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/BasicMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/BasicMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2fe4343338b5c6a4cba5097799910390 3 | timeCreated: 1462916855 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/FloorMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Materials/FloorMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Materials/FloorMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aad95370efc51b645a33799e7b3da0c8 3 | timeCreated: 1465532640 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4da052382ed318429187a678b2b2b45 3 | folderAsset: yes 4 | timeCreated: 1463343641 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall1.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall1.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bf8e64025b43c241bd45e9fcb544a1e 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall10.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall10.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall10.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2db773a580182d844bfc639abc15994f 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall11.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall11.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall11.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 602274c104a895041b14ae54b32e5042 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall12.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall12.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall12.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c59ff249832a22b459ecc42600079670 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall13.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall13.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall13.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1090470e3779e940b72d5bbd04817ae 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall14.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall14.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall14.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e03e96aa2a4ae4d42902f1ece93c3487 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall15.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall15.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall15.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa2f2697910158d49ae264a48c024de1 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall2.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall2.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d743ce90df1146345addfd26e1c0e028 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall3.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall3.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall3.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0edf5a8b88245964abd079ca59c5a74d 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall4.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall4.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall4.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a2535b375c94734082f8c385f116c93 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall5.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall5.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall5.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff0812663ce6c0440990b057588516ad 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall6.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall6.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall6.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79382491d769df847a6103e1a3b9b517 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall7.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall7.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall7.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 403346ef909cff54f92f1dadb59502bb 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall8.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall8.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall8.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f65f0feacc811664ab33ebc490482a84 3 | timeCreated: 1463703497 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall9.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/CustomBall9.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/CustomBall9.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50f0175430b9c0449a9756dde80a3805 3 | timeCreated: 1463703496 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall1.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall1.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall1.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 694f9a66460b4ba469c232dd380ed4ba 3 | timeCreated: 1463340900 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall10.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall10.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall10.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 846edbbfb089f9e4b9be95a4cf961865 3 | timeCreated: 1463343526 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall11.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall11.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall11.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98154b23944b31e438298ae25fa0a9ae 3 | timeCreated: 1463343526 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall12.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall12.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall12.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e69df2d7b3132c4298e3bc9a399b5f3 3 | timeCreated: 1463343527 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall13.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall13.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall13.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52d90d7f81a64f54786998e668e5c939 3 | timeCreated: 1463343527 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall14.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall14.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall14.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cfe2bbd5a596b04c8333f95396c98fd 3 | timeCreated: 1463343528 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall15.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall15.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall15.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2b67293c10b65b4f952cd5a2a470241 3 | timeCreated: 1463343528 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall2.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall2.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall2.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d684349a313d27c4aa8e87acebc73245 3 | timeCreated: 1463343522 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall3.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall3.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall3.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 379ccdddd146f4b48b5323b75d673cc8 3 | timeCreated: 1463343523 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall4.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall4.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall4.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78309d1075e0b91478c8d487778613fd 3 | timeCreated: 1463343523 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall5.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall5.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall5.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15a9a3f80647f6c45a8e41ee67b183b4 3 | timeCreated: 1463343524 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall6.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall6.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall6.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 344acb6f2e126ac47bb9d39d26f43ab2 3 | timeCreated: 1463343524 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall7.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall7.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall7.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbce83f5fb94b2e43b537a15eb1f002c 3 | timeCreated: 1463343525 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall8.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall8.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall8.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fde79dd846ae224ea5a7006056cace7 3 | timeCreated: 1463343525 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall9.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Resources/StandardBall9.prefab -------------------------------------------------------------------------------- /UnityProject/Assets/Resources/StandardBall9.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b161b34f49f4fd41b028e673dc78577 3 | timeCreated: 1463343525 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/RigidBodyCPU.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/RigidBodyCPU.unity -------------------------------------------------------------------------------- /UnityProject/Assets/RigidBodyCPU.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e710a4188ce9d146bc96c641318f3f6 3 | timeCreated: 1463340112 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/RigidBodyOrientation.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/RigidBodyOrientation.unity -------------------------------------------------------------------------------- /UnityProject/Assets/RigidBodyOrientation.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fb6947ef6f7ff54d9c54d197116d068 3 | timeCreated: 1464305418 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/RigidBodyPosition.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/RigidBodyPosition.unity -------------------------------------------------------------------------------- /UnityProject/Assets/RigidBodyPosition.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e2e4ad8985e7bd4dbca654fc4121196 3 | timeCreated: 1463452134 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a89407b0d725ada4ab15fb5ee1aa54ce 3 | folderAsset: yes 4 | timeCreated: 1464974802 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f56ecb736f19ba4488c9120215c4c899 3 | folderAsset: yes 4 | timeCreated: 1465867174 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/BlendModes.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/BlendModes/BlendModes.unity -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/BlendModes.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1311fbe17502e6741bf4c2dd5dda8b8f 3 | timeCreated: 1465867637 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee045c7fb4b170c4080d723c9af7e0eb 3 | folderAsset: yes 4 | timeCreated: 1465867186 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/BackgroundMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/BlendModes/Materials/BackgroundMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/BackgroundMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b05b1330993369244b4132546d83d01c 3 | timeCreated: 1465867693 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/MultiplyMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/BlendModes/Materials/MultiplyMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/MultiplyMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59643a91bd01eac458706c8a6fd52b62 3 | timeCreated: 1465964162 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/ScreenMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/BlendModes/Materials/ScreenMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/ScreenMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48ea1c4981f933b46ad132360a111580 3 | timeCreated: 1465964366 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/SoftLightMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/BlendModes/Materials/SoftLightMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Materials/SoftLightMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 29f457e70807c3e45baf04f577ea6deb 3 | timeCreated: 1465867663 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c7cde2f09e0088438c08c1db7cbfd61 3 | folderAsset: yes 4 | timeCreated: 1465965068 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Scripts/BlendModes.cs: -------------------------------------------------------------------------------- 1 |  2 | // http://industrydev.com/learning-the-difference-between-blending-modes-in-adobe-photoshop/ 3 | // https://en.wikipedia.org/wiki/Blend_modes 4 | public enum BlendModes 5 | { 6 | Multiply = 0, 7 | Screen = 1, 8 | SoftLight = 2, 9 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Scripts/BlendModes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 325d59f6cdfb9614695223ba0f75d8d1 3 | timeCreated: 1465965056 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff4101e181e9c394e8b7db5b1bcbcf5e 3 | folderAsset: yes 4 | timeCreated: 1465867192 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Shaders/BlendModes.cginc: -------------------------------------------------------------------------------- 1 | #ifndef BLENDMODES_GCINC 2 | #define BLENDMODES_GCINC 3 | 4 | #include "UnityCG.cginc" 5 | 6 | #define Multiply 0 7 | #define Screen 1 8 | #define SoftLight 2 9 | 10 | // ---------------------------------------------------------------------------- 11 | // Variables 12 | // ---------------------------------------------------------------------------- 13 | sampler2D _MainTex; 14 | sampler2D _GrabTexture; 15 | float4 _GrabTexture_ST; 16 | 17 | float4 _MainTex_ST; 18 | fixed4 _TintColor; 19 | int _Blend; 20 | 21 | // ---------------------------------------------------------------------------- 22 | // Data Structures 23 | // ---------------------------------------------------------------------------- 24 | struct appdata_t { 25 | float4 vertex : POSITION; 26 | fixed4 color : COLOR; 27 | float2 texcoord : TEXCOORD0; 28 | }; 29 | 30 | struct v2f { 31 | float4 vertex : SV_POSITION; 32 | fixed4 color : COLOR; 33 | half2 texcoord : TEXCOORD0; 34 | half4 screencoord : TEXCOORD1; 35 | }; 36 | 37 | // ---------------------------------------------------------------------------- 38 | // Vertex Shader 39 | // ---------------------------------------------------------------------------- 40 | v2f vert (appdata_t v) 41 | { 42 | v2f o; 43 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 44 | o.screencoord = ComputeGrabScreenPos(o.vertex); 45 | o.color = v.color; 46 | o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 47 | return o; 48 | } 49 | 50 | // ---------------------------------------------------------------------------- 51 | // Pixel Shader 52 | // ---------------------------------------------------------------------------- 53 | fixed4 frag (v2f i) : SV_Target 54 | { 55 | // get the bottom layer color 56 | float2 grabUV = i.screencoord.xy / i.screencoord.w; 57 | fixed4 grabColor = tex2D(_GrabTexture, grabUV); 58 | 59 | fixed4 color = i.color * _TintColor * tex2D(_MainTex, i.texcoord); 60 | 61 | if (_Blend == Multiply) 62 | { 63 | color.rgb *= grabColor.rgb; 64 | } 65 | 66 | if (_Blend == Screen) 67 | { 68 | color.rgb = 1 - (1 - color.rgb) * (1 - grabColor.rgb); 69 | } 70 | 71 | if (_Blend == SoftLight) 72 | { 73 | color.rgb = grabColor.rgb > 0.5 ? (1 - (1-grabColor.rgb) * (1-(color.rgb-0.5))) : (grabColor.rgb * (color.rgb+0.5)); 74 | } 75 | 76 | return color; 77 | } 78 | 79 | #endif // BLENDMODES_GCINC -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Shaders/BlendModes.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: efd6580b55b41d34ba03ad9ad2b65ab6 3 | timeCreated: 1465867249 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Shaders/BlendModes.shader: -------------------------------------------------------------------------------- 1 |  2 | Shader "Samples/BlendModes/Blend Modes" { 3 | 4 | Properties { 5 | _TintColor ("Tint Color", Color) = (1.0,1.0,1.0,1.0) 6 | _MainTex ("Texture", 2D) = "white" {} 7 | [Enum(BlendModes)] _Blend ("Blend mode", int) = 0 8 | } 9 | 10 | SubShader { 11 | 12 | Tags { 13 | "Queue" = "Transparent" 14 | "IgnoreProjector" = "True" 15 | "RenderType"="Transparent" 16 | } 17 | 18 | Cull Off 19 | Lighting Off 20 | ZWrite Off 21 | ZTest Always 22 | 23 | GrabPass { "_GrabTexture" } 24 | 25 | Pass { 26 | 27 | Blend SrcAlpha OneMinusSrcAlpha 28 | 29 | CGPROGRAM 30 | 31 | #pragma vertex vert 32 | #pragma fragment frag 33 | 34 | #include "BlendModes.cginc" 35 | 36 | ENDCG 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/BlendModes/Shaders/BlendModes.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51c4748da479cba4581367017253ca13 3 | timeCreated: 1465867249 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e393894f9c575847b016de6b79520ff 3 | folderAsset: yes 4 | timeCreated: 1464982101 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e8e2e59a7d96b24798d99e3047a4c0e 3 | folderAsset: yes 4 | timeCreated: 1464982108 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/DistortionBump.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/CommonAssets/Textures/DistortionBump.bmp -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/DistortionBump.bmp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3fb1cc6f6ce4e614298a467e639c168c 3 | timeCreated: 1464975271 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/Jellyfish.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/CommonAssets/Textures/Jellyfish.jpg -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/Jellyfish.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6929f4101d87db54aaf403023a98e03a 3 | timeCreated: 1465963984 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/Tulips.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/CommonAssets/Textures/Tulips.jpg -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/Tulips.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f102921257479e42b1faaf20c0bf121 3 | timeCreated: 1464975130 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/CommonAssets/Textures/gradient.png -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/CommonAssets/Textures/gradient.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 247abc711cf6c72498873bfd57f9079c 3 | timeCreated: 1465963984 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 485ed833d6d3b6e45b8ad72e368f25d2 3 | folderAsset: yes 4 | timeCreated: 1464974822 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/GrabPassDistortion.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/GrabPassDistortion/GrabPassDistortion.unity -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/GrabPassDistortion.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2c4e1452070a8c4482b6b280d49cbc3 3 | timeCreated: 1464974908 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1555bbf01432874985cfe1b88b300f6 3 | folderAsset: yes 4 | timeCreated: 1464974884 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Materials/BackgroundMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/GrabPassDistortion/Materials/BackgroundMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Materials/BackgroundMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07920f224b26dc541a9cb7302fe49d0f 3 | timeCreated: 1464975037 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Materials/DistortionMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/GrabPassDistortion/Materials/DistortionMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Materials/DistortionMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e3a54094140d1c04383062d9519a0923 3 | timeCreated: 1464975205 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdb26e31017a76d459f4e0330749e7de 3 | folderAsset: yes 4 | timeCreated: 1464974870 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Shaders/GrabPassDistortion.cginc: -------------------------------------------------------------------------------- 1 | #ifndef GRABPASSDISTORTION_GCINC 2 | #define GRABPASSDISTORTION_GCINC 3 | 4 | // ---------------------------------------------------------------------------- 5 | // Variables 6 | // ---------------------------------------------------------------------------- 7 | sampler2D _GrabTexture; 8 | uniform float _DistortionValue; 9 | uniform sampler2D _DistortionTexture; 10 | uniform float4 _DistortionTexture_ST; 11 | 12 | // ---------------------------------------------------------------------------- 13 | // Data Structures 14 | // ---------------------------------------------------------------------------- 15 | struct appdata_t { 16 | float4 vertex : POSITION; 17 | half2 texcoord : TEXCOORD0; 18 | fixed4 color : COLOR; 19 | }; 20 | 21 | struct v2f { 22 | float4 vertex : SV_POSITION; 23 | fixed4 color : COLOR; 24 | half2 texcoord : TEXCOORD0; 25 | half4 screenuv : TEXCOORD1; 26 | }; 27 | 28 | // ---------------------------------------------------------------------------- 29 | // Vertex Shader 30 | // ---------------------------------------------------------------------------- 31 | v2f vert (appdata_t v) { 32 | v2f o = (v2f)0; 33 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 34 | o.color = v.color; 35 | 36 | // texcoord.xy stores the distortion texture coordinates. 37 | o.texcoord = v.texcoord; 38 | 39 | // Compute the grab screen position from the vertex. 40 | o.screenuv = ComputeGrabScreenPos(o.vertex); 41 | 42 | return o; 43 | } 44 | 45 | // ---------------------------------------------------------------------------- 46 | // Pixel Shader 47 | // ---------------------------------------------------------------------------- 48 | fixed4 frag (v2f i) : COLOR { 49 | 50 | half2 distUV = i.texcoord.xy; 51 | 52 | // Sample the distortion texture. 53 | float4 distColor = tex2D(_DistortionTexture, TRANSFORM_TEX(distUV, _DistortionTexture)); 54 | 55 | // Use the distortion texture to calculate the grab texture coordinates. 56 | float u = (i.screenuv.xy.r + ((distColor.r - 0.5) * _DistortionValue)); 57 | float v = (i.screenuv.xy.g + ((distColor.g - 0.5) * _DistortionValue)); 58 | float2 grabUV = float2(u, v); 59 | 60 | // Sample the grab texture. 61 | float4 grabColor = tex2D(_GrabTexture, grabUV); 62 | return grabColor; 63 | } 64 | 65 | #endif // GRABPASSDISTORTION_GCINC 66 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Shaders/GrabPassDistortion.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 584bbfd90adaab044bdeb49cc4f146db 3 | timeCreated: 1464974960 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Shaders/GrabPassDistortion.shader: -------------------------------------------------------------------------------- 1 | Shader "Samples/GrabPassDistortion/GrabPass Distortion" { 2 | 3 | Properties { 4 | _DistortionTexture ("DistortionTexture", 2D) = "black" {} 5 | _DistortionValue ("Distortion Value", Range(0, 0.15)) = 0.07692308 6 | } 7 | 8 | SubShader { 9 | 10 | Tags { 11 | "Queue" = "Transparent" 12 | "IgnoreProjector" = "True" 13 | "RenderType"="Transparent" 14 | } 15 | 16 | //Blend SrcAlpha OneMinusSrcAlpha 17 | Lighting Off 18 | Fog { Mode Off } 19 | ZWrite Off 20 | ZTest Always 21 | Cull Off 22 | 23 | // See http://docs.unity3d.com/Manual/SL-GrabPass.html 24 | // Will grab screen contents into a texture, but will only do that once per frame for 25 | // the first object that uses the given texture name. 26 | GrabPass { "_GrabTexture" } 27 | 28 | Pass { 29 | CGPROGRAM 30 | #pragma vertex vert 31 | #pragma fragment frag 32 | 33 | #include "UnityCG.cginc" 34 | #include "GrabPassDistortion.cginc" 35 | ENDCG 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/GrabPassDistortion/Shaders/GrabPassDistortion.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a84f1d9ac3a29ae46b75ffa77bb750d9 3 | timeCreated: 1464974960 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a722461d7a2982046a090a4571b29941 3 | folderAsset: yes 4 | timeCreated: 1472841624 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/JuliaSet.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/JuliaSet/JuliaSet.unity -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/JuliaSet.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a30908bfe6d1adb42b81a57f1fe1bb7c 3 | timeCreated: 1472841643 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12b4d70615b538e428b009b196e180b7 3 | folderAsset: yes 4 | timeCreated: 1472847214 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Materials/JuliaSetMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/JuliaSet/Materials/JuliaSetMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Materials/JuliaSetMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc4feb8295300bf4a8b9726a1de47234 3 | timeCreated: 1472847208 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95bba7a617276f744a67eccb974aa8c1 3 | folderAsset: yes 4 | timeCreated: 1472841897 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Scripts/JuliaSet.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class JuliaSet : MonoBehaviour 5 | { 6 | void Start() 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Scripts/JuliaSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 191b613ff6e1d90419c39d0548da26a9 3 | timeCreated: 1472842146 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b8cd00b610fe714d88ac5f74601504d 3 | folderAsset: yes 4 | timeCreated: 1472847129 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Shaders/JuliaSet.cginc: -------------------------------------------------------------------------------- 1 | #ifndef JULIASET_GCINC 2 | #define JULIASET_GCINC 3 | 4 | // ---------------------------------------------------------------------------- 5 | // Variables 6 | // ---------------------------------------------------------------------------- 7 | sampler2D _MainTex; 8 | float4 _MainTex_ST; 9 | float _Bounds; 10 | 11 | // ---------------------------------------------------------------------------- 12 | // Data Structures 13 | // ---------------------------------------------------------------------------- 14 | struct appdata { 15 | float4 vertex : POSITION; 16 | float2 uv : TEXCOORD0; 17 | }; 18 | 19 | struct v2f { 20 | float2 uv : TEXCOORD0; 21 | float4 vertex : SV_POSITION; 22 | }; 23 | 24 | struct Complex { 25 | float real; 26 | float imag; 27 | }; 28 | 29 | // ---------------------------------------------------------------------------- 30 | // Functions 31 | // ---------------------------------------------------------------------------- 32 | 33 | // Get the result of adding two complex numbers. 34 | Complex ComplexAdd (Complex a, Complex b) { 35 | Complex result; 36 | result.real = a.real + b.real; 37 | result.imag = a.imag + b.imag; 38 | return result; 39 | } 40 | 41 | // Gets the result of multiplying two complex numbers. 42 | Complex ComplexMul (Complex a, Complex b) { 43 | Complex result; 44 | result.real = (a.real * b.real) - (a.imag * b.imag); 45 | result.imag = (a.real * b.imag) + (a.imag * b.real); 46 | return result; 47 | } 48 | 49 | // Gets the absolute value squared (or magnitude squared) of a complex number. 50 | float ComplexAbs(Complex a) { 51 | return (a.real * a.real) + (a.imag * a.imag); 52 | } 53 | 54 | // Perform a quadratic iteration to generate the Julia set. 55 | int QuadraticIteration (Complex z, Complex c) { 56 | int iterations = 0; 57 | while (iterations < 1024 && ComplexAbs(z) < 20) { 58 | Complex tmp = ComplexMul(z, z); 59 | z = ComplexAdd(tmp, c); 60 | iterations++; 61 | } 62 | return iterations; 63 | } 64 | 65 | // Convert a color in range [0, 255] to range [0, 1]. 66 | float4 ConvertColor (int r, int g, int b) { 67 | return float4(r/255.0, g/255.0, b/255.0, 1); 68 | } 69 | 70 | // Generate a color for the Julia set. 71 | float4 GetColor(int iterations) { 72 | float value = 3.5 * iterations; 73 | int component = fmod(value, 255); 74 | 75 | if (value > 700) { 76 | return ConvertColor(255, 255, component); 77 | } 78 | else if (value > 255) { 79 | return ConvertColor(255, component, 0); 80 | } 81 | else { 82 | return ConvertColor(component, 0, 0); 83 | } 84 | } 85 | 86 | 87 | // ---------------------------------------------------------------------------- 88 | // Vertex Shader 89 | // ---------------------------------------------------------------------------- 90 | v2f vert (appdata v) { 91 | v2f o; 92 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 93 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 94 | return o; 95 | } 96 | 97 | // ---------------------------------------------------------------------------- 98 | // Pixel Shader 99 | // ---------------------------------------------------------------------------- 100 | fixed4 frag (v2f i) : SV_Target { 101 | 102 | float xMin = -_Bounds; 103 | float xMax = _Bounds; 104 | float yMin = -_Bounds; 105 | float yMax = _Bounds; 106 | float xDelta = xMax - xMin; 107 | float yDelta = yMax - yMin; 108 | 109 | // Initialize the dynamic system; 110 | Complex z; 111 | z.real = -_Bounds + i.uv.x * xDelta; 112 | z.imag = -_Bounds + i.uv.y * yDelta; 113 | 114 | Complex c; 115 | c.real = -0.8; 116 | c.imag = 0.156; 117 | 118 | // Perform the iterations. 119 | int iterations = QuadraticIteration(z, c); 120 | 121 | // Obtain the color. 122 | fixed4 col = GetColor(iterations); 123 | return col; 124 | } 125 | 126 | #endif // JULIASET_GCINC 127 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Shaders/JuliaSet.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55b30d509dbe4384dbc7db143ce63279 3 | timeCreated: 1472847466 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Shaders/JuliaSet.shader: -------------------------------------------------------------------------------- 1 | Shader "Samples/JuliaSet/Julia Set" { 2 | Properties { 3 | _MainTex ("Texture", 2D) = "white" {} 4 | _Bounds ("Bounds", Float) = 2 5 | } 6 | 7 | SubShader { 8 | Tags { "RenderType"="Opaque" } 9 | LOD 100 10 | 11 | Pass { 12 | CGPROGRAM 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | 16 | #include "UnityCG.cginc" 17 | #include "JuliaSet.cginc" 18 | ENDCG 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/JuliaSet/Shaders/JuliaSet.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe920c33c5ff46e468efb0c565b8092f 3 | timeCreated: 1472847118 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1be1842ca69f8f42add455897a8dad7 3 | folderAsset: yes 4 | timeCreated: 1464976671 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 254c39b046df1c44d817de65e86f4c8a 3 | folderAsset: yes 4 | timeCreated: 1464976710 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Materials/MeshExplodeMat.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/MeshExplode/Materials/MeshExplodeMat.mat -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Materials/MeshExplodeMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2931b94a6ad72db45b26f5ec800407cc 3 | timeCreated: 1464976723 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/MeshExplode.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Samples/MeshExplode/MeshExplode.unity -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/MeshExplode.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2da5ef0d7974c7449317065fc088107 3 | timeCreated: 1464976788 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f513c3518d0b46a4e80a2453e60388c9 3 | folderAsset: yes 4 | timeCreated: 1464976678 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Shaders/MeshExplode.cginc: -------------------------------------------------------------------------------- 1 | #ifndef MESHEXPLODE_GCINC 2 | #define MESHEXPLODE_GCINC 3 | 4 | // ---------------------------------------------------------------------------- 5 | // Variables 6 | // ---------------------------------------------------------------------------- 7 | float _Size; 8 | float4x4 _VP; 9 | Texture2D _SpriteTex; 10 | SamplerState sampler_SpriteTex; 11 | 12 | // ---------------------------------------------------------------------------- 13 | // Data Structures 14 | // ---------------------------------------------------------------------------- 15 | struct GS_INPUT { 16 | float4 pos : POSITION; 17 | float3 normal : NORMAL; 18 | float2 tex0 : TEXCOORD0; 19 | }; 20 | 21 | struct FS_INPUT { 22 | float4 pos : POSITION; 23 | float2 tex0 : TEXCOORD0; 24 | }; 25 | 26 | // ---------------------------------------------------------------------------- 27 | // Vertex Shader 28 | // ---------------------------------------------------------------------------- 29 | GS_INPUT VS_Main(appdata_base v) { 30 | 31 | GS_INPUT output = (GS_INPUT)0; 32 | 33 | // Calculate the vertex position in world space. 34 | output.pos = mul(_Object2World, v.vertex); 35 | //output.normal = mul(_Object2World, v.normal); 36 | output.normal = v.normal; 37 | output.tex0 = TRANSFORM_UV(0); 38 | 39 | return output; 40 | } 41 | 42 | // ---------------------------------------------------------------------------- 43 | // Geometry Shader 44 | // ---------------------------------------------------------------------------- 45 | [maxvertexcount(3)] 46 | void GS_Main(triangle GS_INPUT p[3], inout TriangleStream triStream) { 47 | 48 | // Move each vertex along its normal in world space. 49 | float4 v[3]; 50 | v[0] = p[0].pos + float4(p[0].normal, 0) * _Size; 51 | v[1] = p[1].pos + float4(p[0].normal, 0) * _Size; 52 | v[2] = p[2].pos + float4(p[0].normal, 0) * _Size; 53 | 54 | // Output the vertices, multiplying by the view-projection matrix. 55 | FS_INPUT pIn; 56 | pIn.pos = mul(UNITY_MATRIX_VP, v[0]); 57 | pIn.tex0 = p[0].tex0; 58 | triStream.Append(pIn); 59 | 60 | pIn.pos = mul(UNITY_MATRIX_VP, v[1]); 61 | pIn.tex0 = p[1].tex0; 62 | triStream.Append(pIn); 63 | 64 | pIn.pos = mul(UNITY_MATRIX_VP, v[2]); 65 | pIn.tex0 = p[2].tex0; 66 | triStream.Append(pIn); 67 | } 68 | 69 | // ---------------------------------------------------------------------------- 70 | // Pixel Shader 71 | // ---------------------------------------------------------------------------- 72 | float4 FS_Main(FS_INPUT input) : COLOR { 73 | 74 | return _SpriteTex.Sample(sampler_SpriteTex, input.tex0); 75 | } 76 | 77 | #endif // MESHEXPLODE_GCINC 78 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Shaders/MeshExplode.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfba3fa8b866af94ba0fdfcd13138498 3 | timeCreated: 1464977010 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Shaders/MeshExplode.shader: -------------------------------------------------------------------------------- 1 | Shader "Samples/MeshExplode/Mesh Explode" { 2 | 3 | Properties { 4 | _SpriteTex ("Base (RGB)", 2D) = "white" {} 5 | _Size ("Size", Range(0, 3)) = 0.5 6 | } 7 | 8 | SubShader { 9 | Pass { 10 | Tags { "RenderType"="Opaque" } 11 | LOD 200 12 | 13 | CGPROGRAM 14 | #pragma target 5.0 15 | #pragma vertex VS_Main 16 | #pragma fragment FS_Main 17 | #pragma geometry GS_Main 18 | #include "UnityCG.cginc" 19 | #include "MeshExplode.cginc" 20 | ENDCG 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /UnityProject/Assets/Samples/MeshExplode/Shaders/MeshExplode.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c29a4791b250994589e0b4fd7c88990 3 | timeCreated: 1464976687 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96fbc398470078e4e9ead2ebba619bf8 3 | folderAsset: yes 4 | timeCreated: 1462916813 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/BallGenerator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | public class BallGenerator : IObjectGenerator 7 | { 8 | /// 9 | /// Generates a list of ball game objects. 10 | /// 11 | /// 12 | /// It is up to the caller to destroy the game objects. 13 | /// 14 | /// The parent game object for each ball. 15 | /// The number of balls to generate. 16 | /// The list of generated ball objects. 17 | public List Generate(GameObject parent, int ballCount) 18 | { 19 | List balls = new List(); 20 | GameObject go; 21 | for (int i = 0; i < ballCount; ++i) 22 | { 23 | // Random position. 24 | Vector3 randomPosition = new Vector3(Random.value * 100, Random.value * 100, Random.value * 100); 25 | 26 | // Random ball prefab. 27 | StringBuilder sb = new StringBuilder(); 28 | sb.Append("Custom"); 29 | sb.Append("Ball"); 30 | sb.Append(Random.Range(1, 16)); 31 | 32 | // Instantiate the prefab. 33 | go = (GameObject)GameObject.Instantiate(Resources.Load(sb.ToString(), typeof(GameObject)), randomPosition, Quaternion.identity); 34 | 35 | // Set the parent so the hierarchy window in Unity editor is clean. 36 | go.transform.parent = parent.transform; 37 | balls.Add(go); 38 | } 39 | return balls; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/BallGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 277627bdfba5e6943b75b47a1aecf613 3 | timeCreated: 1463341039 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/BufferExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// Example of running a simple compute shader to fill a buffer. 5 | /// 6 | public class BufferExample : MonoBehaviour 7 | { 8 | public ComputeShader shader; 9 | private ComputeBuffer buffer; 10 | 11 | private int kernelHandle; 12 | private int groupCount = 2; 13 | private int threadCount = 4; 14 | 15 | private int bufferSize; 16 | private int[] data; 17 | 18 | private void Start() 19 | { 20 | // Calculate the buffer size. 21 | bufferSize = groupCount * threadCount; 22 | data = new int[bufferSize]; 23 | 24 | // Create compute buffer. 25 | buffer = new ComputeBuffer(bufferSize, sizeof(int)); 26 | 27 | // Obtain the handle to the kernel to run. 28 | kernelHandle = shader.FindKernel("CSMain"); 29 | 30 | // Create some initial data. 31 | int[] initialBufferData = new int[] { 10, 20, 30, 40, 50, 60, 70, 80 }; 32 | buffer.SetData(initialBufferData); 33 | 34 | // Set the buffer on the compute shader. 35 | shader.SetBuffer(kernelHandle, "buffer", buffer); 36 | } 37 | 38 | private void Update() 39 | { 40 | if (Input.GetKeyDown(KeyCode.A)) 41 | { 42 | // Fill the buffer using the compute shader. 43 | shader.Dispatch(kernelHandle, groupCount, 1, 1); 44 | 45 | // Obtain the data. 46 | // NOTE: This is inefficient as it is essentially copying the data from the GPU. 47 | // Depending on what is being done, copying the data to system memory does not 48 | // even need to occur. For example, if we wanted to use the buffer in a shader, 49 | // we could simply do "material.SetBuffer("buffer", buffer);". Alternatively, we 50 | // could pass the buffer along to another compute shader. 51 | buffer.GetData(data); 52 | 53 | // Display the data. 54 | for (int i = 0; i < bufferSize; i++) 55 | { 56 | Debug.Log(data[i]); 57 | } 58 | } 59 | } 60 | 61 | private void OnDestroy() 62 | { 63 | // Release the buffer. 64 | buffer.Release(); 65 | } 66 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/BufferExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0f07de9b7345d9e4d963f3d2f5af7650 3 | timeCreated: 1462916835 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/IObjectGenerator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | /// 5 | /// Interface for an object generator. 6 | /// 7 | public interface IObjectGenerator 8 | { 9 | /// 10 | /// Generates game objects. 11 | /// 12 | /// The parent object for these generated game objects. 13 | /// The number of game objects to generate. 14 | /// The list of generated game objects. The caller should handle their destruction. 15 | List Generate(GameObject parent, int count); 16 | } 17 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/IObjectGenerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e88aefc5c5c81a942a5914a0a95344a3 3 | timeCreated: 1466642709 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/RigidBodyOrientation.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | /// 5 | /// Example of running a simple compute shader to fill a buffer. 6 | /// 7 | public class RigidBodyOrientation : MonoBehaviour 8 | { 9 | public GameObject cube; 10 | public float mass = 10; 11 | public Vector3 force = new Vector3(0, 0, 1); 12 | public Vector3 pointOfForce = new Vector3(1, 0, -1); 13 | 14 | struct RigidBody 15 | { 16 | public float mass; 17 | public Vector3 force; 18 | public Vector3 pointOfForce; 19 | public Vector3 torque; 20 | public Vector3 rotation; 21 | public Vector4 orientation; 22 | } 23 | private int rigidBodyStructSize = 17; 24 | 25 | public ComputeShader shader; 26 | private ComputeBuffer buffer; 27 | 28 | private int kernelHandle; 29 | private int groupCount = 1; 30 | private int threadCount = 4; 31 | 32 | private int bufferSize; 33 | private RigidBody[] rigidBodies; 34 | 35 | private int cubeCount; 36 | 37 | private void Start() 38 | { 39 | cubeCount = threadCount * groupCount; 40 | 41 | // Calculate the buffer size. 42 | bufferSize = cubeCount; 43 | rigidBodies = new RigidBody[bufferSize]; 44 | 45 | // Create compute buffer. 46 | buffer = new ComputeBuffer(bufferSize, sizeof(float) * rigidBodyStructSize); 47 | 48 | // Obtain the handle to the kernel to run. 49 | kernelHandle = shader.FindKernel("CSMain"); 50 | 51 | // Generate the particles, using the positions of the ball game objects. 52 | RigidBody[] initialBufferData = new RigidBody[cubeCount]; 53 | for (int i = 0; i < cubeCount; ++i) 54 | { 55 | RigidBody rigidBody = new RigidBody(); 56 | rigidBody.mass = mass; 57 | rigidBody.force = force; 58 | rigidBody.pointOfForce = pointOfForce; 59 | rigidBody.rotation = new Vector3(0, 0, 0); 60 | rigidBody.orientation = new Vector4(0, 0, 0, 1); 61 | initialBufferData[i] = rigidBody; 62 | } 63 | 64 | // Set the data. 65 | buffer.SetData(initialBufferData); 66 | 67 | // Set the buffer on the compute shader. 68 | shader.SetBuffer(kernelHandle, "buffer", buffer); 69 | } 70 | 71 | private void Update() 72 | { 73 | Vector3 pointOfForce = Vector3.zero; 74 | 75 | shader.SetFloat("duration", Time.deltaTime); 76 | 77 | if (Input.GetMouseButtonDown(0)) 78 | { 79 | // create a ray going into the scene from the screen location the user clicked at 80 | Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 81 | 82 | // the raycast hit info will be filled by the Physics.Raycast() call further 83 | RaycastHit hit; 84 | 85 | // perform a raycast using our new ray. 86 | // If the ray collides with something solid in the scene, the "hit" structure will 87 | // be filled with collision information 88 | if (Physics.Raycast(ray, out hit)) 89 | { 90 | Debug.Log(hit.point); 91 | 92 | pointOfForce = hit.point; 93 | } 94 | } 95 | 96 | shader.Dispatch(kernelHandle, groupCount, 1, 1); 97 | 98 | buffer.GetData(rigidBodies); 99 | 100 | cube.transform.rotation = new Quaternion 101 | ( 102 | rigidBodies[0].orientation.x, 103 | rigidBodies[0].orientation.y, 104 | rigidBodies[0].orientation.z, 105 | rigidBodies[0].orientation.w 106 | ); 107 | 108 | if (pointOfForce != Vector3.zero) 109 | { 110 | rigidBodies[0].pointOfForce = pointOfForce; 111 | rigidBodies[0].force = force; 112 | } 113 | 114 | buffer.SetData(rigidBodies); 115 | } 116 | 117 | private void OnDestroy() 118 | { 119 | // Release the buffer. 120 | buffer.Release(); 121 | } 122 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/RigidBodyOrientation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4fb796b3fe5d66439478b24cae309b3 3 | timeCreated: 1464310252 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/RigidBodyPosition.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | 4 | /// 5 | /// Example of running a simple compute shader to fill a buffer. 6 | /// 7 | public class RigidBodyPosition : MonoBehaviour 8 | { 9 | struct Particle 10 | { 11 | public float mass; 12 | public Vector3 position; 13 | public Vector3 velocity; 14 | public Vector3 acceleration; 15 | public float damping; 16 | } 17 | private int particleStructSize = 11; 18 | 19 | public ComputeShader shader; 20 | private ComputeBuffer buffer; 21 | 22 | private int kernelHandle; 23 | private int groupCount = 10; 24 | private int threadCount = 1024; 25 | 26 | private int bufferSize; 27 | private Particle[] particles; 28 | 29 | private int ballCount; 30 | private List balls; 31 | 32 | private void Start() 33 | { 34 | ballCount = 1024 * groupCount; 35 | 36 | // Calculate the buffer size. 37 | bufferSize = groupCount * threadCount; 38 | particles = new Particle[bufferSize]; 39 | 40 | // Create compute buffer. 41 | buffer = new ComputeBuffer(bufferSize, sizeof(float) * particleStructSize); 42 | 43 | // Obtain the handle to the kernel to run. 44 | kernelHandle = shader.FindKernel("CSMain"); 45 | 46 | // Generate the specified number of balls game objects. 47 | IObjectGenerator bg = new BallGenerator(); 48 | balls = bg.Generate(gameObject, ballCount); 49 | 50 | // Generate the particles, using the positions of the ball game objects. 51 | Particle[] initialBufferData = new Particle[ballCount]; 52 | for (int i = 0; i < ballCount; ++i) 53 | { 54 | Particle particle = new Particle(); 55 | particle.mass = 2; 56 | particle.position = balls[i].transform.position; 57 | particle.velocity = new Vector3(0, 10, 0); 58 | particle.acceleration = new Vector3(0, -10f, 0); 59 | particle.damping = 0; 60 | initialBufferData[i] = particle; 61 | } 62 | 63 | // Set the data. 64 | buffer.SetData(initialBufferData); 65 | 66 | // Set the buffer on the compute shader. 67 | shader.SetBuffer(kernelHandle, "buffer", buffer); 68 | } 69 | 70 | private void Update() 71 | { 72 | //if (Input.GetKeyDown(KeyCode.A)) 73 | { 74 | // Fill the buffer using the compute shader. 75 | shader.SetFloat("duration", Time.deltaTime); 76 | 77 | // SetVector does not appear to work. 78 | //shader.SetVector("forceAccum", new Vector3(10, 0, 0)); 79 | shader.SetFloats("forceAccum", new float[] { 10, 0, 0 }); 80 | 81 | shader.Dispatch(kernelHandle, groupCount, 1, 1); 82 | 83 | // Obtain the data. 84 | // NOTE: This is inefficient as it is essentially copying the data from the GPU. 85 | // Depending on what is being done, copying the data to system memory does not 86 | // even need to occur. For example, if we wanted to use the buffer in a shader, 87 | // we could simply do "material.SetBuffer("buffer", buffer);". Alternatively, we 88 | // could pass the buffer along to another compute shader. 89 | buffer.GetData(particles); 90 | 91 | // Display the data. 92 | for (int i = 0; i < bufferSize; i++) 93 | { 94 | //Debug.Log(particles[i].position); 95 | balls[i].transform.position = particles[i].position; 96 | } 97 | } 98 | } 99 | 100 | private void OnDestroy() 101 | { 102 | // Release the buffer. 103 | buffer.Release(); 104 | } 105 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/RigidBodyPosition.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35dee4e4486a48a49bce21d6c5477bdf 3 | timeCreated: 1463452093 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/TextureExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | /// 5 | /// Conway's Game Of Life. 6 | /// 7 | public class TextureExample : MonoBehaviour 8 | { 9 | public ComputeShader shader, shaderCopy; 10 | 11 | private RenderTexture tex, texCopy; 12 | 13 | private int textureSize = 1024; 14 | private int threadGroupCount = 128; 15 | 16 | private void Start() 17 | { 18 | tex = new RenderTexture(textureSize, textureSize, 0); 19 | tex.enableRandomWrite = true; 20 | tex.Create(); 21 | 22 | texCopy = new RenderTexture(textureSize, textureSize, 0); 23 | texCopy.enableRandomWrite = true; 24 | texCopy.Create(); 25 | 26 | shader.SetTexture(0, "tex", tex); 27 | shader.Dispatch(0, threadGroupCount, threadGroupCount, 1); 28 | 29 | shaderCopy.SetTexture(0, "tex", tex); 30 | shaderCopy.SetTexture(0, "texCopy", texCopy); 31 | shaderCopy.Dispatch(0, threadGroupCount, threadGroupCount, 1); 32 | } 33 | 34 | private void OnGUI() 35 | { 36 | int w = Screen.width / 2; 37 | int h = Screen.height / 2; 38 | int s = 512; 39 | 40 | GUI.DrawTexture(new Rect(w - s / 2, h - s / 2, s, s), texCopy); 41 | } 42 | 43 | private void Update() 44 | { 45 | //if(Input.GetKeyDown(KeyCode.A)) 46 | { 47 | Swap(ref tex, ref texCopy); 48 | shaderCopy.SetTexture(0, "tex", tex); 49 | shaderCopy.SetTexture(0, "texCopy", texCopy); 50 | shaderCopy.Dispatch(0, texCopy.width / 8, texCopy.height / 8, 1); 51 | } 52 | } 53 | 54 | private void Swap(ref RenderTexture a, ref RenderTexture b) 55 | { 56 | RenderTexture tmp = a; 57 | a = b; 58 | b = tmp; 59 | } 60 | 61 | private void OnDestroy() 62 | { 63 | tex.Release(); 64 | texCopy.Release(); 65 | } 66 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/TextureExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8a189841668dc243a138ab4795b94d8 3 | timeCreated: 1462932159 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/UnityStandardPhysicsExample.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class UnityStandardPhysicsExample : MonoBehaviour 6 | { 7 | public int ballCount = 5000; 8 | 9 | // Use this for initialization 10 | void Start() 11 | { 12 | IObjectGenerator bg = new BallGenerator(); 13 | bg.Generate(gameObject, ballCount); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/UnityStandardPhysicsExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e06f247408e987146874f7d98dba5c27 3 | timeCreated: 1463703117 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/Utilities.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aaff697598847db4bbcdad64f55e9929 3 | folderAsset: yes 4 | timeCreated: 1464062913 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/Utilities/ClickAndDrag.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ClickAndDrag : MonoBehaviour 5 | { 6 | private float dist; 7 | private Transform toDrag; 8 | private bool dragging; 9 | private Vector3 offset; 10 | 11 | private void Update() 12 | { 13 | Vector3 v3; 14 | if(Input.GetMouseButtonDown(0)) 15 | { 16 | RaycastHit hit; 17 | Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); 18 | if(Physics.Raycast(ray, out hit)) 19 | { 20 | if (hit.transform.gameObject == gameObject) 21 | { 22 | toDrag = hit.transform; 23 | dist = hit.transform.position.z - Camera.main.transform.position.z; 24 | v3 = new Vector3(Input.mousePosition.x, Input.mousePosition.y, dist); 25 | v3 = Camera.main.ScreenToWorldPoint(v3); 26 | offset = toDrag.position - v3; 27 | dragging = true; 28 | } 29 | } 30 | } 31 | if (Input.GetMouseButton(0)) 32 | { 33 | if (dragging) 34 | { 35 | v3 = new Vector3(Input.mousePosition.x, Input.mousePosition.y, dist); 36 | v3 = Camera.main.ScreenToWorldPoint(v3); 37 | toDrag.position = v3 + offset; 38 | } 39 | } 40 | if (Input.GetMouseButtonUp(0)) 41 | { 42 | dragging = false; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/Utilities/ClickAndDrag.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 944f575446a062b499c952bb6e59f113 3 | timeCreated: 1463347260 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/Utilities/FPSDisplay.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | /// 5 | /// Simple FPS display. 6 | /// 7 | public class FPSDisplay : MonoBehaviour 8 | { 9 | private float deltaTime = 0.0f; 10 | 11 | private void Update() 12 | { 13 | deltaTime += (Time.deltaTime - deltaTime) * 0.1f; 14 | } 15 | 16 | private void OnGUI() 17 | { 18 | int w = Screen.width; 19 | int h = Screen.height; 20 | 21 | GUIStyle style = new GUIStyle(); 22 | 23 | Rect rect = new Rect(0, 0, w, h * 2 / 100); 24 | style.alignment = TextAnchor.UpperLeft; 25 | style.fontSize = h * 2 / 100; 26 | style.normal.textColor = new Color(0.0f, 0.0f, 0.5f, 1.0f); 27 | float msec = deltaTime * 1000.0f; 28 | float fps = 1.0f / deltaTime; 29 | string text = string.Format("{0:0.0} ms ({1:0.} fps)", msec, fps); 30 | GUI.Label(rect, text, style); 31 | } 32 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Scripts/Utilities/FPSDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d8d515ca864a9b49aec29b6bed2e0e5 3 | timeCreated: 1463721103 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 030365d3e008bd548a2c9bbfa4d7336e 3 | folderAsset: yes 4 | timeCreated: 1462916824 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2191447735469147a452d6e6ae455d8 3 | folderAsset: yes 4 | timeCreated: 1464063444 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/BasicBuffer.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | RWStructuredBuffer buffer; 4 | 5 | [numthreads(4,1,1)] 6 | void CSMain(int3 threadID : SV_GroupThreadID, int3 dispatchID : SV_DispatchThreadID) 7 | { 8 | buffer[dispatchID.x] *= threadID.x; 9 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/BasicBuffer.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5f22c7f543a76041b6f137761b9b6b8 3 | timeCreated: 1462916843 4 | licenseType: Pro 5 | ComputeShaderImporter: 6 | currentBuildTarget: 5 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/BasicTexture.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | RWTexture2D tex; 4 | 5 | // Create the initial texture. 6 | // 7 | [numthreads(8,8,1)] 8 | void CSMain (uint2 id : SV_DispatchThreadID) 9 | { 10 | // Some concentric square pattern to make it a little more interesting. 11 | if(id.x >= 100 && id.x < 900 && id.y >= 100 && id.y < 900) 12 | { 13 | tex[id] = float4(0, 0, 0, 1); 14 | } 15 | 16 | if(id.x >= 200 && id.x < 800 && id.y >= 200 && id.y < 800) 17 | { 18 | tex[id] = float4(1, 1, 1, 1); 19 | } 20 | 21 | if(id.x >= 300 && id.x < 700 && id.y >= 300 && id.y < 700) 22 | { 23 | tex[id] = float4(0, 0, 0, 1); 24 | } 25 | 26 | if(id.x >= 400 && id.x < 600 && id.y >= 400 && id.y < 600) 27 | { 28 | tex[id] = float4(1, 1, 1, 1); 29 | } 30 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/BasicTexture.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 243a49fac91b031408e3c57b3a342ef6 3 | timeCreated: 1462932077 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentBuildTarget: 5 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/IntegrateOrientation.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | struct RigidBody 4 | { 5 | float mass; 6 | float3 force; 7 | float3 pointOfForce; 8 | float3 torque; 9 | float3 rotation; 10 | float4 orientation; 11 | }; 12 | 13 | RWStructuredBuffer buffer; 14 | float duration; 15 | 16 | // Calculate the rotation matrix from a quaternion. 17 | float3x3 RotationMatrixFromQuaternion(float4 q) 18 | { 19 | // Row 0 20 | float r00 = 1 - (2 * q.y * q.y) - (2 * q.z * q.z); 21 | float r10 = (2 * q.x * q.y) - (2 * q.w * q.z); 22 | float r20 = (2 * q.x * q.z) + (2 * q.w * q.x); 23 | 24 | // Row 1 25 | float r01 = (2 * q.x * q.y) + (2 * q.w * q.z); 26 | float r11 = 1 - (2 * q.x * q.x) - (2 * q.z * q.z); 27 | float r21 = (2 * q.y * q.z) - (2 * q.w * q.x); 28 | 29 | // Row 2 30 | float r02 = (2 * q.x * q.z) - (2 * q.w * q.y); 31 | float r12 = (2 * q.y * q.z) + (2 * q.w * q.x); 32 | float r22 = 1 - (2 * q.x * q.x) - (2 * q.y * q.y); 33 | 34 | float3x3 r = float3x3( 35 | r00, r10, r20, // first row 36 | r01, r11, r21, // second row 37 | r02, r12, r22 // third row 38 | ); 39 | 40 | return r; 41 | } 42 | 43 | // Calculate the inverse of matrix m. 44 | // https://en.wikipedia.org/wiki/Invertible_matrix#Inversion_of_3.C3.973_matrices 45 | float3x3 Inverse(float3x3 m) 46 | { 47 | float a = (m[1][1] * m[2][2] - m[1][2] * m[2][1]); 48 | float b = -(m[1][0] * m[2][2] - m[1][2] * m[2][0]); 49 | float c = (m[1][0] * m[2][1] - m[1][1] * m[2][0]); 50 | float d = -(m[0][1] * m[2][2] - m[0][2] * m[2][1]); 51 | float e = (m[0][0] * m[2][2] - m[0][2] * m[2][0]); 52 | float f = -(m[0][0] * m[2][1] - m[0][1] * m[2][0]); 53 | float g = (m[0][1] * m[1][2] - m[0][2] * m[1][1]); 54 | float h = -(m[0][0] * m[1][2] - m[0][2] * m[1][0]); 55 | float i = (m[0][0] * m[1][1] - m[0][1] * m[1][0]); 56 | 57 | float det = 1 / (m[0][0] * a + b * m[0][1] + c * m[0][2]); 58 | 59 | float3x3 im; 60 | im[0][0] = a * det; 61 | im[0][1] = d * det; 62 | im[0][2] = g * det; 63 | im[1][0] = b * det; 64 | im[1][1] = e * det; 65 | im[1][2] = h * det; 66 | im[2][0] = c * det; 67 | im[2][1] = f * det; 68 | im[2][2] = i * det; 69 | 70 | return im; 71 | } 72 | 73 | // Multiply two quaternions. 74 | float4 QuaternionMultiply(float4 lhs, float4 rhs) 75 | { 76 | float4 result; 77 | 78 | result.w = lhs.w * rhs.w - lhs.x * rhs.x - 79 | lhs.y * rhs.y - lhs.z * rhs.z; 80 | result.x = lhs.w * rhs.x + lhs.x * rhs.w + 81 | lhs.y * rhs.z - lhs.z * rhs.y; 82 | result.y = lhs.w * rhs.y + lhs.y * rhs.w + 83 | lhs.z * rhs.x - lhs.x * rhs.z; 84 | result.z = lhs.w * rhs.z + lhs.z * rhs.w + 85 | lhs.x * rhs.y - lhs.y * rhs.x; 86 | 87 | return result; 88 | } 89 | 90 | // Add a scaled vector3 to a quaternion. 91 | float4 AddScaledVector(float4 q, float3 v, float scale) 92 | { 93 | float4 tmp = float4(v.x * scale, v.y * scale, v.z * scale, 0); 94 | 95 | float4 result = QuaternionMultiply(tmp, q); 96 | 97 | q.w += result.w * 0.5; 98 | q.x += result.x * 0.5; 99 | q.y += result.y * 0.5; 100 | q.z += result.z * 0.5; 101 | 102 | return q; 103 | } 104 | 105 | [numthreads(4,1,1)] 106 | void CSMain(int3 threadID : SV_GroupThreadID, int3 dispatchID : SV_DispatchThreadID) 107 | { 108 | // Calculate torque (T = pointOfForce x F). 109 | float3 torque = cross(buffer[dispatchID.x].pointOfForce, buffer[dispatchID.x].force); 110 | buffer[dispatchID.x].torque = torque; 111 | 112 | // Inertia tensor for a cube. 113 | // a = 1/12*mass*(dy^2 + dz^2); 114 | // b = 1/12*mass*(dx^2 + dz^2); 115 | // c = 1/12*mass*(dx^2 + dy^2); 116 | // [ a, 0, 0 ] 117 | // [ 0, b, 0 ] 118 | // [ 0, 0, c ] 119 | // 120 | 121 | float a = (1.0 / 12.0) * buffer[dispatchID.x].mass * (1 + 1); 122 | float b = (1.0 / 12.0) * buffer[dispatchID.x].mass * (1 + 1); 123 | float c = (1.0 / 12.0) * buffer[dispatchID.x].mass * (1 + 1); 124 | float3x3 I = float3x3( 125 | a, 0, 0, // first row (not column as in GLSL!) 126 | 0, b, 0, // second row 127 | 0, 0, c // third row 128 | ); 129 | 130 | // Calculate angular acceleration from torque inputs. 131 | float3x3 r = RotationMatrixFromQuaternion(buffer[dispatchID.x].orientation); 132 | float3x3 tmp = mul(r, Inverse(I)); 133 | float3x3 invI = mul(tmp, transpose(r)); 134 | float3 angularAcceleration = mul(invI, torque); 135 | 136 | // Update angular velocity from the angular acceleration. 137 | float3 scaledAcceleration = angularAcceleration * duration; 138 | buffer[dispatchID.x].rotation += scaledAcceleration; 139 | 140 | // Impose drag. 141 | buffer[dispatchID.x].rotation = buffer[dispatchID.x].rotation * pow(0.7, duration); 142 | 143 | // Update angular position. 144 | buffer[dispatchID.x].orientation = AddScaledVector(buffer[dispatchID.x].orientation, buffer[dispatchID.x].rotation, duration); 145 | 146 | // Clear the torque and force. 147 | buffer[dispatchID.x].torque = 0; 148 | buffer[dispatchID.x].force = 0; 149 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/IntegrateOrientation.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5639bf2bfe3e6b94cbbb00242e5b8318 3 | timeCreated: 1464310232 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentBuildTarget: 19 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/IntegratePosition.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | struct Particle 4 | { 5 | float mass; 6 | float3 position; 7 | float3 velocity; 8 | float3 acceleration; 9 | float damping; 10 | }; 11 | 12 | RWStructuredBuffer buffer; 13 | float duration; 14 | float3 forceAccum; 15 | 16 | [numthreads(1024,1,1)] 17 | void CSMain(int3 threadID : SV_GroupThreadID, int3 dispatchID : SV_DispatchThreadID) 18 | { 19 | // Update linear position. 20 | float3 scaledVelocity = buffer[dispatchID.x].velocity * duration; 21 | buffer[dispatchID.x].position += scaledVelocity; 22 | 23 | // Work out the acceleration from the force. 24 | float3 resultingAcc = buffer[dispatchID.x].acceleration; 25 | float3 scaledForce = forceAccum * (1.0 / buffer[dispatchID.x].mass); 26 | resultingAcc += scaledForce; 27 | 28 | // Update linear velocity from the acceleration. 29 | float3 scaledAcceleration = resultingAcc * duration; 30 | buffer[dispatchID.x].velocity += scaledAcceleration; 31 | 32 | // Impose drag. 33 | //Velocity *= System.Math.Pow(Damping, duration); 34 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/IntegratePosition.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ad57564a11f3444eabf30c13fbd23a2 3 | timeCreated: 1463451748 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentBuildTarget: 19 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/TextureCopy.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel CSMain 2 | 3 | RWTexture2D texCopy; 4 | Texture2D tex; 5 | 6 | uint2 GetNeighborFast(uint2 id, int2 neighbor) 7 | { 8 | int newX = id.x + neighbor.x; 9 | int newY = id.y + neighbor.y; 10 | return uint2(newX, newY); 11 | } 12 | 13 | uint2 GetNeighbor(uint2 id, int2 neighbor, int w, int h) 14 | { 15 | int newX = id.x + neighbor.x; 16 | if(newX < 0) 17 | { 18 | newX += w; 19 | } 20 | if(newX >= w) 21 | { 22 | newX -= w; 23 | } 24 | int newY = id.y + neighbor.y; 25 | if(newY < 0) 26 | { 27 | newY += h; 28 | } 29 | if(newY >= h) 30 | { 31 | newY -= h; 32 | } 33 | 34 | return uint2(newX, newY); 35 | } 36 | 37 | uint NeighborCount(uint2 id) 38 | { 39 | uint w, h; 40 | tex.GetDimensions(w, h); 41 | 42 | uint count = 0; 43 | uint2 neighbor; 44 | 45 | neighbor = GetNeighbor(id, int2(-1, 1), w, h); 46 | count += tex[neighbor].r; 47 | 48 | neighbor = GetNeighbor(id, int2( 0, 1), w, h); 49 | count += tex[neighbor].r; 50 | 51 | neighbor = GetNeighbor(id, int2( 1, 1), w, h); 52 | count += tex[neighbor].r; 53 | 54 | neighbor = GetNeighbor(id, int2( 1, 0), w, h); 55 | count += tex[neighbor].r; 56 | 57 | neighbor = GetNeighbor(id, int2( 1,-1), w, h); 58 | count += tex[neighbor].r; 59 | 60 | neighbor = GetNeighbor(id, int2( 0,-1), w, h); 61 | count += tex[neighbor].r; 62 | 63 | neighbor = GetNeighbor(id, int2(-1,-1), w, h); 64 | count += tex[neighbor].r; 65 | 66 | neighbor = GetNeighbor(id, int2(-1, 0), w, h); 67 | count += tex[neighbor].r; 68 | 69 | return count; 70 | } 71 | 72 | [numthreads(8,8,1)] 73 | void CSMain (uint2 id : SV_DispatchThreadID) 74 | { 75 | uint cellExists = tex[id].r; 76 | uint neighborCount = NeighborCount(id); 77 | 78 | if(cellExists == 1) 79 | { 80 | if (neighborCount < 2) { 81 | cellExists = 0; 82 | } 83 | if (neighborCount == 2 || neighborCount == 3) { 84 | cellExists = 1; 85 | } 86 | if (neighborCount > 3) { 87 | cellExists = 0; 88 | } 89 | } 90 | else 91 | { 92 | if(neighborCount == 3) { 93 | cellExists = 1; 94 | } 95 | } 96 | 97 | texCopy[id] = float4(cellExists, cellExists, cellExists, 1); 98 | 99 | //texCopy[id] = tex[id]; 100 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/ComputeShaders/TextureCopy.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b335780fc0c7c7642ae31a5f117969e8 3 | timeCreated: 1462933277 4 | licenseType: Free 5 | ComputeShaderImporter: 6 | currentBuildTarget: 5 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/GSPassThrough.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/GSPassThrough" 2 | { 3 | Properties 4 | { 5 | _SpriteTex ("Base (RGB)", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Pass 10 | { 11 | Tags { 12 | "RenderType" = "Opaque" 13 | } 14 | LOD 200 15 | 16 | 17 | CGPROGRAM 18 | #pragma target 5.0 19 | #pragma vertex VS_Main 20 | #pragma fragment FS_Main 21 | #pragma geometry GS_Main 22 | #include "UnityCG.cginc" 23 | 24 | // ************************************************************** 25 | // Data structures * 26 | // ************************************************************** 27 | struct GS_INPUT 28 | { 29 | float4 pos : POSITION; 30 | float3 normal : NORMAL; 31 | float2 tex0 : TEXCOORD0; 32 | }; 33 | struct FS_INPUT 34 | { 35 | float4 pos : POSITION; 36 | float2 tex0 : TEXCOORD0; 37 | }; 38 | 39 | // ************************************************************** 40 | // Vars * 41 | // ************************************************************** 42 | Texture2D _SpriteTex; 43 | SamplerState sampler_SpriteTex; 44 | 45 | // ************************************************************** 46 | // Shader Programs * 47 | // ************************************************************** 48 | 49 | // Vertex Shader 50 | // 51 | GS_INPUT VS_Main(appdata_base v) 52 | { 53 | GS_INPUT output = (GS_INPUT)0; 54 | output.pos = mul(UNITY_MATRIX_MVP, v.vertex); 55 | output.normal = v.normal; 56 | output.tex0 = TRANSFORM_UV(0); 57 | return output; 58 | } 59 | 60 | // Geometry Shader 61 | // 62 | [maxvertexcount(3)] 63 | void GS_Main(triangle GS_INPUT p[3], inout TriangleStream triStream) 64 | { 65 | FS_INPUT pIn; 66 | pIn.pos = p[0].pos; 67 | pIn.tex0 = p[0].tex0; 68 | triStream.Append(pIn); 69 | pIn.pos = p[1].pos; 70 | pIn.tex0 = p[1].tex0; 71 | triStream.Append(pIn); 72 | pIn.pos = p[2].pos; 73 | pIn.tex0 = p[2].tex0; 74 | triStream.Append(pIn); 75 | } 76 | 77 | // Fragment Shader 78 | // 79 | float4 FS_Main(FS_INPUT input) : COLOR 80 | { 81 | return _SpriteTex.Sample(sampler_SpriteTex, input.tex0); 82 | } 83 | ENDCG 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/GSPassThrough.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2eaa3446a6b670a49a58ff33c89fe4e0 3 | timeCreated: 1463708426 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/Unlit.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/Unlit" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | } 7 | SubShader 8 | { 9 | Tags { "RenderType"="Opaque" } 10 | LOD 100 11 | 12 | Pass 13 | { 14 | CGPROGRAM 15 | #pragma vertex vert 16 | #pragma fragment frag 17 | 18 | #include "UnityCG.cginc" 19 | 20 | struct appdata 21 | { 22 | float4 vertex : POSITION; 23 | float2 uv : TEXCOORD0; 24 | }; 25 | 26 | struct v2f 27 | { 28 | float2 uv : TEXCOORD0; 29 | float4 vertex : SV_POSITION; 30 | }; 31 | 32 | sampler2D _MainTex; 33 | float4 _MainTex_ST; 34 | 35 | v2f vert (appdata v) 36 | { 37 | v2f o; 38 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 39 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 40 | return o; 41 | } 42 | 43 | fixed4 frag (v2f i) : SV_Target 44 | { 45 | // sample the texture 46 | fixed4 col = tex2D(_MainTex, i.uv); 47 | return col; 48 | } 49 | ENDCG 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /UnityProject/Assets/Shaders/Unlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dc6cf31458b91b468c679351f823210 3 | timeCreated: 1463701361 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39e961b54d028ed488c4c835a17ff11b 3 | folderAsset: yes 4 | timeCreated: 1463342756 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball1.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball1.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5341d2a464cbd6244ad1afc7b3d9cdc6 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball10.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball10.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffcde6fede1d5f5408dd0bbbf498d1f4 3 | timeCreated: 1463342764 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball11.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball11.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68c1a91b8cc32174189a960e5ccb96b0 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball12.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball12.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bbae0b744bac14740a1671701e0d0ed3 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball13.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball13.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b211ebe4ed2aa4843ac6e5a535848e60 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball14.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball14.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80cfe81bf04c2c34fbf0962478b9be4d 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball15.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball15.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 261454a7a10882f48a3544a0e7e4723a 3 | timeCreated: 1463342762 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball2.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball2.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da366af934a935b4e8e5517493e579e9 3 | timeCreated: 1463342764 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball3.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball3.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f13f67297f19bf4385c45d922277594 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball4.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball4.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c91756df4c8e0c741af69da4b3eb313a 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball5.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball5.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d09e2ba99f03b5043bcb22228335a97b 3 | timeCreated: 1463342764 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball6.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball6.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 160586097a3cfbb458f2fb121087f438 3 | timeCreated: 1463342762 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball7.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball7.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 55cb0f26d9d3bfd42af0373fac8e20de 3 | timeCreated: 1463342763 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball8.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball8.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9acfe30f0894124f857ce3d18904c99 3 | timeCreated: 1463342764 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Ball9.png -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Ball9.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07cfc99142c953644a8023d4d850803a 3 | timeCreated: 1463342762 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Floor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Assets/Textures/Floor.jpg -------------------------------------------------------------------------------- /UnityProject/Assets/Textures/Floor.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d34480ccd5924c04a806ff6200896907 3 | timeCreated: 1465532696 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.1.1f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /UnityProject/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /UnityProject/Screenshots/CPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajon542/rigidbody-gpu/0ef79724a73fa58a81272b38ade9159d9518c433/UnityProject/Screenshots/CPU.png --------------------------------------------------------------------------------