├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── EditorSettings.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset └── QualitySettings.asset ├── Assets ├── Textures │ ├── AreaTex.tga │ ├── SearchTex.tga │ ├── Lava │ │ ├── Lava Emission.png │ │ ├── Lava Normals.png │ │ ├── Lava Albedo Smoothness.png │ │ ├── Lava Emission.png.meta │ │ ├── Lava Normals.png.meta │ │ └── Lava Albedo Smoothness.png.meta │ ├── Bumps │ │ ├── Marble Normals.png │ │ ├── Marble Detail Normals.png │ │ ├── Marble Normals.png.meta │ │ └── Marble Detail Normals.png.meta │ ├── Circuitry │ │ ├── Circuitry Albedo.png │ │ ├── Circuitry Emission.png │ │ ├── Circuitry Normals.png │ │ ├── Circuitry Detail Mask.png │ │ ├── Circuitry Detail Albedo.png │ │ ├── Circuitry Detail Normal.png │ │ ├── Circuitry Metallic Occlusion Smoothness.png │ │ ├── Circuitry Albedo.png.meta │ │ ├── Circuitry Emission.png.meta │ │ ├── Circuitry Normals.png.meta │ │ ├── Circuitry Detail Albedo.png.meta │ │ ├── Circuitry Detail Mask.png.meta │ │ ├── Circuitry Detail Normal.png.meta │ │ └── Circuitry Metallic Occlusion Smoothness.png.meta │ ├── Bumps.meta │ ├── Lava.meta │ ├── Circuitry.meta │ ├── AreaTex.tga.meta │ └── SearchTex.tga.meta ├── Plugins.meta ├── Scenes.meta ├── Shaders │ ├── API.meta │ ├── FXAA.meta │ ├── SMAA.meta │ ├── TAA.meta │ ├── API │ │ ├── D3D11.hlsl.meta │ │ ├── D3D12.hlsl.meta │ │ ├── D3D9.hlsl.meta │ │ ├── Metal.hlsl.meta │ │ ├── OpenGL.hlsl.meta │ │ ├── PSSL.hlsl.meta │ │ ├── Vulkan.hlsl.meta │ │ ├── XboxOne.hlsl.meta │ │ ├── PSP2.hlsl.meta │ │ ├── Switch.hlsl.meta │ │ ├── D3D9.hlsl │ │ ├── PSP2.hlsl │ │ ├── OpenGL.hlsl │ │ ├── Metal.hlsl │ │ ├── Switch.hlsl │ │ ├── D3D11.hlsl │ │ ├── D3D12.hlsl │ │ ├── PSSL.hlsl │ │ ├── Vulkan.hlsl │ │ └── XboxOne.hlsl │ ├── ACES.hlsl.meta │ ├── Colors.hlsl.meta │ ├── Sampling.hlsl.meta │ ├── StdLib.hlsl.meta │ ├── xRLib.hlsl.meta │ ├── TAA │ │ ├── TAA.shader.meta │ │ └── TAA.shader │ ├── FXAA │ │ ├── FXAA_3_11.hlsl.meta │ │ ├── FXAANVIDIA.shader.meta │ │ ├── FXAASelf.shader.meta │ │ ├── FXAANVIDIA.shader │ │ └── FXAASelf.shader │ ├── SMAA │ │ ├── SMAANVIDIA.shader.meta │ │ ├── SMAASelf.shader.meta │ │ ├── SubpixelMorphologicalAntialiasing.hlsl.meta │ │ └── SMAANVIDIA.shader │ ├── xRLib.hlsl │ ├── Sampling.hlsl │ └── StdLib.hlsl ├── Plugins │ └── Editor.meta ├── Materials │ ├── Black.mat.meta │ ├── Lava.mat.meta │ ├── Mirror.mat.meta │ ├── White.mat.meta │ ├── Circuitry.mat.meta │ ├── Lava Sphere.mat.meta │ ├── Circuitry Sphere.mat.meta │ ├── Circuitry x3.mat.meta │ ├── Transparency.mat.meta │ ├── Parallax.mat.meta │ ├── Flat Wireframe.mat.meta │ ├── Realtime Emissive.mat.meta │ ├── Realtime Emissive.mat │ ├── Parallax.mat │ ├── Flat Wireframe.mat │ ├── Lava.mat │ ├── Lava Sphere.mat │ ├── Mirror.mat │ ├── Transparency.mat │ ├── Black.mat │ ├── White.mat │ ├── Circuitry.mat │ ├── Circuitry x3.mat │ └── Circuitry Sphere.mat ├── Materials.meta ├── Prefabs.meta ├── Scripts.meta ├── Shaders.meta ├── Textures.meta ├── Scenes │ ├── MSAA.unity.meta │ ├── FXAANVIDIA.unity.meta │ ├── FXAASelf.unity.meta │ ├── SMAANVIDIA.unity.meta │ ├── SMAASelf.unity.meta │ └── TAASimple.unity.meta ├── Prefabs │ ├── LOD Sphere.prefab.meta │ ├── Sphere.prefab.meta │ ├── Sphere.prefab │ └── LOD Sphere.prefab └── Scripts │ ├── FXAASelf.cs.meta │ ├── SMAASelf.cs.meta │ ├── TAASimple.cs.meta │ ├── FXAANVIDIA.cs.meta │ ├── SMAANVIDIA.cs.meta │ ├── FXAANVIDIA.cs │ ├── FXAASelf.cs │ ├── SMAASelf.cs │ ├── SMAANVIDIA.cs │ └── TAASimple.cs ├── README.md ├── .gitignore └── Packages └── manifest.json /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.4.16f1 2 | -------------------------------------------------------------------------------- /Assets/Textures/AreaTex.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/AreaTex.tga -------------------------------------------------------------------------------- /Assets/Textures/SearchTex.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/SearchTex.tga -------------------------------------------------------------------------------- /Assets/Textures/Lava/Lava Emission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Lava/Lava Emission.png -------------------------------------------------------------------------------- /Assets/Textures/Lava/Lava Normals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Lava/Lava Normals.png -------------------------------------------------------------------------------- /Assets/Textures/Bumps/Marble Normals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Bumps/Marble Normals.png -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Albedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Albedo.png -------------------------------------------------------------------------------- /Assets/Textures/Bumps/Marble Detail Normals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Bumps/Marble Detail Normals.png -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Emission.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Emission.png -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Normals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Normals.png -------------------------------------------------------------------------------- /Assets/Textures/Lava/Lava Albedo Smoothness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Lava/Lava Albedo Smoothness.png -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Detail Mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Detail Mask.png -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Detail Albedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Detail Albedo.png -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Detail Normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Detail Normal.png -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Metallic Occlusion Smoothness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Raphael2048/AntiAliasing/HEAD/Assets/Textures/Circuitry/Circuitry Metallic Occlusion Smoothness.png -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41a889f2f0f1d6646b2a1d42a399c209 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d575bb339bc478f4db2a059e2879d0c3 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/API.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5ab60c15d48fbfd449568cc248337736 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/FXAA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d31ca588edc898d459339b0bc1610fe4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/SMAA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f642fa7cebd0a584d8a2a6c3442327f7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders/TAA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4818a2751b5824348af983a0d8761a40 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 519c3bc7e27a0b348abb2354714bfc4b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /Assets/Materials/Black.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87c22369be43546edbe48582a8a6ca81 3 | timeCreated: 1464173585 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Lava.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ea70d998f9f1408cbf186188c21ff07 3 | timeCreated: 1476974428 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Mirror.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbf7b602df2df42a592ed886fdd2e1df 3 | timeCreated: 1464173585 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/White.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30a22e8ae7087446b8d22f828979af7f 3 | timeCreated: 1464173585 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Circuitry.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a5c0de6d4541a45e8a3ea8b649d68bd6 3 | timeCreated: 1476974428 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Lava Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6723235d8671a45fab2a0faea1a560cb 3 | timeCreated: 1476974428 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Circuitry Sphere.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d81e5d4628d1743e08582f0d0fbf353a 3 | timeCreated: 1476974428 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Circuitry x3.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8d96c4aa9f3e45b9af50cc7c65afa6f 3 | timeCreated: 1476974428 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/Transparency.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f94d343f0d2b34e07a9410054588dc7f 3 | timeCreated: 1464173585 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a567dce0989f14fb690413cfcac74b3b 3 | folderAsset: yes 4 | timeCreated: 1458734015 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27c55cd4df72f409c8ef72b54e2efc26 3 | folderAsset: yes 4 | timeCreated: 1504006343 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36eb13e956a3c4eddb63549397e1b9a5 3 | folderAsset: yes 4 | timeCreated: 1469732897 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6918056eedf3346e3aeb681fac20c458 3 | folderAsset: yes 4 | timeCreated: 1458733744 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5dc94731e931475eab347809c88414c 3 | folderAsset: yes 4 | timeCreated: 1458763243 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures/Bumps.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c5c3eeb99db747d3805a31a2f96e670 3 | folderAsset: yes 4 | timeCreated: 1469707128 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures/Lava.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a651fb9805cf488a94b2cfd302f7e09 3 | folderAsset: yes 4 | timeCreated: 1477564276 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a93713bb51ff4f439c664c05c819d12 3 | folderAsset: yes 4 | timeCreated: 1476978740 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/MSAA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72ff6fa473ed6dd41910fa00ccd22c57 3 | timeCreated: 1517223565 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/FXAANVIDIA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f176e7ce0deaa7845ab155dc2a41c2da 3 | timeCreated: 1517223565 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/FXAASelf.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5658a16c4074443d392f085379dd0b4f 3 | timeCreated: 1517223565 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SMAANVIDIA.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1692f20901d0d8a429e035cdbea08261 3 | timeCreated: 1517223565 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/SMAASelf.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b9299a5f4bc821478a2a15cbbaf0fcb 3 | timeCreated: 1517223565 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/TAASimple.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 890c4d98a7ba8ba4db93e93b005be218 3 | timeCreated: 1517223565 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/D3D11.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4e61b1eb5c3ac248add7bb738198560 3 | timeCreated: 1489753963 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/D3D12.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed6416461734f3a4d97b2475252d5f6c 3 | timeCreated: 1489754075 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/D3D9.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a741cbbb27e6ad747a354440a9132a66 3 | timeCreated: 1489754265 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/Metal.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38502e5cb7782364ba3db59850a9a8ad 3 | timeCreated: 1489753963 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/OpenGL.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a0c0086cde60e74e9ad1fce57eab9f1 3 | timeCreated: 1489754265 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/PSSL.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2399c8729aaf8344e8f9cf4721c5803a 3 | timeCreated: 1489753963 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/Vulkan.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f2b019548c499944923c5da221047a6 3 | timeCreated: 1489754021 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/XboxOne.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd7292cede5bbe44cb888e1e40efac1e 3 | timeCreated: 1489754021 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/ACES.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64a0da8be23fa2541a926f2a9595ab98 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/PSP2.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d916afaf5049bb24989e8e823280e99c 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Colors.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 68cd21d12da092e4099dc4149ce5b184 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Sampling.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 046ac67ed162010458a8ec30decd9996 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/StdLib.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fe9698894820094bab457d11056cb60 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/xRLib.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41478e4ec9e4c3143843a1be92b10256 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/Materials/Parallax.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2009ffad1033c476f80df47948cdae53 3 | timeCreated: 1506518414 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/API/Switch.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18095202690616846a484e633db69455 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/TAA/TAA.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 946063b3f8eb313489a093c3717f5cbd 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/LOD Sphere.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae565e2df8cfa4db58b2638282edbd4e 3 | timeCreated: 1504018304 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Prefabs/Sphere.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2291ca955b6f24960a61f3c2d0301f90 3 | timeCreated: 1504006379 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/FXAA/FXAA_3_11.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb3df89bb6d6dfd47a7773e2c3ccd23f 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/SMAA/SMAANVIDIA.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0605ec89c0ec67e45b00893d8b8ca569 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/SMAA/SMAASelf.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcf019603ef52bf47963fa668115324d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Flat Wireframe.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ded45655b37c844f78924db6ac91045b 3 | timeCreated: 1508421654 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/Realtime Emissive.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9463df9afed504afba0e7c831d7518b8 3 | timeCreated: 1501150646 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 抗锯齿示例程序: 2 | 3 | MSAA 4 | 5 | FXAANVIDIA 最常用的实现FXAA的方式,直接使用NIVIA的FXAA3.11源码,可用于生产环境。 6 | 7 | FXAASelf 自己实现的FXAA代码。 8 | 9 | SMAANVIDIA NVIDIA中实现的 SMAA,适合作为生产环境使用。 10 | 11 | SMAASelf 自己实现的SMAA,没有使用预计算的方式计算混合系数,而是使用实时计算的混合系数,也没有实现 SMAA 斜向的抗锯齿。 12 | 13 | TAASimple 自己实现的简易版TAA。 -------------------------------------------------------------------------------- /Assets/Shaders/FXAA/FXAANVIDIA.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc487be3cfe782f4bb995f85238e037a 3 | timeCreated: 1517236338 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Shaders/FXAA/FXAASelf.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf0bb392c60a1464db129a8ffec96ad7 3 | timeCreated: 1517236338 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Shaders/SMAA/SubpixelMorphologicalAntialiasing.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c8901910edad9347a3177df3926d0b7 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /Assets/Scripts/FXAASelf.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15639cd52a671914983592ee4b3ff67d 3 | timeCreated: 1522063116 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - fxaaShader: {fileID: 4800000, guid: 935232f54c5894b57ad19147233be3ae, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | assetBundleVariant: 15 | -------------------------------------------------------------------------------- /Assets/Scripts/SMAASelf.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 523339672a285744da860da02c3d58b7 3 | timeCreated: 1522063116 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - fxaaShader: {fileID: 4800000, guid: 935232f54c5894b57ad19147233be3ae, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | assetBundleVariant: 15 | -------------------------------------------------------------------------------- /Assets/Scripts/TAASimple.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f15c2f12e8f54144bb356e953c45ca4 3 | timeCreated: 1522063116 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - fxaaShader: {fileID: 4800000, guid: 935232f54c5894b57ad19147233be3ae, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | assetBundleVariant: 15 | -------------------------------------------------------------------------------- /Assets/Scripts/FXAANVIDIA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d816b9078f818994bacfbfd64c77200b 3 | timeCreated: 1522063116 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - fxaaShader: {fileID: 4800000, guid: 935232f54c5894b57ad19147233be3ae, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | assetBundleVariant: 15 | -------------------------------------------------------------------------------- /Assets/Scripts/SMAANVIDIA.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7fff84c7d918b14f9e53b4a7710ef89 3 | timeCreated: 1522063116 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: 9 | - fxaaShader: {fileID: 4800000, guid: 935232f54c5894b57ad19147233be3ae, type: 3} 10 | executionOrder: 0 11 | icon: {instanceID: 0} 12 | userData: 13 | assetBundleName: 14 | assetBundleVariant: 15 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Assets/Scripts/FXAANVIDIA.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | 4 | [ExecuteInEditMode, ImageEffectAllowedInSceneView] 5 | public class FXAANVIDIA : MonoBehaviour { 6 | 7 | public enum FXAAMode 8 | { 9 | Quality = 0, 10 | Console = 1, 11 | }; 12 | 13 | public FXAAMode mode; 14 | 15 | public Shader fxaaShader; 16 | 17 | 18 | [NonSerialized] 19 | Material fxaaMaterial; 20 | 21 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 22 | if (fxaaMaterial == null) { 23 | fxaaMaterial = new Material(fxaaShader); 24 | fxaaMaterial.hideFlags = HideFlags.HideAndDontSave; 25 | } 26 | 27 | Graphics.Blit(source, destination, fxaaMaterial, (int)mode); 28 | } 29 | } -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInPlayMode: 1 24 | -------------------------------------------------------------------------------- /Assets/Scripts/FXAASelf.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | 4 | [ExecuteInEditMode, ImageEffectAllowedInSceneView] 5 | public class FXAASelf : MonoBehaviour { 6 | 7 | public enum FXAAMode 8 | { 9 | Quality = 0, 10 | Console = 1, 11 | }; 12 | 13 | public FXAAMode mode; 14 | 15 | [Range(0.0312f, 0.0833f)] 16 | public float contrastThreshold = 0.0312f; 17 | 18 | [Range(0.063f, 0.333f)] 19 | public float relativeThreshold = 0.063f; 20 | 21 | public Shader fxaaShader; 22 | 23 | 24 | [NonSerialized] 25 | Material fxaaMaterial; 26 | 27 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 28 | if (fxaaMaterial == null) { 29 | fxaaMaterial = new Material(fxaaShader); 30 | fxaaMaterial.hideFlags = HideFlags.HideAndDontSave; 31 | } 32 | 33 | fxaaMaterial.SetFloat("_ContrastThreshold", contrastThreshold); 34 | fxaaMaterial.SetFloat("_RelativeThreshold", relativeThreshold); 35 | 36 | Graphics.Blit(source, destination, fxaaMaterial, (int)mode); 37 | } 38 | } -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Assets/Scripts/SMAASelf.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using UnityEngine.Experimental.Rendering; 4 | 5 | [ExecuteInEditMode, ImageEffectAllowedInSceneView] 6 | public class SMAASelf : MonoBehaviour { 7 | 8 | public Shader shader; 9 | 10 | [NonSerialized] 11 | Material material; 12 | 13 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 14 | if (material == null) { 15 | material = new Material(shader); 16 | material.hideFlags = HideFlags.HideAndDontSave; 17 | } 18 | 19 | RenderTexture edge = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.RG16); 20 | RenderTexture blend = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.BGRA32); 21 | Graphics.Blit(source, edge, material, 0); 22 | Graphics.Blit(edge, blend, material, 1); 23 | material.SetTexture("_BlendTex", blend); 24 | Graphics.Blit(source, destination, material, 2); 25 | 26 | RenderTexture.ReleaseTemporary(edge); 27 | RenderTexture.ReleaseTemporary(blend); 28 | } 29 | } -------------------------------------------------------------------------------- /Assets/Scripts/SMAANVIDIA.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using UnityEngine.Experimental.Rendering; 4 | 5 | [ExecuteInEditMode, ImageEffectAllowedInSceneView] 6 | public class SMAANVIDIA : MonoBehaviour { 7 | 8 | public Shader shader; 9 | 10 | public Texture areaTexture; 11 | public Texture searchTexture; 12 | [NonSerialized] 13 | Material material; 14 | 15 | void OnRenderImage (RenderTexture source, RenderTexture destination) { 16 | if (material == null) { 17 | material = new Material(shader); 18 | material.hideFlags = HideFlags.HideAndDontSave; 19 | } 20 | RenderTexture edge = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.RG16); 21 | RenderTexture blend = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.BGRA32); 22 | Graphics.Blit(source, edge, material, 0); 23 | material.SetTexture("_AreaTex", areaTexture); 24 | material.SetTexture("_SearchTex", searchTexture); 25 | Graphics.Blit(edge, blend, material, 1); 26 | material.SetTexture("_BlendTex", blend); 27 | Graphics.Blit(source, destination, material, 2); 28 | 29 | RenderTexture.ReleaseTemporary(edge); 30 | RenderTexture.ReleaseTemporary(blend); 31 | } 32 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | .idea 25 | 26 | # Gradle cache directory 27 | .gradle/ 28 | 29 | # Autogenerated VS/MD/Consulo solution and project files 30 | ExportedObj/ 31 | .consulo/ 32 | *.csproj 33 | *.unityproj 34 | *.sln 35 | *.suo 36 | *.tmp 37 | *.user 38 | *.userprefs 39 | *.pidb 40 | *.booproj 41 | *.svd 42 | *.pdb 43 | *.mdb 44 | *.opendb 45 | *.VC.db 46 | 47 | # Unity3D generated meta files 48 | *.pidb.meta 49 | *.pdb.meta 50 | *.mdb.meta 51 | 52 | # Unity3D generated file on crash reports 53 | sysinfo.txt 54 | 55 | # Builds 56 | *.apk 57 | *.unitypackage 58 | 59 | # Crashlytics generated file 60 | crashlytics-build.properties 61 | 62 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | -------------------------------------------------------------------------------- /Assets/Textures/Bumps/Marble Normals.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d38a4f30d413745adaf12f60ca54997d 3 | timeCreated: 1469716315 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 1 19 | externalNormalMap: 1 20 | heightScale: 0.05 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 2 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/Textures/Bumps/Marble Detail Normals.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e176e7b04a7948129e9f864749e6253 3 | timeCreated: 1469722324 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 1 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 1 19 | externalNormalMap: 1 20 | heightScale: 0.1 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/Textures/Lava/Lava Emission.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1ff59f8987804812bba5f072b0f4ba3 3 | timeCreated: 1477564060 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: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Textures/Lava/Lava Normals.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9c83bb41b61d440a869622e21c36294 3 | timeCreated: 1477564061 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Albedo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e24fcab8e17a4664b37ee69f9b39b52 3 | timeCreated: 1476974172 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: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Emission.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb8292d7b05e24ce2bac28d43938ace1 3 | timeCreated: 1476974175 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: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Normals.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11e9b2094aa1f494897822222abba5ed 3 | timeCreated: 1476974168 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 1 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 1 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Textures/Lava/Lava Albedo Smoothness.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4686dda0bed414a2d845f4f6213fa208 3 | timeCreated: 1477564059 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: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Detail Albedo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a4ce85ee15d9d4f1482777e9745c606a 3 | timeCreated: 1477584300 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: 1 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 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 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.package-manager-ui": "2.0.8", 4 | "com.unity.modules.ai": "1.0.0", 5 | "com.unity.modules.animation": "1.0.0", 6 | "com.unity.modules.assetbundle": "1.0.0", 7 | "com.unity.modules.audio": "1.0.0", 8 | "com.unity.modules.cloth": "1.0.0", 9 | "com.unity.modules.director": "1.0.0", 10 | "com.unity.modules.imageconversion": "1.0.0", 11 | "com.unity.modules.imgui": "1.0.0", 12 | "com.unity.modules.jsonserialize": "1.0.0", 13 | "com.unity.modules.particlesystem": "1.0.0", 14 | "com.unity.modules.physics": "1.0.0", 15 | "com.unity.modules.physics2d": "1.0.0", 16 | "com.unity.modules.screencapture": "1.0.0", 17 | "com.unity.modules.terrain": "1.0.0", 18 | "com.unity.modules.terrainphysics": "1.0.0", 19 | "com.unity.modules.tilemap": "1.0.0", 20 | "com.unity.modules.ui": "1.0.0", 21 | "com.unity.modules.uielements": "1.0.0", 22 | "com.unity.modules.umbra": "1.0.0", 23 | "com.unity.modules.unityanalytics": "1.0.0", 24 | "com.unity.modules.unitywebrequest": "1.0.0", 25 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 26 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 27 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 28 | "com.unity.modules.unitywebrequestwww": "1.0.0", 29 | "com.unity.modules.vehicles": "1.0.0", 30 | "com.unity.modules.video": "1.0.0", 31 | "com.unity.modules.vr": "1.0.0", 32 | "com.unity.modules.wind": "1.0.0", 33 | "com.unity.modules.xr": "1.0.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Assets/Shaders/API/D3D9.hlsl: -------------------------------------------------------------------------------- 1 | // ALso used for Direct3D 11 "feature level 9.x" target for Windows Store and Windows Phone 2 | #define UNITY_UV_STARTS_AT_TOP 1 3 | #define UNITY_REVERSED_Z 0 4 | #define UNITY_GATHER_SUPPORTED 0 5 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 6 | 7 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) sampler2D textureName 8 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) sampler3D textureName 9 | 10 | #define TEXTURE2D(textureName) sampler2D textureName 11 | #define SAMPLER2D(samplerName) 12 | 13 | #define TEXTURE3D(textureName) sampler3D textureName 14 | #define SAMPLER3D(samplerName) 15 | 16 | #define TEXTURE2D_ARGS(textureName, samplerName) sampler2D textureName 17 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName 18 | 19 | #define TEXTURE3D_ARGS(textureName, samplerName) sampler3D textureName 20 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName 21 | 22 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) tex2D(textureName, coord2) 23 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) tex2Dlod(textureName, float4(coord2, 0.0, lod)) 24 | 25 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) tex3D(textureName, coord3) 26 | 27 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) tex2D(textureName, icoord2 / texelSize) 28 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) tex2Dlod(textureName, float4(icoord2 / texelSize, 0.0, lod)) 29 | 30 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 31 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 32 | 33 | #define UNITY_BRANCH 34 | #define UNITY_FLATTEN 35 | #define UNITY_UNROLL 36 | #define UNITY_LOOP 37 | #define UNITY_FASTOPT 38 | 39 | #define CBUFFER_START(name) 40 | #define CBUFFER_END 41 | 42 | #define FXAA_HLSL_3 1 43 | #define SMAA_HLSL_3 1 44 | -------------------------------------------------------------------------------- /Assets/Shaders/API/PSP2.hlsl: -------------------------------------------------------------------------------- 1 | 2 | #define UNITY_UV_STARTS_AT_TOP 1 3 | #define UNITY_REVERSED_Z 0 4 | #define UNITY_GATHER_SUPPORTED 0 5 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 0 6 | 7 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) sampler2D textureName 8 | 9 | #define TEXTURE2D(textureName) sampler2D textureName 10 | #define SAMPLER2D(samplerName) 11 | 12 | #define TEXTURE2D_ARGS(textureName, samplerName) sampler2D textureName 13 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName 14 | 15 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) tex2D(textureName, coord2) 16 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) tex2Dlod(textureName, float4(coord2, 0.0, lod)) 17 | 18 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) tex2D(textureName, icoord2 / texelSize) 19 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) tex2Dlod(textureName, float4(icoord2 / texelSize, 0.0, lod)) 20 | 21 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) tex2D(textureName, coord2).r 22 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) tex2Dlod(textureName, float4(coord2, 0.0, lod)).r 23 | 24 | // 3D textures are not supported on Vita, use 2D to avoid compile errors. 25 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) sampler2D textureName 26 | #define TEXTURE3D(textureName) sampler2D textureName 27 | #define SAMPLER3D(samplerName) 28 | #define TEXTURE3D_ARGS(textureName, samplerName) sampler2D textureName 29 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName 30 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) tex2D(textureName, coord3) 31 | 32 | #define UNITY_BRANCH 33 | #define UNITY_FLATTEN 34 | #define UNITY_UNROLL 35 | #define UNITY_LOOP 36 | #define UNITY_FASTOPT 37 | 38 | #define CBUFFER_START(name) 39 | #define CBUFFER_END 40 | 41 | #define FXAA_HLSL_3 1 42 | #define SMAA_HLSL_3 1 43 | 44 | // pragma exclude_renderers is only supported since Unity 2018.1 for compute shaders 45 | #if UNITY_VERSION < 201810 && !defined(SHADER_API_GLCORE) 46 | # define DISABLE_COMPUTE_SHADERS 1 47 | # define TRIVIAL_COMPUTE_KERNEL(name) [numthreads(1, 1, 1)] void name() {} 48 | #endif 49 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Detail Mask.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ed2906447f0b4cd8b45795fa000b2e8 3 | timeCreated: 1477589132 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 0 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | - buildTarget: Standalone 70 | maxTextureSize: 2048 71 | resizeAlgorithm: 0 72 | textureFormat: -1 73 | textureCompression: 1 74 | compressionQuality: 50 75 | crunchedCompression: 0 76 | allowsAlphaSplitting: 0 77 | overridden: 0 78 | androidETC2FallbackOverride: 0 79 | spriteSheet: 80 | serializedVersion: 2 81 | sprites: [] 82 | outline: [] 83 | physicsShape: [] 84 | spritePackingTag: 85 | userData: 86 | assetBundleName: 87 | assetBundleVariant: 88 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Detail Normal.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f48db5d4864074b1eaca6803431d53cd 3 | timeCreated: 1477584300 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 0 13 | linearTexture: 1 14 | fadeOut: 1 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 1 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 1 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | - buildTarget: Standalone 70 | maxTextureSize: 2048 71 | resizeAlgorithm: 0 72 | textureFormat: -1 73 | textureCompression: 1 74 | compressionQuality: 50 75 | crunchedCompression: 0 76 | allowsAlphaSplitting: 0 77 | overridden: 0 78 | androidETC2FallbackOverride: 0 79 | spriteSheet: 80 | serializedVersion: 2 81 | sprites: [] 82 | outline: [] 83 | physicsShape: [] 84 | spritePackingTag: 85 | userData: 86 | assetBundleName: 87 | assetBundleVariant: 88 | -------------------------------------------------------------------------------- /Assets/Textures/Circuitry/Circuitry Metallic Occlusion Smoothness.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdaec9e6ff36f4cbeacf12cce0af0b44 3 | timeCreated: 1476974170 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | sRGBTexture: 0 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: -1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 0 52 | spriteTessellationDetail: -1 53 | textureType: 0 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 1 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | androidETC2FallbackOverride: 0 69 | - buildTarget: Standalone 70 | maxTextureSize: 2048 71 | resizeAlgorithm: 0 72 | textureFormat: -1 73 | textureCompression: 1 74 | compressionQuality: 50 75 | crunchedCompression: 0 76 | allowsAlphaSplitting: 0 77 | overridden: 0 78 | androidETC2FallbackOverride: 0 79 | spriteSheet: 80 | serializedVersion: 2 81 | sprites: [] 82 | outline: [] 83 | physicsShape: [] 84 | spritePackingTag: 85 | userData: 86 | assetBundleName: 87 | assetBundleVariant: 88 | -------------------------------------------------------------------------------- /Assets/Shaders/API/OpenGL.hlsl: -------------------------------------------------------------------------------- 1 | // For now OpenGL is considered at GLES2 level 2 | #define UNITY_UV_STARTS_AT_TOP 0 3 | #define UNITY_REVERSED_Z 0 4 | #define UNITY_GATHER_SUPPORTED 0 5 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 6 | 7 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) sampler2D textureName 8 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) sampler3D textureName 9 | 10 | #define TEXTURE2D(textureName) sampler2D textureName 11 | #define SAMPLER2D(samplerName) 12 | 13 | #define TEXTURE3D(textureName) sampler3D textureName 14 | #define SAMPLER3D(samplerName) 15 | 16 | #define TEXTURE2D_ARGS(textureName, samplerName) sampler2D textureName 17 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName 18 | 19 | #define TEXTURE3D_ARGS(textureName, samplerName) sampler3D textureName 20 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName 21 | 22 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) tex2D(textureName, coord2) 23 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) tex2Dlod(textureName, float4(coord2, 0.0, lod)) 24 | 25 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) tex3D(textureName, coord3) 26 | 27 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) tex2D(textureName, icoord2 / texelSize) 28 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) tex2Dlod(textureName, float4(icoord2 / texelSize, 0.0, lod)) 29 | 30 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 31 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 32 | 33 | #if SHADER_API_GLES 34 | # define UNITY_BRANCH 35 | # define UNITY_FLATTEN 36 | # define UNITY_UNROLL 37 | # define UNITY_LOOP 38 | # define UNITY_FASTOPT 39 | #else 40 | # define UNITY_BRANCH [branch] 41 | # define UNITY_FLATTEN [flatten] 42 | # define UNITY_UNROLL [unroll] 43 | # define UNITY_LOOP [loop] 44 | # define UNITY_FASTOPT [fastopt] 45 | #endif 46 | 47 | #define CBUFFER_START(name) 48 | #define CBUFFER_END 49 | 50 | #define FXAA_HLSL_3 1 51 | #define SMAA_HLSL_3 1 52 | 53 | // pragma exclude_renderers is only supported since Unity 2018.1 for compute shaders 54 | #if UNITY_VERSION < 201810 && !defined(SHADER_API_GLCORE) 55 | # define DISABLE_COMPUTE_SHADERS 1 56 | # define TRIVIAL_COMPUTE_KERNEL(name) [numthreads(1, 1, 1)] void name() {} 57 | #endif 58 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_LogWhenShaderIsCompiled: 0 64 | -------------------------------------------------------------------------------- /Assets/Shaders/API/Metal.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED 0 // Currently broken on Metal for some reason (May 2017) 4 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 5 | 6 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 7 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 8 | 9 | #define TEXTURE2D(textureName) Texture2D textureName 10 | #define SAMPLER2D(samplerName) SamplerState samplerName 11 | 12 | #define TEXTURE3D(textureName) Texture3D textureName 13 | #define SAMPLER3D(samplerName) SamplerState samplerName 14 | 15 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 16 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 17 | 18 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 19 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 20 | 21 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 22 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 23 | 24 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 25 | 26 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 27 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 28 | 29 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 30 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 31 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 32 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 33 | 34 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 35 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 36 | 37 | #define UNITY_BRANCH [branch] 38 | #define UNITY_FLATTEN [flatten] 39 | #define UNITY_UNROLL [unroll] 40 | #define UNITY_LOOP [loop] 41 | #define UNITY_FASTOPT [fastopt] 42 | 43 | #define CBUFFER_START(name) cbuffer name { 44 | #define CBUFFER_END }; 45 | 46 | #define FXAA_HLSL_4 1 // See UNITY_GATHER_SUPPORTED 47 | #define SMAA_HLSL_4 1 48 | -------------------------------------------------------------------------------- /Assets/Shaders/API/Switch.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50) 4 | 5 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 6 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 7 | 8 | #define TEXTURE2D(textureName) Texture2D textureName 9 | #define SAMPLER2D(samplerName) SamplerState samplerName 10 | 11 | #define TEXTURE3D(textureName) Texture3D textureName 12 | #define SAMPLER3D(samplerName) SamplerState samplerName 13 | 14 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 15 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 16 | 17 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 18 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 19 | 20 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 21 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 22 | 23 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 24 | 25 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 26 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 27 | 28 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 29 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 30 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 31 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 32 | 33 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 34 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 35 | 36 | #define UNITY_BRANCH [branch] 37 | #define UNITY_FLATTEN [flatten] 38 | #define UNITY_UNROLL [unroll] 39 | #define UNITY_LOOP [loop] 40 | #define UNITY_FASTOPT [fastopt] 41 | 42 | #define CBUFFER_START(name) cbuffer name { 43 | #define CBUFFER_END }; 44 | 45 | #if UNITY_GATHER_SUPPORTED 46 | #define FXAA_HLSL_5 1 47 | #define SMAA_HLSL_4_1 1 48 | #else 49 | #define FXAA_HLSL_4 1 50 | #define SMAA_HLSL_4 1 51 | #endif 52 | -------------------------------------------------------------------------------- /Assets/Shaders/API/D3D11.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50) 4 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 5 | 6 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 7 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 8 | 9 | #define TEXTURE2D(textureName) Texture2D textureName 10 | #define SAMPLER2D(samplerName) SamplerState samplerName 11 | 12 | #define TEXTURE3D(textureName) Texture3D textureName 13 | #define SAMPLER3D(samplerName) SamplerState samplerName 14 | 15 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 16 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 17 | 18 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 19 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 20 | 21 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 22 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 23 | 24 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 25 | 26 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 27 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 28 | 29 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 30 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 31 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 32 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 33 | 34 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 35 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 36 | 37 | #define UNITY_BRANCH [branch] 38 | #define UNITY_FLATTEN [flatten] 39 | #define UNITY_UNROLL [unroll] 40 | #define UNITY_LOOP [loop] 41 | #define UNITY_FASTOPT [fastopt] 42 | 43 | #define CBUFFER_START(name) cbuffer name { 44 | #define CBUFFER_END }; 45 | 46 | #if UNITY_GATHER_SUPPORTED 47 | #define FXAA_HLSL_5 1 48 | #define SMAA_HLSL_4_1 1 49 | #else 50 | #define FXAA_HLSL_4 1 51 | #define SMAA_HLSL_4 1 52 | #endif 53 | -------------------------------------------------------------------------------- /Assets/Shaders/API/D3D12.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50) 4 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 5 | 6 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 7 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 8 | 9 | #define TEXTURE2D(textureName) Texture2D textureName 10 | #define SAMPLER2D(samplerName) SamplerState samplerName 11 | 12 | #define TEXTURE3D(textureName) Texture3D textureName 13 | #define SAMPLER3D(samplerName) SamplerState samplerName 14 | 15 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 16 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 17 | 18 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 19 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 20 | 21 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 22 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 23 | 24 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 25 | 26 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 27 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 28 | 29 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 30 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 31 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 32 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 33 | 34 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 35 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 36 | 37 | #define UNITY_BRANCH [branch] 38 | #define UNITY_FLATTEN [flatten] 39 | #define UNITY_UNROLL [unroll] 40 | #define UNITY_LOOP [loop] 41 | #define UNITY_FASTOPT [fastopt] 42 | 43 | #define CBUFFER_START(name) cbuffer name { 44 | #define CBUFFER_END }; 45 | 46 | #if UNITY_GATHER_SUPPORTED 47 | #define FXAA_HLSL_5 1 48 | #define SMAA_HLSL_4_1 1 49 | #else 50 | #define FXAA_HLSL_4 1 51 | #define SMAA_HLSL_4 1 52 | #endif 53 | -------------------------------------------------------------------------------- /Assets/Shaders/API/PSSL.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50) 4 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 5 | 6 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 7 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 8 | 9 | #define TEXTURE2D(textureName) Texture2D textureName 10 | #define SAMPLER2D(samplerName) SamplerState samplerName 11 | 12 | #define TEXTURE3D(textureName) Texture3D textureName 13 | #define SAMPLER3D(samplerName) SamplerState samplerName 14 | 15 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 16 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 17 | 18 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 19 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 20 | 21 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 22 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 23 | 24 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 25 | 26 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 27 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 28 | 29 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 30 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 31 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 32 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 33 | 34 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 35 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 36 | 37 | #define UNITY_BRANCH [branch] 38 | #define UNITY_FLATTEN [flatten] 39 | #define UNITY_UNROLL [unroll] 40 | #define UNITY_LOOP [loop] 41 | #define UNITY_FASTOPT [fastopt] 42 | 43 | #define CBUFFER_START(name) cbuffer name { 44 | #define CBUFFER_END }; 45 | 46 | #if UNITY_GATHER_SUPPORTED 47 | #define FXAA_HLSL_5 1 48 | #define SMAA_HLSL_4_1 1 49 | #else 50 | #define FXAA_HLSL_4 1 51 | #define SMAA_HLSL_4 1 52 | #endif 53 | -------------------------------------------------------------------------------- /Assets/Shaders/API/Vulkan.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50) 4 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 5 | 6 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 7 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 8 | 9 | #define TEXTURE2D(textureName) Texture2D textureName 10 | #define SAMPLER2D(samplerName) SamplerState samplerName 11 | 12 | #define TEXTURE3D(textureName) Texture3D textureName 13 | #define SAMPLER3D(samplerName) SamplerState samplerName 14 | 15 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 16 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 17 | 18 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 19 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 20 | 21 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 22 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 23 | 24 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 25 | 26 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 27 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 28 | 29 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 30 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 31 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 32 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 33 | 34 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 35 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 36 | 37 | #define UNITY_BRANCH [branch] 38 | #define UNITY_FLATTEN [flatten] 39 | #define UNITY_UNROLL [unroll] 40 | #define UNITY_LOOP [loop] 41 | #define UNITY_FASTOPT [fastopt] 42 | 43 | #define CBUFFER_START(name) cbuffer name { 44 | #define CBUFFER_END }; 45 | 46 | #if UNITY_GATHER_SUPPORTED 47 | #define FXAA_HLSL_5 1 48 | #define SMAA_HLSL_4_1 1 49 | #else 50 | #define FXAA_HLSL_4 1 51 | #define SMAA_HLSL_4 1 52 | #endif 53 | -------------------------------------------------------------------------------- /Assets/Shaders/API/XboxOne.hlsl: -------------------------------------------------------------------------------- 1 | #define UNITY_UV_STARTS_AT_TOP 1 2 | #define UNITY_REVERSED_Z 1 3 | #define UNITY_GATHER_SUPPORTED (SHADER_TARGET >= 50) 4 | #define UNITY_CAN_READ_POSITION_IN_FRAGMENT_PROGRAM 1 5 | 6 | #define TEXTURE2D_SAMPLER2D(textureName, samplerName) Texture2D textureName; SamplerState samplerName 7 | #define TEXTURE3D_SAMPLER3D(textureName, samplerName) Texture3D textureName; SamplerState samplerName 8 | 9 | #define TEXTURE2D(textureName) Texture2D textureName 10 | #define SAMPLER2D(samplerName) SamplerState samplerName 11 | 12 | #define TEXTURE3D(textureName) Texture3D textureName 13 | #define SAMPLER3D(samplerName) SamplerState samplerName 14 | 15 | #define TEXTURE2D_ARGS(textureName, samplerName) Texture2D textureName, SamplerState samplerName 16 | #define TEXTURE2D_PARAM(textureName, samplerName) textureName, samplerName 17 | 18 | #define TEXTURE3D_ARGS(textureName, samplerName) Texture3D textureName, SamplerState samplerName 19 | #define TEXTURE3D_PARAM(textureName, samplerName) textureName, samplerName 20 | 21 | #define SAMPLE_TEXTURE2D(textureName, samplerName, coord2) textureName.Sample(samplerName, coord2) 22 | #define SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod) textureName.SampleLevel(samplerName, coord2, lod) 23 | 24 | #define SAMPLE_TEXTURE3D(textureName, samplerName, coord3) textureName.Sample(samplerName, coord3) 25 | 26 | #define LOAD_TEXTURE2D(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, 0)) 27 | #define LOAD_TEXTURE2D_LOD(textureName, texelSize, icoord2) textureName.Load(int3(icoord2, lod)) 28 | 29 | #define GATHER_TEXTURE2D(textureName, samplerName, coord2) textureName.Gather(samplerName, coord2) 30 | #define GATHER_RED_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherRed(samplerName, coord2) 31 | #define GATHER_GREEN_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherGreen(samplerName, coord2) 32 | #define GATHER_BLUE_TEXTURE2D(textureName, samplerName, coord2) textureName.GatherBlue(samplerName, coord2) 33 | 34 | #define SAMPLE_DEPTH_TEXTURE(textureName, samplerName, coord2) SAMPLE_TEXTURE2D(textureName, samplerName, coord2).r 35 | #define SAMPLE_DEPTH_TEXTURE_LOD(textureName, samplerName, coord2, lod) SAMPLE_TEXTURE2D_LOD(textureName, samplerName, coord2, lod).r 36 | 37 | #define UNITY_BRANCH [branch] 38 | #define UNITY_FLATTEN [flatten] 39 | #define UNITY_UNROLL [unroll] 40 | #define UNITY_LOOP [loop] 41 | #define UNITY_FASTOPT [fastopt] 42 | 43 | #define CBUFFER_START(name) cbuffer name { 44 | #define CBUFFER_END }; 45 | 46 | #if UNITY_GATHER_SUPPORTED 47 | #define FXAA_HLSL_5 1 48 | #define SMAA_HLSL_4_1 1 49 | #else 50 | #define FXAA_HLSL_4 1 51 | #define SMAA_HLSL_4 1 52 | #endif 53 | -------------------------------------------------------------------------------- /Assets/Materials/Realtime Emissive.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Realtime Emissive 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 1 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _NormalMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ParallaxMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _BumpScale: 1 72 | - _Cutoff: 0.5 73 | - _DetailBumpScale: 1 74 | - _DetailNormalMapScale: 1 75 | - _DstBlend: 0 76 | - _GlossMapScale: 1 77 | - _Glossiness: 0.5 78 | - _GlossyReflections: 1 79 | - _Metallic: 0 80 | - _Mode: 0 81 | - _OcclusionStrength: 1 82 | - _Parallax: 0.02 83 | - _ParallaxStrength: 0 84 | - _Smoothness: 0.5 85 | - _SmoothnessTextureChannel: 0 86 | - _SpecularHighlights: 1 87 | - _SrcBlend: 1 88 | - _UVSec: 0 89 | - _ZWrite: 1 90 | m_Colors: 91 | - _Color: {r: 0, g: 0, b: 0, a: 1} 92 | - _Emission: {r: 1, g: 1, b: 1, a: 1} 93 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 94 | -------------------------------------------------------------------------------- /Assets/Materials/Parallax.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Parallax 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _DETAIL_ALBEDO_MAP _NORMAL_MAP _PARALLAX_MAP 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 2800000, guid: f2d912d3740a04a39985abc0ad4dffb4, type: 3} 40 | m_Scale: {x: 10, y: 10} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _NormalMap: 59 | m_Texture: {fileID: 2800000, guid: 1f9350247698544968bd29801de776da, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ParallaxMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _BumpScale: 1 72 | - _Cutoff: 0.5 73 | - _DetailBumpScale: 1 74 | - _DetailNormalMapScale: 1 75 | - _DstBlend: 0 76 | - _GlossMapScale: 1 77 | - _Glossiness: 0.5 78 | - _GlossyReflections: 1 79 | - _Metallic: 0 80 | - _Mode: 0 81 | - _OcclusionStrength: 1 82 | - _Parallax: 0.02 83 | - _ParallaxStrength: 0.0275 84 | - _Smoothness: 0.5 85 | - _SmoothnessTextureChannel: 0 86 | - _SpecularHighlights: 1 87 | - _SrcBlend: 1 88 | - _UVSec: 0 89 | - _ZWrite: 1 90 | m_Colors: 91 | - _Color: {r: 1, g: 1, b: 1, a: 1} 92 | - _Emission: {r: 0, g: 0, b: 0, a: 1} 93 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 94 | -------------------------------------------------------------------------------- /Assets/Prefabs/Sphere.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1964787981959372} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1964787981959372 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4251007899870232} 22 | - component: {fileID: 33459462121498006} 23 | - component: {fileID: 135927817494106034} 24 | - component: {fileID: 23445470089877878} 25 | m_Layer: 0 26 | m_Name: Sphere 27 | m_TagString: Untagged 28 | m_Icon: {fileID: 0} 29 | m_NavMeshLayer: 0 30 | m_StaticEditorFlags: 0 31 | m_IsActive: 1 32 | --- !u!4 &4251007899870232 33 | Transform: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 1964787981959372} 38 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 39 | m_LocalPosition: {x: 0, y: 0, z: 0} 40 | m_LocalScale: {x: 1, y: 1, z: 1} 41 | m_Children: [] 42 | m_Father: {fileID: 0} 43 | m_RootOrder: 0 44 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 45 | --- !u!23 &23445470089877878 46 | MeshRenderer: 47 | m_ObjectHideFlags: 1 48 | m_PrefabParentObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 100100000} 50 | m_GameObject: {fileID: 1964787981959372} 51 | m_Enabled: 1 52 | m_CastShadows: 1 53 | m_ReceiveShadows: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_Materials: 58 | - {fileID: 2100000, guid: 30a22e8ae7087446b8d22f828979af7f, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_PreserveUVs: 1 67 | m_IgnoreNormalsForChartDetection: 0 68 | m_ImportantGI: 0 69 | m_SelectedEditorRenderState: 3 70 | m_MinimumChartSize: 4 71 | m_AutoUVMaxDistance: 0.5 72 | m_AutoUVMaxAngle: 89 73 | m_LightmapParameters: {fileID: 0} 74 | m_SortingLayerID: 0 75 | m_SortingLayer: 0 76 | m_SortingOrder: 0 77 | --- !u!33 &33459462121498006 78 | MeshFilter: 79 | m_ObjectHideFlags: 1 80 | m_PrefabParentObject: {fileID: 0} 81 | m_PrefabInternal: {fileID: 100100000} 82 | m_GameObject: {fileID: 1964787981959372} 83 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 84 | --- !u!135 &135927817494106034 85 | SphereCollider: 86 | m_ObjectHideFlags: 1 87 | m_PrefabParentObject: {fileID: 0} 88 | m_PrefabInternal: {fileID: 100100000} 89 | m_GameObject: {fileID: 1964787981959372} 90 | m_Material: {fileID: 0} 91 | m_IsTrigger: 0 92 | m_Enabled: 1 93 | serializedVersion: 2 94 | m_Radius: 0.5 95 | m_Center: {x: 0, y: 0, z: 0} 96 | -------------------------------------------------------------------------------- /Assets/Materials/Flat Wireframe.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Flat Wireframe 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _NormalMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ParallaxMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _BumpScale: 1 72 | - _Cutoff: 0.5 73 | - _DetailBumpScale: 1 74 | - _DetailNormalMapScale: 1 75 | - _DstBlend: 0 76 | - _GlossMapScale: 1 77 | - _Glossiness: 0.5 78 | - _GlossyReflections: 1 79 | - _Metallic: 0 80 | - _Mode: 0 81 | - _OcclusionStrength: 1 82 | - _Parallax: 0.02 83 | - _ParallaxStrength: 0 84 | - _Smoothness: 0.5 85 | - _SmoothnessTextureChannel: 0 86 | - _SpecularHighlights: 1 87 | - _SrcBlend: 1 88 | - _UVSec: 0 89 | - _WireframeSmoothing: 1 90 | - _WireframeThickness: 1 91 | - _WireframeWidth: 1 92 | - _ZWrite: 1 93 | m_Colors: 94 | - _Color: {r: 0.6764706, g: 0.6764706, b: 0.6764706, a: 1} 95 | - _Emission: {r: 0, g: 0, b: 0, a: 1} 96 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 97 | - _WireframeColor: {r: 0, g: 0, b: 0, a: 1} 98 | -------------------------------------------------------------------------------- /Assets/Materials/Lava.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Lava 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _EMISSION_MAP _NORMAL_MAP _SMOOTHNESS_ALBEDO 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 2800000, guid: b1ff59f8987804812bba5f072b0f4ba3, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 2800000, guid: 4686dda0bed414a2d845f4f6213fa208, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _NormalMap: 59 | m_Texture: {fileID: 2800000, guid: a9c83bb41b61d440a869622e21c36294, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ParallaxMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _AlphaCutoff: 0.5 72 | - _BumpScale: 1 73 | - _Cutoff: 0.5 74 | - _DetailBumpScale: 1 75 | - _DetailNormalMapScale: 1 76 | - _DstBlend: 0 77 | - _GlossMapScale: 1 78 | - _Glossiness: 0.5 79 | - _GlossyReflections: 1 80 | - _Metallic: 0 81 | - _Mode: 0 82 | - _OcclusionStrength: 1 83 | - _Parallax: 0.02 84 | - _ParallaxStrength: 0 85 | - _Smoothness: 1 86 | - _SmoothnessTextureChannel: 0 87 | - _SpecularHighlights: 1 88 | - _SrcBlend: 1 89 | - _UVSec: 0 90 | - _ZWrite: 1 91 | m_Colors: 92 | - _Color: {r: 1, g: 1, b: 1, a: 1} 93 | - _Emission: {r: 1, g: 1, b: 1, a: 1} 94 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 95 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 96 | -------------------------------------------------------------------------------- /Assets/Materials/Lava Sphere.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Lava Sphere 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: LIGHTPROBE_SH _EMISSION _EMISSION_MAP _NORMAL_MAP _SMOOTHNESS_ALBEDO 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 2800000, guid: b1ff59f8987804812bba5f072b0f4ba3, type: 3} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MainTex: 47 | m_Texture: {fileID: 2800000, guid: 4686dda0bed414a2d845f4f6213fa208, type: 3} 48 | m_Scale: {x: 2, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MetallicGlossMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _NormalMap: 59 | m_Texture: {fileID: 2800000, guid: a9c83bb41b61d440a869622e21c36294, type: 3} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _OcclusionMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _ParallaxMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | m_Floats: 71 | - _AlphaCutoff: 0.5 72 | - _BumpScale: 1 73 | - _Cutoff: 0.5 74 | - _DetailBumpScale: 1 75 | - _DetailNormalMapScale: 1 76 | - _DstBlend: 0 77 | - _GlossMapScale: 1 78 | - _Glossiness: 0.5 79 | - _GlossyReflections: 1 80 | - _Metallic: 0 81 | - _Mode: 0 82 | - _OcclusionStrength: 1 83 | - _Parallax: 0.02 84 | - _ParallaxStrength: 0 85 | - _Smoothness: 1 86 | - _SmoothnessTextureChannel: 0 87 | - _SpecularHighlights: 1 88 | - _SrcBlend: 1 89 | - _UVSec: 0 90 | - _ZWrite: 1 91 | m_Colors: 92 | - _Color: {r: 1, g: 1, b: 1, a: 1} 93 | - _Emission: {r: 1, g: 1, b: 1, a: 1} 94 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 95 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 96 | -------------------------------------------------------------------------------- /Assets/Shaders/FXAA/FXAANVIDIA.shader: -------------------------------------------------------------------------------- 1 | Shader "FXAANVIDIA" { 2 | Properties { 3 | _MainTex ("Texture", 2D) = "white" {} 4 | } 5 | SubShader { 6 | Cull Off 7 | ZTest Always 8 | ZWrite Off 9 | 10 | Pass { 11 | CGPROGRAM 12 | // FXAA QUALITY版本 13 | #define FXAA_PC 1 14 | #define FXAA_HLSL_3 1 15 | // 为了使用方便,这里直接使用G通道作为颜色,否则需要一个额外的pass来计算亮度并写入到 A通道 16 | #define FXAA_GREEN_AS_LUMA 1 17 | #define FXAA_QUALITY__PRESET 39 18 | #include "UnityCG.cginc" 19 | 20 | // 这里是使用 NIVIDIA的FXAA3.11版本,前面宏定义的方式可参考文件内的注释说明 21 | #include "FXAA_3_11.hlsl" 22 | 23 | sampler2D _MainTex; 24 | float4 _MainTex_TexelSize; 25 | 26 | struct VertexData { 27 | float4 vertex : POSITION; 28 | float2 uv : TEXCOORD0; 29 | }; 30 | 31 | struct Interpolators { 32 | float4 pos : SV_POSITION; 33 | float2 uv : TEXCOORD0; 34 | }; 35 | 36 | Interpolators VertexProgram (VertexData v) { 37 | Interpolators i; 38 | i.pos = UnityObjectToClipPos(v.vertex); 39 | i.uv = v.uv; 40 | return i; 41 | } 42 | float4 FXAAQualityFragement(Interpolators interpolators) : SV_Target 43 | { 44 | float2 UV = interpolators.uv; 45 | // 请查看FXAA文件内部的说明,了解每个参数的含义 46 | return FxaaPixelShader(UV, 0, _MainTex, _MainTex, _MainTex, _MainTex_TexelSize.xy, 0, 0, 0, 47 | 0.75, 0.063, 0.0312, 0, 0, 0, 0); 48 | } 49 | #pragma vertex VertexProgram 50 | #pragma fragment FXAAQualityFragement 51 | ENDCG 52 | } 53 | 54 | Pass { 55 | CGPROGRAM 56 | // FXAA CONSOLE版本 57 | #define FXAA_PC_CONSOLE 1 58 | #define FXAA_HLSL_3 1 59 | #define FXAA_GREEN_AS_LUMA 1 60 | #define FXAA_QUALITY__PRESET 20 61 | #include "UnityCG.cginc" 62 | #include "FXAA_3_11.hlsl" 63 | 64 | sampler2D _MainTex; 65 | float4 _MainTex_TexelSize; 66 | 67 | struct VertexData { 68 | float4 vertex : POSITION; 69 | float2 uv : TEXCOORD0; 70 | }; 71 | 72 | struct Interpolators { 73 | float4 pos : SV_POSITION; 74 | float2 uv : TEXCOORD0; 75 | }; 76 | 77 | Interpolators VertexProgram (VertexData v) { 78 | Interpolators i; 79 | i.pos = UnityObjectToClipPos(v.vertex); 80 | i.uv = v.uv; 81 | return i; 82 | } 83 | float4 FXAAConsoleFragement(Interpolators interpolators) : SV_Target 84 | { 85 | float2 UV = interpolators.uv; 86 | // 用来在四个对角处采样 87 | float4 POS = float4(UV, UV) + float4(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y, _MainTex_TexelSize.x, _MainTex_TexelSize.y) * 0.5f; 88 | 89 | float4 RcpFrame = float4(-_MainTex_TexelSize.x, -_MainTex_TexelSize.y, _MainTex_TexelSize.x, _MainTex_TexelSize.y); 90 | //这部分计算也可以放到CPU中,作为 uniform参数传入 91 | // 这里乘的0.5是一个参数 92 | float4 RcpFrameOpt = RcpFrame * 0.5f; 93 | float4 RcpFrameOpt2 = RcpFrame * 2.0f; 94 | // 请查看FXAA文件内部的说明,了解每个参数对应的含义 95 | return FxaaPixelShader(UV, POS, _MainTex, _MainTex, _MainTex, 0, RcpFrameOpt, RcpFrameOpt2, 0, 96 | 0, 0, 0, 8, 0.125, 0.05, 0); 97 | } 98 | #pragma vertex VertexProgram 99 | #pragma fragment FXAAConsoleFragement 100 | ENDCG 101 | } 102 | } 103 | } -------------------------------------------------------------------------------- /Assets/Shaders/xRLib.hlsl: -------------------------------------------------------------------------------- 1 | // VR/AR/xR lib 2 | 3 | #ifndef UNITY_POSTFX_XRLIB 4 | #define UNITY_POSTFX_XRLIB 5 | 6 | #if defined(UNITY_SINGLE_PASS_STEREO) 7 | CBUFFER_START(UnityStereoGlobals) 8 | float4x4 unity_StereoMatrixP[2]; 9 | float4x4 unity_StereoMatrixV[2]; 10 | float4x4 unity_StereoMatrixInvV[2]; 11 | float4x4 unity_StereoMatrixVP[2]; 12 | 13 | float4x4 unity_StereoCameraProjection[2]; 14 | float4x4 unity_StereoCameraInvProjection[2]; 15 | float4x4 unity_StereoWorldToCamera[2]; 16 | float4x4 unity_StereoCameraToWorld[2]; 17 | 18 | float3 unity_StereoWorldSpaceCameraPos[2]; 19 | float4 unity_StereoScaleOffset[2]; 20 | CBUFFER_END 21 | 22 | CBUFFER_START(UnityStereoEyeIndex) 23 | int unity_StereoEyeIndex; 24 | CBUFFER_END 25 | #endif 26 | 27 | float _RenderViewportScaleFactor; 28 | 29 | float2 UnityStereoScreenSpaceUVAdjust(float2 uv, float4 scaleAndOffset) 30 | { 31 | return uv.xy * scaleAndOffset.xy + scaleAndOffset.zw; 32 | } 33 | 34 | float4 UnityStereoScreenSpaceUVAdjust(float4 uv, float4 scaleAndOffset) 35 | { 36 | return float4(UnityStereoScreenSpaceUVAdjust(uv.xy, scaleAndOffset), UnityStereoScreenSpaceUVAdjust(uv.zw, scaleAndOffset)); 37 | } 38 | 39 | float2 UnityStereoClampScaleOffset(float2 uv, float4 scaleAndOffset) 40 | { 41 | return clamp(uv, scaleAndOffset.zw, scaleAndOffset.zw + scaleAndOffset.xy); 42 | } 43 | 44 | #if defined(UNITY_SINGLE_PASS_STEREO) 45 | float2 TransformStereoScreenSpaceTex(float2 uv, float w) 46 | { 47 | float4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex]; 48 | scaleOffset.xy *= _RenderViewportScaleFactor; 49 | return uv.xy * scaleOffset.xy + scaleOffset.zw * w; 50 | } 51 | 52 | float2 UnityStereoTransformScreenSpaceTex(float2 uv) 53 | { 54 | return TransformStereoScreenSpaceTex(saturate(uv), 1.0); 55 | } 56 | 57 | float4 UnityStereoTransformScreenSpaceTex(float4 uv) 58 | { 59 | return float4(UnityStereoTransformScreenSpaceTex(uv.xy), UnityStereoTransformScreenSpaceTex(uv.zw)); 60 | } 61 | 62 | float2 UnityStereoClamp(float2 uv) 63 | { 64 | float4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex]; 65 | scaleOffset.xy *= _RenderViewportScaleFactor; 66 | return UnityStereoClampScaleOffset(uv, scaleOffset); 67 | } 68 | 69 | float4 UnityStereoAdjustedTexelSize(float4 texelSize) // Should take in _MainTex_TexelSize 70 | { 71 | texelSize.x = texelSize.x * 2.0; // texelSize.x = 1/w. For a double-wide texture, the true resolution is given by 2/w. 72 | texelSize.z = texelSize.z * 0.5; // texelSize.z = w. For a double-wide texture, the true size of the eye texture is given by w/2. 73 | return texelSize; 74 | } 75 | #else 76 | float2 TransformStereoScreenSpaceTex(float2 uv, float w) 77 | { 78 | return uv * _RenderViewportScaleFactor; 79 | } 80 | 81 | float2 UnityStereoTransformScreenSpaceTex(float2 uv) 82 | { 83 | return TransformStereoScreenSpaceTex(saturate(uv), 1.0); 84 | } 85 | 86 | float2 UnityStereoClamp(float2 uv) 87 | { 88 | float4 scaleOffset = float4(_RenderViewportScaleFactor, _RenderViewportScaleFactor, 0.f, 0.f); 89 | return UnityStereoClampScaleOffset(uv, scaleOffset); 90 | } 91 | 92 | float4 UnityStereoAdjustedTexelSize(float4 texelSize) 93 | { 94 | return texelSize; 95 | } 96 | #endif 97 | 98 | #endif // UNITY_POSTFX_XRLIB 99 | -------------------------------------------------------------------------------- /Assets/Textures/AreaTex.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af19a984397542b4d9a225ed4a3146e5 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 0 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 0 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: Android 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 0 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Assets/Textures/SearchTex.tga.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca97c8e8b00fc0848add33a7ead1f612 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 0 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 0 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 2 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 10 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 0 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | - serializedVersion: 3 75 | buildTarget: Standalone 76 | maxTextureSize: 2048 77 | resizeAlgorithm: 0 78 | textureFormat: -1 79 | textureCompression: 0 80 | compressionQuality: 50 81 | crunchedCompression: 0 82 | allowsAlphaSplitting: 0 83 | overridden: 0 84 | androidETC2FallbackOverride: 0 85 | forceMaximumCompressionQuality_BC6H_BC7: 0 86 | - serializedVersion: 3 87 | buildTarget: Android 88 | maxTextureSize: 2048 89 | resizeAlgorithm: 0 90 | textureFormat: -1 91 | textureCompression: 0 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 0 96 | androidETC2FallbackOverride: 0 97 | forceMaximumCompressionQuality_BC6H_BC7: 0 98 | spriteSheet: 99 | serializedVersion: 2 100 | sprites: [] 101 | outline: [] 102 | physicsShape: [] 103 | bones: [] 104 | spriteID: 105 | internalID: 0 106 | vertices: [] 107 | indices: 108 | edges: [] 109 | weights: [] 110 | secondaryTextures: [] 111 | spritePackingTag: 112 | pSDRemoveMatte: 0 113 | pSDShowRemoveMatteOption: 0 114 | userData: 115 | assetBundleName: 116 | assetBundleVariant: 117 | -------------------------------------------------------------------------------- /Assets/Scripts/TAASimple.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | [ExecuteInEditMode] 4 | public class TAASimple : MonoBehaviour { 5 | public Shader taaShader; 6 | private Material taaMaterial; 7 | public Material material 8 | { 9 | get 10 | { 11 | if (taaMaterial == null) 12 | { 13 | if (taaShader == null) return null; 14 | taaMaterial = new Material(taaShader); 15 | } 16 | 17 | return taaMaterial; 18 | } 19 | } 20 | private Camera m_Camera; 21 | public new Camera camera 22 | { 23 | get 24 | { 25 | if (m_Camera == null) 26 | m_Camera = GetComponent(); 27 | 28 | return m_Camera; 29 | } 30 | } 31 | private int FrameCount = 0; 32 | private Vector2 _Jitter; 33 | bool m_ResetHistory = true; 34 | 35 | private RenderTexture[] m_HistoryTextures = new RenderTexture[2]; 36 | 37 | //长度为8的Halton序列 38 | private Vector2[] HaltonSequence = new Vector2[] 39 | { 40 | new Vector2(0.5f, 1.0f / 3), 41 | new Vector2(0.25f, 2.0f / 3), 42 | new Vector2(0.75f, 1.0f / 9), 43 | new Vector2(0.125f, 4.0f / 9), 44 | new Vector2(0.625f, 7.0f / 9), 45 | new Vector2(0.375f, 2.0f / 9), 46 | new Vector2(0.875f, 5.0f / 9), 47 | new Vector2(0.0625f, 8.0f / 9), 48 | }; 49 | 50 | 51 | private void OnEnable() 52 | { 53 | camera.depthTextureMode = DepthTextureMode.Depth | DepthTextureMode.MotionVectors; 54 | camera.useJitteredProjectionMatrixForTransparentRendering = true; 55 | } 56 | 57 | private void OnPreCull() 58 | { 59 | var proj = camera.projectionMatrix; 60 | 61 | camera.nonJitteredProjectionMatrix = proj; 62 | FrameCount++; 63 | var Index = FrameCount % 8; 64 | _Jitter = new Vector2( 65 | (HaltonSequence[Index].x - 0.5f) / camera.pixelWidth, 66 | (HaltonSequence[Index].y - 0.5f) / camera.pixelHeight); 67 | proj.m02 += _Jitter.x * 2; 68 | proj.m12 += _Jitter.y * 2; 69 | camera.projectionMatrix = proj; 70 | } 71 | 72 | private void OnPostRender() 73 | { 74 | camera.ResetProjectionMatrix(); 75 | } 76 | 77 | private void OnRenderImage(RenderTexture source, RenderTexture dest) 78 | { 79 | var historyRead = m_HistoryTextures[FrameCount % 2]; 80 | if (historyRead == null || historyRead.width != Screen.width || historyRead.height != Screen.height) 81 | { 82 | if(historyRead) RenderTexture.ReleaseTemporary(historyRead); 83 | historyRead = RenderTexture.GetTemporary(Screen.width, Screen.height, 0, RenderTextureFormat.ARGBHalf); 84 | m_HistoryTextures[FrameCount % 2] = historyRead; 85 | m_ResetHistory = true; 86 | } 87 | var historyWrite = m_HistoryTextures[(FrameCount + 1) % 2]; 88 | if (historyWrite == null || historyWrite.width != Screen.width || historyWrite.height != Screen.height) 89 | { 90 | if(historyWrite) RenderTexture.ReleaseTemporary(historyWrite); 91 | historyWrite = RenderTexture.GetTemporary(Screen.width, Screen.height, 0, RenderTextureFormat.ARGBHalf); 92 | m_HistoryTextures[(FrameCount + 1) % 2] = historyWrite; 93 | } 94 | 95 | material.SetVector("_Jitter", _Jitter); 96 | material.SetTexture("_HistoryTex", historyRead); 97 | material.SetInt("_IgnoreHistory", m_ResetHistory ? 1 : 0); 98 | 99 | Graphics.Blit(source, historyWrite, material, 0); 100 | Graphics.Blit(historyWrite, dest); 101 | m_ResetHistory = false; 102 | } 103 | } -------------------------------------------------------------------------------- /Assets/Materials/Mirror.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Mirror 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _EMISSION 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _HeightMap: 47 | m_Texture: {fileID: 2800000, guid: d38a4f30d413745adaf12f60ca54997d, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _MetallicMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _NormalMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _OcclusionMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _ParallaxMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - _AlphaCutoff: 0.5 76 | - _BumpScale: 1 77 | - _Cutoff: 0.5 78 | - _DetailBumpScale: 1 79 | - _DetailNormalMapScale: 1 80 | - _DstBlend: 0 81 | - _GlossMapScale: 1 82 | - _Glossiness: 0.5 83 | - _GlossyReflections: 1 84 | - _Metallic: 1 85 | - _Mode: 0 86 | - _NormalBump: 0.25 87 | - _NormalScale: 0.25 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _ParallaxStrength: 0 91 | - _Smoothness: 1 92 | - _SmoothnessTextureChannel: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _UVSec: 0 96 | - _ZWrite: 1 97 | m_Colors: 98 | - _Color: {r: 1, g: 1, b: 1, a: 1} 99 | - _Emission: {r: 0, g: 0, b: 0, a: 1} 100 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _Specular: {r: 0.5, g: 0.5, b: 0.5, a: 1} 102 | - _SpecularTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} 103 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 104 | -------------------------------------------------------------------------------- /Assets/Materials/Transparency.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Transparency 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _RENDERING_TRANSPARENT _SEMITRANSPARENT_SHADOWS 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _HeightMap: 47 | m_Texture: {fileID: 2800000, guid: d38a4f30d413745adaf12f60ca54997d, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _MetallicMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _NormalMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _OcclusionMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _ParallaxMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - _AlphaCutoff: 0.5 76 | - _BumpScale: 1 77 | - _Cutoff: 0.5 78 | - _DetailBumpScale: 1 79 | - _DetailNormalMapScale: 1 80 | - _DstBlend: 0 81 | - _GlossMapScale: 1 82 | - _Glossiness: 0.5 83 | - _GlossyReflections: 1 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _NormalBump: 0.25 87 | - _NormalScale: 0.25 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _ParallaxStrength: 0 91 | - _Smoothness: 0.5 92 | - _SmoothnessTextureChannel: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _UVSec: 0 96 | - _ZWrite: 1 97 | m_Colors: 98 | - _Color: {r: 1, g: 1, b: 1, a: 1} 99 | - _Emission: {r: 0, g: 0, b: 0, a: 1} 100 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 101 | - _Specular: {r: 0.5, g: 0.5, b: 0.5, a: 1} 102 | - _SpecularTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} 103 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 104 | -------------------------------------------------------------------------------- /Assets/Materials/Black.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Black 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: LIGHTPROBE_SH _EMISSION 13 | m_LightmapFlags: 0 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _HeightMap: 47 | m_Texture: {fileID: 2800000, guid: d38a4f30d413745adaf12f60ca54997d, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _MetallicMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _NormalMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _OcclusionMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _ParallaxMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - _AlphaCutoff: 0.5 76 | - _BumpScale: 1 77 | - _Cutoff: 0.5 78 | - _DetailBumpScale: 1 79 | - _DetailNormalMapScale: 1 80 | - _DstBlend: 0 81 | - _GlossMapScale: 1 82 | - _Glossiness: 0.5 83 | - _GlossyReflections: 1 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _NormalBump: 0.25 87 | - _NormalScale: 0.25 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _ParallaxStrength: 0 91 | - _Smoothness: 0.5 92 | - _SmoothnessTextureChannel: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _UVSec: 0 96 | - _WireframeSmoothing: 1 97 | - _WireframeThickness: 1 98 | - _ZWrite: 1 99 | m_Colors: 100 | - _Color: {r: 0, g: 0, b: 0, a: 1} 101 | - _Emission: {r: 0, g: 0, b: 0, a: 1} 102 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 103 | - _Specular: {r: 0.5, g: 0.5, b: 0.5, a: 1} 104 | - _SpecularTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} 105 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 106 | - _WireframeColor: {r: 0, g: 0, b: 0, a: 1} 107 | -------------------------------------------------------------------------------- /Assets/Materials/White.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: White 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: LIGHTPROBE_SH _EMISSION 13 | m_LightmapFlags: 1 14 | m_EnableInstancingVariants: 1 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _DetailTex: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _EmissionMap: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _HeightMap: 47 | m_Texture: {fileID: 2800000, guid: d38a4f30d413745adaf12f60ca54997d, type: 3} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _MainTex: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _MetallicGlossMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | - _MetallicMap: 59 | m_Texture: {fileID: 0} 60 | m_Scale: {x: 1, y: 1} 61 | m_Offset: {x: 0, y: 0} 62 | - _NormalMap: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - _OcclusionMap: 67 | m_Texture: {fileID: 0} 68 | m_Scale: {x: 1, y: 1} 69 | m_Offset: {x: 0, y: 0} 70 | - _ParallaxMap: 71 | m_Texture: {fileID: 0} 72 | m_Scale: {x: 1, y: 1} 73 | m_Offset: {x: 0, y: 0} 74 | m_Floats: 75 | - _AlphaCutoff: 0.5 76 | - _BumpScale: 1 77 | - _Cutoff: 0.5 78 | - _DetailBumpScale: 1 79 | - _DetailNormalMapScale: 1 80 | - _DstBlend: 0 81 | - _GlossMapScale: 1 82 | - _Glossiness: 0.5 83 | - _GlossyReflections: 1 84 | - _Metallic: 0 85 | - _Mode: 0 86 | - _NormalBump: 0.25 87 | - _NormalScale: 0.25 88 | - _OcclusionStrength: 1 89 | - _Parallax: 0.02 90 | - _ParallaxStrength: 0 91 | - _Smoothness: 0.5 92 | - _SmoothnessTextureChannel: 0 93 | - _SpecularHighlights: 1 94 | - _SrcBlend: 1 95 | - _UVSec: 0 96 | - _WireframeSmoothing: 1 97 | - _WireframeThickness: 1 98 | - _ZWrite: 1 99 | m_Colors: 100 | - _Color: {r: 1, g: 1, b: 1, a: 1} 101 | - _Emission: {r: 0, g: 0, b: 0, a: 1} 102 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 103 | - _Specular: {r: 0.5, g: 0.5, b: 0.5, a: 1} 104 | - _SpecularTint: {r: 0.5, g: 0.5, b: 0.5, a: 1} 105 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 106 | - _WireframeColor: {r: 0, g: 0, b: 0, a: 1} 107 | -------------------------------------------------------------------------------- /Assets/Materials/Circuitry.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Circuitry 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _DETAIL_ALBEDO_MAP _DETAIL_MASK _DETAIL_NORMAL_MAP _EMISSION_MAP 13 | _METALLIC_MAP _NORMAL_MAP _OCCLUSION_MAP _SMOOTHNESS_METALLIC 14 | m_LightmapFlags: 0 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 2800000, guid: 6ed2906447f0b4cd8b45795fa000b2e8, type: 3} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 2800000, guid: f48db5d4864074b1eaca6803431d53cd, type: 3} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailTex: 40 | m_Texture: {fileID: 2800000, guid: a4ce85ee15d9d4f1482777e9745c606a, type: 3} 41 | m_Scale: {x: 3, y: 3} 42 | m_Offset: {x: 0, y: 0} 43 | - _EmissionMap: 44 | m_Texture: {fileID: 2800000, guid: cb8292d7b05e24ce2bac28d43938ace1, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MainTex: 48 | m_Texture: {fileID: 2800000, guid: 3e24fcab8e17a4664b37ee69f9b39b52, type: 3} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MetallicGlossMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MetallicMap: 56 | m_Texture: {fileID: 2800000, guid: bdaec9e6ff36f4cbeacf12cce0af0b44, type: 3} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _NormalMap: 60 | m_Texture: {fileID: 2800000, guid: 11e9b2094aa1f494897822222abba5ed, type: 3} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _OcclusionMap: 64 | m_Texture: {fileID: 2800000, guid: bdaec9e6ff36f4cbeacf12cce0af0b44, type: 3} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _ParallaxMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | m_Floats: 72 | - _AlphaCutoff: 0.5 73 | - _BumpScale: 1 74 | - _Cutoff: 0.5 75 | - _DetailBumpScale: 1 76 | - _DetailNormalMapScale: 1 77 | - _DstBlend: 0 78 | - _GlossMapScale: 1 79 | - _Glossiness: 0.5 80 | - _GlossyReflections: 1 81 | - _Metallic: 0 82 | - _Mode: 0 83 | - _OcclusionStrength: 1 84 | - _Parallax: 0.02 85 | - _ParallaxStrength: 0 86 | - _Smoothness: 1 87 | - _SmoothnessTextureChannel: 0 88 | - _SpecularHighlights: 1 89 | - _SrcBlend: 1 90 | - _UVSec: 0 91 | - _ZWrite: 1 92 | m_Colors: 93 | - _Color: {r: 1, g: 1, b: 1, a: 1} 94 | - _Emission: {r: 1, g: 1, b: 1, a: 1} 95 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 96 | - _EmissionTint: {r: 0, g: 0, b: 0, a: 1} 97 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 98 | -------------------------------------------------------------------------------- /Assets/Materials/Circuitry x3.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Circuitry x3 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: LIGHTPROBE_SH _DETAIL_ALBEDO_MAP _DETAIL_MASK _DETAIL_MULX2 _DETAIL_NORMAL_MAP 13 | _EMISSION _EMISSION_MAP _METALLIC_MAP _NORMALMAP _NORMAL_MAP _OCCLUSION_MAP _SMOOTHNESS_METALLIC 14 | m_LightmapFlags: 1 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 2800000, guid: 6ed2906447f0b4cd8b45795fa000b2e8, type: 3} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 2800000, guid: f48db5d4864074b1eaca6803431d53cd, type: 3} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailTex: 40 | m_Texture: {fileID: 2800000, guid: a4ce85ee15d9d4f1482777e9745c606a, type: 3} 41 | m_Scale: {x: 9, y: 9} 42 | m_Offset: {x: 0, y: 0} 43 | - _EmissionMap: 44 | m_Texture: {fileID: 2800000, guid: cb8292d7b05e24ce2bac28d43938ace1, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MainTex: 48 | m_Texture: {fileID: 2800000, guid: 3e24fcab8e17a4664b37ee69f9b39b52, type: 3} 49 | m_Scale: {x: 3, y: 3} 50 | m_Offset: {x: 0, y: 0} 51 | - _MetallicGlossMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MetallicMap: 56 | m_Texture: {fileID: 2800000, guid: bdaec9e6ff36f4cbeacf12cce0af0b44, type: 3} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _NormalMap: 60 | m_Texture: {fileID: 2800000, guid: 11e9b2094aa1f494897822222abba5ed, type: 3} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _OcclusionMap: 64 | m_Texture: {fileID: 2800000, guid: bdaec9e6ff36f4cbeacf12cce0af0b44, type: 3} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _ParallaxMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | m_Floats: 72 | - _AlphaCutoff: 0.5 73 | - _BumpScale: 1 74 | - _Cutoff: 0.5 75 | - _DetailBumpScale: 1 76 | - _DetailNormalMapScale: 1 77 | - _DstBlend: 0 78 | - _GlossMapScale: 1 79 | - _Glossiness: 0.5 80 | - _GlossyReflections: 1 81 | - _Metallic: 0 82 | - _Mode: 0 83 | - _OcclusionStrength: 1 84 | - _Parallax: 0.02 85 | - _ParallaxStrength: 0 86 | - _Smoothness: 1 87 | - _SmoothnessTextureChannel: 0 88 | - _SpecularHighlights: 1 89 | - _SrcBlend: 1 90 | - _UVSec: 0 91 | - _ZWrite: 1 92 | m_Colors: 93 | - _Color: {r: 1, g: 1, b: 1, a: 1} 94 | - _Emission: {r: 1, g: 1, b: 1, a: 1} 95 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 96 | - _EmissionTint: {r: 0, g: 0, b: 0, a: 1} 97 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 98 | -------------------------------------------------------------------------------- /Assets/Materials/Circuitry Sphere.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Circuitry Sphere 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: LIGHTPROBE_SH _DETAIL_ALBEDO_MAP _DETAIL_MASK _DETAIL_MULX2 _DETAIL_NORMAL_MAP 13 | _EMISSION _EMISSION_MAP _METALLIC_MAP _NORMALMAP _NORMAL_MAP _OCCLUSION_MAP _SMOOTHNESS_METALLIC 14 | m_LightmapFlags: 0 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 2800000, guid: 6ed2906447f0b4cd8b45795fa000b2e8, type: 3} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 2800000, guid: f48db5d4864074b1eaca6803431d53cd, type: 3} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailTex: 40 | m_Texture: {fileID: 2800000, guid: a4ce85ee15d9d4f1482777e9745c606a, type: 3} 41 | m_Scale: {x: 6, y: 3} 42 | m_Offset: {x: 0, y: 0} 43 | - _EmissionMap: 44 | m_Texture: {fileID: 2800000, guid: cb8292d7b05e24ce2bac28d43938ace1, type: 3} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MainTex: 48 | m_Texture: {fileID: 2800000, guid: 3e24fcab8e17a4664b37ee69f9b39b52, type: 3} 49 | m_Scale: {x: 2, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _MetallicGlossMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MetallicMap: 56 | m_Texture: {fileID: 2800000, guid: bdaec9e6ff36f4cbeacf12cce0af0b44, type: 3} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _NormalMap: 60 | m_Texture: {fileID: 2800000, guid: 11e9b2094aa1f494897822222abba5ed, type: 3} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _OcclusionMap: 64 | m_Texture: {fileID: 2800000, guid: bdaec9e6ff36f4cbeacf12cce0af0b44, type: 3} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _ParallaxMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | m_Floats: 72 | - _AlphaCutoff: 0.5 73 | - _BumpScale: 1 74 | - _Cutoff: 0.5 75 | - _DetailBumpScale: 1 76 | - _DetailNormalMapScale: 1 77 | - _DstBlend: 0 78 | - _GlossMapScale: 1 79 | - _Glossiness: 0.5 80 | - _GlossyReflections: 1 81 | - _Metallic: 0 82 | - _Mode: 0 83 | - _OcclusionStrength: 1 84 | - _Parallax: 0.02 85 | - _ParallaxStrength: 0 86 | - _Smoothness: 1 87 | - _SmoothnessTextureChannel: 0 88 | - _SpecularHighlights: 1 89 | - _SrcBlend: 1 90 | - _UVSec: 0 91 | - _ZWrite: 1 92 | m_Colors: 93 | - _Color: {r: 1, g: 1, b: 1, a: 1} 94 | - _Emission: {r: 1, g: 1, b: 1, a: 1} 95 | - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} 96 | - _EmissionTint: {r: 0, g: 0, b: 0, a: 1} 97 | - _Tint: {r: 1, g: 1, b: 1, a: 1} 98 | -------------------------------------------------------------------------------- /Assets/Prefabs/LOD Sphere.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1514513620168652} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1514513620168652 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4978139320148708} 22 | - component: {fileID: 205267803035535524} 23 | m_Layer: 0 24 | m_Name: LOD Sphere 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!1 &1985911131313390 31 | GameObject: 32 | m_ObjectHideFlags: 0 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | serializedVersion: 5 36 | m_Component: 37 | - component: {fileID: 4900081316263252} 38 | - component: {fileID: 33413866282116196} 39 | - component: {fileID: 135391083043175792} 40 | - component: {fileID: 23574838383550426} 41 | m_Layer: 0 42 | m_Name: Sphere 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!4 &4900081316263252 49 | Transform: 50 | m_ObjectHideFlags: 1 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | m_GameObject: {fileID: 1985911131313390} 54 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 55 | m_LocalPosition: {x: 0, y: 0, z: 0} 56 | m_LocalScale: {x: 1, y: 1, z: 1} 57 | m_Children: [] 58 | m_Father: {fileID: 4978139320148708} 59 | m_RootOrder: 0 60 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 61 | --- !u!4 &4978139320148708 62 | Transform: 63 | m_ObjectHideFlags: 1 64 | m_PrefabParentObject: {fileID: 0} 65 | m_PrefabInternal: {fileID: 100100000} 66 | m_GameObject: {fileID: 1514513620168652} 67 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 68 | m_LocalPosition: {x: 0, y: 0, z: 0} 69 | m_LocalScale: {x: 1, y: 1, z: 1} 70 | m_Children: 71 | - {fileID: 4900081316263252} 72 | m_Father: {fileID: 0} 73 | m_RootOrder: 0 74 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 75 | --- !u!23 &23574838383550426 76 | MeshRenderer: 77 | m_ObjectHideFlags: 1 78 | m_PrefabParentObject: {fileID: 0} 79 | m_PrefabInternal: {fileID: 100100000} 80 | m_GameObject: {fileID: 1985911131313390} 81 | m_Enabled: 1 82 | m_CastShadows: 1 83 | m_ReceiveShadows: 1 84 | m_MotionVectors: 1 85 | m_LightProbeUsage: 1 86 | m_ReflectionProbeUsage: 1 87 | m_Materials: 88 | - {fileID: 2100000, guid: 30a22e8ae7087446b8d22f828979af7f, type: 2} 89 | m_StaticBatchInfo: 90 | firstSubMesh: 0 91 | subMeshCount: 0 92 | m_StaticBatchRoot: {fileID: 0} 93 | m_ProbeAnchor: {fileID: 0} 94 | m_LightProbeVolumeOverride: {fileID: 0} 95 | m_ScaleInLightmap: 1 96 | m_PreserveUVs: 1 97 | m_IgnoreNormalsForChartDetection: 0 98 | m_ImportantGI: 0 99 | m_SelectedEditorRenderState: 3 100 | m_MinimumChartSize: 4 101 | m_AutoUVMaxDistance: 0.5 102 | m_AutoUVMaxAngle: 89 103 | m_LightmapParameters: {fileID: 0} 104 | m_SortingLayerID: 0 105 | m_SortingLayer: 0 106 | m_SortingOrder: 0 107 | --- !u!33 &33413866282116196 108 | MeshFilter: 109 | m_ObjectHideFlags: 1 110 | m_PrefabParentObject: {fileID: 0} 111 | m_PrefabInternal: {fileID: 100100000} 112 | m_GameObject: {fileID: 1985911131313390} 113 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 114 | --- !u!135 &135391083043175792 115 | SphereCollider: 116 | m_ObjectHideFlags: 1 117 | m_PrefabParentObject: {fileID: 0} 118 | m_PrefabInternal: {fileID: 100100000} 119 | m_GameObject: {fileID: 1985911131313390} 120 | m_Material: {fileID: 0} 121 | m_IsTrigger: 0 122 | m_Enabled: 1 123 | serializedVersion: 2 124 | m_Radius: 0.5 125 | m_Center: {x: 0, y: 0, z: 0} 126 | --- !u!205 &205267803035535524 127 | LODGroup: 128 | m_ObjectHideFlags: 1 129 | m_PrefabParentObject: {fileID: 0} 130 | m_PrefabInternal: {fileID: 100100000} 131 | m_GameObject: {fileID: 1514513620168652} 132 | serializedVersion: 2 133 | m_LocalReferencePoint: {x: 0, y: 0, z: 0} 134 | m_Size: 1 135 | m_FadeMode: 1 136 | m_AnimateCrossFading: 0 137 | m_LODs: 138 | - screenRelativeHeight: 0.025152123 139 | fadeTransitionWidth: 0.25 140 | renderers: 141 | - renderer: {fileID: 23574838383550426} 142 | m_Enabled: 1 143 | -------------------------------------------------------------------------------- /Assets/Shaders/SMAA/SMAANVIDIA.shader: -------------------------------------------------------------------------------- 1 | Shader "SMAANVIDIA" 2 | { 3 | Properties { 4 | _MainTex ("Texture", 2D) = "white" {} 5 | } 6 | HLSLINCLUDE 7 | #pragma exclude_renderers gles 8 | #include "../Stdlib.hlsl" 9 | 10 | TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex); 11 | TEXTURE2D_SAMPLER2D(_BlendTex, sampler_BlendTex); 12 | TEXTURE2D_SAMPLER2D(_AreaTex, sampler_AreaTex); 13 | TEXTURE2D_SAMPLER2D(_SearchTex, sampler_SearchTex); 14 | float4 _MainTex_TexelSize; 15 | SamplerState sampler_LinearClamp; 16 | SamplerState sampler_PointClamp; 17 | 18 | #define SMAA_RT_METRICS _MainTex_TexelSize 19 | #define SMAA_AREATEX_SELECT(s) s.rg 20 | #define SMAA_SEARCHTEX_SELECT(s) s.a 21 | #define LinearSampler sampler_LinearClamp 22 | #define PointSampler sampler_PointClamp 23 | 24 | #include "SubpixelMorphologicalAntialiasing.hlsl" 25 | struct Attributes 26 | { 27 | float3 vertex : POSITION; 28 | float2 uv : TEXCOORD0; 29 | }; 30 | 31 | ENDHLSL 32 | 33 | SubShader 34 | { 35 | Cull Off ZWrite Off ZTest Always 36 | 37 | // Edge detection 38 | Pass 39 | { 40 | 41 | HLSLPROGRAM 42 | struct VaryingsEdge 43 | { 44 | float4 vertex : SV_POSITION; 45 | float2 texcoord : TEXCOORD0; 46 | float4 offsets[3] : TEXCOORD1; 47 | }; 48 | VaryingsEdge VertEdge(Attributes v) 49 | { 50 | VaryingsEdge o; 51 | o.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, float4(v.vertex, 1.0))); 52 | o.texcoord = v.uv; 53 | SMAAEdgeDetectionVS(o.texcoord, o.offsets); 54 | return o; 55 | } 56 | 57 | float4 FragEdge(VaryingsEdge i) : SV_Target 58 | { 59 | return float4(SMAAColorEdgeDetectionPS(i.texcoord, i.offsets, _MainTex), 0.0, 0.0); 60 | } 61 | #pragma vertex VertEdge 62 | #pragma fragment FragEdge 63 | 64 | ENDHLSL 65 | } 66 | 67 | // Blend Weights Calculation 68 | Pass 69 | { 70 | 71 | HLSLPROGRAM 72 | struct VaryingsBlend 73 | { 74 | float4 vertex : SV_POSITION; 75 | float2 texcoord : TEXCOORD0; 76 | float2 pixcoord : TEXCOORD1; 77 | float4 offsets[3] : TEXCOORD2; 78 | }; 79 | VaryingsBlend VertBlend(Attributes v) 80 | { 81 | VaryingsBlend o; 82 | o.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, float4(v.vertex, 1.0))); 83 | o.texcoord = v.uv; 84 | SMAABlendingWeightCalculationVS(o.texcoord, o.pixcoord, o.offsets); 85 | return o; 86 | } 87 | 88 | float4 FragBlend(VaryingsBlend i) : SV_Target 89 | { 90 | return SMAABlendingWeightCalculationPS(i.texcoord, i.pixcoord, i.offsets, _MainTex, _AreaTex, _SearchTex, 0); 91 | } 92 | #pragma vertex VertBlend 93 | #pragma fragment FragBlend 94 | 95 | ENDHLSL 96 | } 97 | 98 | // Neighborhood Blending 99 | Pass 100 | { 101 | HLSLPROGRAM 102 | struct VaryingsNeighbor 103 | { 104 | float4 vertex : SV_POSITION; 105 | float2 texcoord : TEXCOORD0; 106 | float4 offset : TEXCOORD1; 107 | }; 108 | VaryingsNeighbor VertNeighbor(Attributes v) 109 | { 110 | VaryingsNeighbor o; 111 | o.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, float4(v.vertex, 1.0))); 112 | o.texcoord = v.uv; 113 | SMAANeighborhoodBlendingVS(o.texcoord, o.offset); 114 | return o; 115 | } 116 | 117 | float4 FragNeighbor(VaryingsNeighbor i) : SV_Target 118 | { 119 | return SMAANeighborhoodBlendingPS(i.texcoord, i.offset, _MainTex, _BlendTex); 120 | } 121 | #pragma vertex VertNeighbor 122 | #pragma fragment FragNeighbor 123 | 124 | ENDHLSL 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /Assets/Shaders/Sampling.hlsl: -------------------------------------------------------------------------------- 1 | #ifndef UNITY_POSTFX_SAMPLING 2 | #define UNITY_POSTFX_SAMPLING 3 | 4 | #include "StdLib.hlsl" 5 | 6 | // Better, temporally stable box filtering 7 | // [Jimenez14] http://goo.gl/eomGso 8 | // . . . . . . . 9 | // . A . B . C . 10 | // . . D . E . . 11 | // . F . G . H . 12 | // . . I . J . . 13 | // . K . L . M . 14 | // . . . . . . . 15 | half4 DownsampleBox13Tap(TEXTURE2D_ARGS(tex, samplerTex), float2 uv, float2 texelSize) 16 | { 17 | half4 A = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2(-1.0, -1.0))); 18 | half4 B = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 0.0, -1.0))); 19 | half4 C = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 1.0, -1.0))); 20 | half4 D = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2(-0.5, -0.5))); 21 | half4 E = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 0.5, -0.5))); 22 | half4 F = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2(-1.0, 0.0))); 23 | half4 G = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv )); 24 | half4 H = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 1.0, 0.0))); 25 | half4 I = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2(-0.5, 0.5))); 26 | half4 J = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 0.5, 0.5))); 27 | half4 K = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2(-1.0, 1.0))); 28 | half4 L = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 0.0, 1.0))); 29 | half4 M = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + texelSize * float2( 1.0, 1.0))); 30 | 31 | half2 div = (1.0 / 4.0) * half2(0.5, 0.125); 32 | 33 | half4 o = (D + E + I + J) * div.x; 34 | o += (A + B + G + F) * div.y; 35 | o += (B + C + H + G) * div.y; 36 | o += (F + G + L + K) * div.y; 37 | o += (G + H + M + L) * div.y; 38 | 39 | return o; 40 | } 41 | 42 | // Standard box filtering 43 | half4 DownsampleBox4Tap(TEXTURE2D_ARGS(tex, samplerTex), float2 uv, float2 texelSize) 44 | { 45 | float4 d = texelSize.xyxy * float4(-1.0, -1.0, 1.0, 1.0); 46 | 47 | half4 s; 48 | s = (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.xy))); 49 | s += (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.zy))); 50 | s += (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.xw))); 51 | s += (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.zw))); 52 | 53 | return s * (1.0 / 4.0); 54 | } 55 | 56 | // 9-tap bilinear upsampler (tent filter) 57 | half4 UpsampleTent(TEXTURE2D_ARGS(tex, samplerTex), float2 uv, float2 texelSize, float4 sampleScale) 58 | { 59 | float4 d = texelSize.xyxy * float4(1.0, 1.0, -1.0, 0.0) * sampleScale; 60 | 61 | half4 s; 62 | s = SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv - d.xy)); 63 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv - d.wy)) * 2.0; 64 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv - d.zy)); 65 | 66 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.zw)) * 2.0; 67 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv )) * 4.0; 68 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.xw)) * 2.0; 69 | 70 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.zy)); 71 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.wy)) * 2.0; 72 | s += SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.xy)); 73 | 74 | return s * (1.0 / 16.0); 75 | } 76 | 77 | // Standard box filtering 78 | half4 UpsampleBox(TEXTURE2D_ARGS(tex, samplerTex), float2 uv, float2 texelSize, float4 sampleScale) 79 | { 80 | float4 d = texelSize.xyxy * float4(-1.0, -1.0, 1.0, 1.0) * (sampleScale * 0.5); 81 | 82 | half4 s; 83 | s = (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.xy))); 84 | s += (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.zy))); 85 | s += (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.xw))); 86 | s += (SAMPLE_TEXTURE2D(tex, samplerTex, UnityStereoTransformScreenSpaceTex(uv + d.zw))); 87 | 88 | return s * (1.0 / 4.0); 89 | } 90 | 91 | #endif // UNITY_POSTFX_SAMPLING 92 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 8 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo Switch: 5 223 | PS4: 5 224 | Standalone: 5 225 | WebGL: 3 226 | Windows Store Apps: 5 227 | XboxOne: 5 228 | iPhone: 2 229 | tvOS: 2 230 | -------------------------------------------------------------------------------- /Assets/Shaders/FXAA/FXAASelf.shader: -------------------------------------------------------------------------------- 1 | Shader "FXAASelf" { 2 | Properties { 3 | _MainTex ("Texture", 2D) = "white" {} 4 | } 5 | 6 | CGINCLUDE 7 | #include "UnityCG.cginc" 8 | 9 | sampler2D _MainTex; 10 | float4 _MainTex_TexelSize; 11 | 12 | float _ContrastThreshold, _RelativeThreshold; 13 | 14 | struct VertexData { 15 | float4 vertex : POSITION; 16 | float2 uv : TEXCOORD0; 17 | }; 18 | 19 | struct Interpolators { 20 | float4 pos : SV_POSITION; 21 | float2 uv : TEXCOORD0; 22 | }; 23 | 24 | Interpolators VertexProgram (VertexData v) { 25 | Interpolators i; 26 | i.pos = UnityObjectToClipPos(v.vertex); 27 | i.uv = v.uv; 28 | return i; 29 | } 30 | 31 | float4 FXAAQualityFragement(Interpolators interpolators) : SV_Target 32 | { 33 | float2 UV = interpolators.uv; 34 | float2 TexelSize = _MainTex_TexelSize.xy; 35 | float4 Origin = tex2D(_MainTex, UV); 36 | float M = Luminance(Origin); 37 | float E = Luminance(tex2D(_MainTex, UV + float2( TexelSize.x, 0))); 38 | float N = Luminance(tex2D(_MainTex, UV + float2( 0, TexelSize.y))); 39 | float W = Luminance(tex2D(_MainTex, UV + float2(-TexelSize.x, 0))); 40 | float S = Luminance(tex2D(_MainTex, UV + float2( 0, -TexelSize.y))); 41 | float NW = Luminance(tex2D(_MainTex, UV + float2(-TexelSize.x, TexelSize.y))); 42 | float NE = Luminance(tex2D(_MainTex, UV + float2( TexelSize.x, TexelSize.y))); 43 | float SW = Luminance(tex2D(_MainTex, UV + float2(-TexelSize.x, -TexelSize.y))); 44 | float SE = Luminance(tex2D(_MainTex, UV + float2( TexelSize.x, -TexelSize.y))); 45 | 46 | //计算出对比度的值 47 | float MaxLuma = max(max(max(N, E), max(W, S)), M); 48 | float MinLuma = min(min(min(N, E), min(W, S)), M); 49 | float Contrast = MaxLuma - MinLuma; 50 | 51 | //如果对比度值很小,认为不需要进行抗锯齿,直接跳过抗锯齿计算 52 | if(Contrast < max(_ContrastThreshold, MaxLuma * _RelativeThreshold)) 53 | { 54 | return Origin; 55 | } 56 | 57 | // 先计算出锯齿的方向,是水平还是垂直方向 58 | float Vertical = abs(N + S - 2 * M) * 2 + abs(NE + SE - 2 * E) + abs(NW + SW - 2 * W); 59 | float Horizontal = abs(E + W - 2 * M) * 2 + abs(NE + NW - 2 * N) + abs(SE + SW - 2 * S); 60 | bool IsHorizontal = Vertical > Horizontal; 61 | //混合的方向 62 | float2 PixelStep = IsHorizontal ? float2(0, TexelSize.y) : float2(TexelSize.x, 0); 63 | // 确定混合方向的正负值 64 | float Positive = abs((IsHorizontal ? N : E) - M); 65 | float Negative = abs((IsHorizontal ? S : W) - M); 66 | // if(Positive < Negative) PixelStep = -PixelStep; 67 | // 算出锯齿两侧的亮度变化的梯度值 68 | float Gradient, OppositeLuminance; 69 | if(Positive > Negative) { 70 | Gradient = Positive; 71 | OppositeLuminance = IsHorizontal ? N : E; 72 | } else { 73 | PixelStep = -PixelStep; 74 | Gradient = Negative; 75 | OppositeLuminance = IsHorizontal ? S : W; 76 | } 77 | 78 | 79 | // 这部分是基于亮度的混合系数计算 80 | float Filter = 2 * (N + E + S + W) + NE + NW + SE + SW; 81 | Filter = Filter / 12; 82 | Filter = abs(Filter - M); 83 | Filter = saturate(Filter / Contrast); 84 | // 基于亮度的混合系数值 85 | float PixelBlend = smoothstep(0, 1, Filter); 86 | PixelBlend = PixelBlend * PixelBlend; 87 | 88 | // 下面是基于边界的混合系数计算 89 | float2 UVEdge = UV; 90 | UVEdge += PixelStep * 0.5f; 91 | float2 EdgeStep = IsHorizontal ? float2(TexelSize.x, 0) : float2(0, TexelSize.y); 92 | 93 | // 这里是定义搜索的步长,步长越长,效果自然越好 94 | #define _SearchSteps 15 95 | // 未搜索到边界时,猜测的边界距离 96 | #define _Guess 8 97 | 98 | // 沿着锯齿边界两侧,进行搜索,找到锯齿的边界 99 | float EdgeLuminance = (M + OppositeLuminance) * 0.5f; 100 | float GradientThreshold = Gradient * 0.25f; 101 | float PLuminanceDelta, NLuminanceDelta, PDistance, NDistance; 102 | int i; 103 | UNITY_UNROLL 104 | for(i = 1; i <= _SearchSteps; ++i) { 105 | PLuminanceDelta = Luminance(tex2D(_MainTex, UVEdge + i * EdgeStep)) - EdgeLuminance; 106 | if(abs(PLuminanceDelta) > GradientThreshold) { 107 | PDistance = i * (IsHorizontal ? EdgeStep.x : EdgeStep.y); 108 | break; 109 | } 110 | } 111 | if(i == _SearchSteps + 1) { 112 | PDistance = EdgeStep * _Guess; 113 | } 114 | UNITY_UNROLL 115 | for(i = 1; i <= _SearchSteps; ++i) { 116 | NLuminanceDelta = Luminance(tex2D(_MainTex, UVEdge - i * EdgeStep)) - EdgeLuminance; 117 | if(abs(NLuminanceDelta) > GradientThreshold) { 118 | NDistance = i * (IsHorizontal ? EdgeStep.x : EdgeStep.y); 119 | break; 120 | } 121 | } 122 | if(i == _SearchSteps + 1) { 123 | NDistance = EdgeStep * _Guess; 124 | } 125 | 126 | float EdgeBlend; 127 | // 这里是计算基于边界的混合系数,如果边界方向错误,直接设为0,如果方向正确,按照相对的距离来估算混合系数 128 | if (PDistance < NDistance) { 129 | if(sign(PLuminanceDelta) == sign(M - EdgeLuminance)) { 130 | EdgeBlend = 0; 131 | } else { 132 | EdgeBlend = 0.5f - PDistance / (PDistance + NDistance); 133 | } 134 | } else { 135 | if(sign(NLuminanceDelta) == sign(M - EdgeLuminance)) { 136 | EdgeBlend = 0; 137 | } else { 138 | EdgeBlend = 0.5f - NDistance / (PDistance + NDistance); 139 | } 140 | } 141 | 142 | //从两种混合系数中,取最大的那个 143 | float FinalBlend = max(PixelBlend, EdgeBlend); 144 | float4 Result = tex2D(_MainTex, UV + PixelStep * FinalBlend); 145 | return Result; 146 | } 147 | 148 | float4 FXAAConsoleFragement(Interpolators interpolators) : SV_Target 149 | { 150 | float2 UV = interpolators.uv; 151 | float2 TexelSize = _MainTex_TexelSize.xy; 152 | float4 Origin = tex2D(_MainTex, UV); 153 | float M = Luminance(Origin); 154 | float NW = Luminance(tex2D(_MainTex, UV + float2(-TexelSize.x, TexelSize.y) * 0.5)); 155 | float NE = Luminance(tex2D(_MainTex, UV + float2( TexelSize.x, TexelSize.y) * 0.5)); 156 | float SW = Luminance(tex2D(_MainTex, UV + float2(-TexelSize.x, -TexelSize.y) * 0.5)); 157 | float SE = Luminance(tex2D(_MainTex, UV + float2( TexelSize.x, -TexelSize.y) * 0.5)); 158 | 159 | float MaxLuma = max(max(NW, NE), max(SW, SE)); 160 | float MinLuma = min(min(NW, NE), min(NW, NE)); 161 | float Contrast = max(MaxLuma, M) - min(MinLuma, M); 162 | 163 | //如果对比度值很小,认为不需要进行抗锯齿,直接跳过抗锯齿计算 164 | if(Contrast < max(_ContrastThreshold, MaxLuma * _RelativeThreshold)) 165 | { 166 | return Origin; 167 | } 168 | NE += 1.0f / 384.0f; 169 | float2 Dir; 170 | Dir.x = -((NW + NE) - (SW + SE)); 171 | Dir.y = ((NE + SE) - (NW + SW)); 172 | Dir = normalize(Dir); 173 | 174 | #define _Scale 0.5 175 | float2 Dir1 = Dir * _MainTex_TexelSize.xy * _Scale; 176 | 177 | float4 N1 = tex2D(_MainTex, UV - Dir1); 178 | float4 P1 = tex2D(_MainTex, UV + Dir1); 179 | float4 Result = (N1 + P1) * 0.5; 180 | 181 | #define _Sharpness 8 182 | float DirAbsMinTimesC = min(abs(Dir1.x), abs(Dir1.y)) * _Sharpness; 183 | float2 Dir2 = clamp(Dir1.xy / DirAbsMinTimesC, -2.0, 2.0) * 2; 184 | float4 N2 = tex2D(_MainTex, UV - Dir2 * _MainTex_TexelSize.xy); 185 | float4 P2 = tex2D(_MainTex, UV + Dir2 * _MainTex_TexelSize.xy); 186 | float4 Result2 = Result * 0.5f + (N2 + P2) * 0.25f; 187 | // 如果新的结果,亮度在正确范围内,则使用新的结果 188 | float NewLum = Luminance(Result2); 189 | if((NewLum >= MinLuma) && (NewLum <= MaxLuma)) { 190 | Result = Result2; 191 | } 192 | return Result; 193 | } 194 | ENDCG 195 | 196 | SubShader { 197 | Cull Off 198 | ZTest Always 199 | ZWrite Off 200 | 201 | Pass { // FXAA QUALITY版本 202 | CGPROGRAM 203 | #pragma vertex VertexProgram 204 | #pragma fragment FXAAQualityFragement 205 | ENDCG 206 | } 207 | 208 | Pass { // FXAA CONSOLE版本 209 | CGPROGRAM 210 | #pragma vertex VertexProgram 211 | #pragma fragment FXAAConsoleFragement 212 | ENDCG 213 | } 214 | } 215 | } -------------------------------------------------------------------------------- /Assets/Shaders/TAA/TAA.shader: -------------------------------------------------------------------------------- 1 | Shader "TAA" 2 | { 3 | Properties { 4 | _MainTex ("Texture", 2D) = "white" {} 5 | } 6 | HLSLINCLUDE 7 | #pragma exclude_renderers gles 8 | #include "../Stdlib.hlsl" 9 | #include "../Colors.hlsl" 10 | 11 | Texture2D _MainTex; 12 | float4 _MainTex_TexelSize; 13 | Texture2D _HistoryTex; 14 | Texture2D _CameraDepthTexture; 15 | float4 _CameraDepthTexture_TexelSize; 16 | Texture2D _CameraMotionVectorsTexture; 17 | float4 _CameraMotionVectorsTexture_TexelSize; 18 | int _IgnoreHistory; 19 | 20 | SamplerState sampler_LinearClamp; 21 | SamplerState sampler_PointClamp; 22 | 23 | float2 _Jitter; 24 | 25 | struct Attributes 26 | { 27 | float3 vertex : POSITION; 28 | float2 uv : TEXCOORD0; 29 | }; 30 | 31 | struct Varyings 32 | { 33 | float4 vertex : SV_POSITION; 34 | float2 texcoord : TEXCOORD0; 35 | }; 36 | 37 | Varyings Vert(Attributes v) 38 | { 39 | Varyings o; 40 | o.vertex = mul(unity_MatrixVP, mul(unity_ObjectToWorld, float4(v.vertex, 1.0))); 41 | o.texcoord = v.uv; 42 | return o; 43 | } 44 | 45 | ENDHLSL 46 | 47 | SubShader 48 | { 49 | Cull Off ZWrite Off ZTest Always 50 | 51 | Pass 52 | { 53 | HLSLPROGRAM 54 | 55 | static const int2 kOffsets3x3[9] = 56 | { 57 | int2(-1, -1), 58 | int2( 0, -1), 59 | int2( 1, -1), 60 | int2(-1, 0), 61 | int2( 0, 0), 62 | int2( 1, 0), 63 | int2(-1, 1), 64 | int2( 0, 1), 65 | int2( 1, 1), 66 | }; 67 | float2 GetClosestFragment(float2 uv) 68 | { 69 | float2 k = _CameraDepthTexture_TexelSize.xy; 70 | const float4 neighborhood = float4( 71 | SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_PointClamp, UnityStereoClamp(uv - k)), 72 | SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_PointClamp, UnityStereoClamp(uv + float2(k.x, -k.y))), 73 | SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_PointClamp, UnityStereoClamp(uv + float2(-k.x, k.y))), 74 | SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_PointClamp, UnityStereoClamp(uv + k)) 75 | ); 76 | #if UNITY_REVERSED_Z 77 | #define COMPARE_DEPTH(a, b) step(b, a) 78 | #else 79 | #define COMPARE_DEPTH(a, b) step(a, b) 80 | #endif 81 | float3 result = float3(0.0, 0.0, SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_PointClamp, uv)); 82 | result = lerp(result, float3(-1.0, -1.0, neighborhood.x), COMPARE_DEPTH(neighborhood.x, result.z)); 83 | result = lerp(result, float3( 1.0, -1.0, neighborhood.y), COMPARE_DEPTH(neighborhood.y, result.z)); 84 | result = lerp(result, float3(-1.0, 1.0, neighborhood.z), COMPARE_DEPTH(neighborhood.z, result.z)); 85 | result = lerp(result, float3( 1.0, 1.0, neighborhood.w), COMPARE_DEPTH(neighborhood.w, result.z)); 86 | return (uv + result.xy * k); 87 | } 88 | 89 | float3 RGBToYCoCg( float3 RGB ) 90 | { 91 | float Y = dot( RGB, float3( 1, 2, 1 ) ); 92 | float Co = dot( RGB, float3( 2, 0, -2 ) ); 93 | float Cg = dot( RGB, float3( -1, 2, -1 ) ); 94 | 95 | float3 YCoCg = float3( Y, Co, Cg ); 96 | return YCoCg; 97 | } 98 | 99 | float3 YCoCgToRGB( float3 YCoCg ) 100 | { 101 | float Y = YCoCg.x * 0.25; 102 | float Co = YCoCg.y * 0.25; 103 | float Cg = YCoCg.z * 0.25; 104 | 105 | float R = Y + Co - Cg; 106 | float G = Y + Cg; 107 | float B = Y - Co - Cg; 108 | 109 | float3 RGB = float3( R, G, B ); 110 | return RGB; 111 | } 112 | 113 | 114 | float3 ClipHistory(float3 History, float3 BoxMin, float3 BoxMax) 115 | { 116 | float3 Filtered = (BoxMin + BoxMax) * 0.5f; 117 | float3 RayOrigin = History; 118 | float3 RayDir = Filtered - History; 119 | RayDir = abs( RayDir ) < (1.0/65536.0) ? (1.0/65536.0) : RayDir; 120 | float3 InvRayDir = rcp( RayDir ); 121 | 122 | float3 MinIntersect = (BoxMin - RayOrigin) * InvRayDir; 123 | float3 MaxIntersect = (BoxMax - RayOrigin) * InvRayDir; 124 | float3 EnterIntersect = min( MinIntersect, MaxIntersect ); 125 | float ClipBlend = max( EnterIntersect.x, max(EnterIntersect.y, EnterIntersect.z )); 126 | ClipBlend = saturate(ClipBlend); 127 | return lerp(History, Filtered, ClipBlend); 128 | } 129 | 130 | float4 Frag(Varyings i) : SV_Target 131 | { 132 | float2 uv = i.texcoord - _Jitter; 133 | float4 Color = _MainTex.Sample(sampler_LinearClamp, uv); 134 | //当没有上帧的历史数据,就直接使用当前帧的数据 135 | if(_IgnoreHistory) 136 | { 137 | return Color; 138 | } 139 | 140 | //因为镜头的移动会导致物体被遮挡关系变化,这步的目的是选择出周围距离镜头最近的点 141 | float2 closest = GetClosestFragment(i.texcoord); 142 | 143 | //得到在屏幕空间中,和上帧相比UV偏移的距离 144 | float2 Motion = SAMPLE_TEXTURE2D(_CameraMotionVectorsTexture, sampler_LinearClamp, closest).xy; 145 | 146 | float2 HistoryUV = i.texcoord - Motion; 147 | float4 HistoryColor = _HistoryTex.Sample(sampler_LinearClamp, HistoryUV); 148 | 149 | // 在 YCoCg色彩空间中进行Clip判断 150 | float3 AABBMin, AABBMax; 151 | AABBMax = AABBMin = RGBToYCoCg(Color); 152 | for(int k = 0; k < 9; k++) 153 | { 154 | float3 C = RGBToYCoCg(_MainTex.Sample(sampler_PointClamp, uv, kOffsets3x3[k])); 155 | AABBMin = min(AABBMin, C); 156 | AABBMax = max(AABBMax, C); 157 | } 158 | float3 HistoryYCoCg = RGBToYCoCg(HistoryColor); 159 | //根据AABB包围盒进行Clip计算: 160 | HistoryColor.rgb = YCoCgToRGB(ClipHistory(HistoryYCoCg, AABBMin, AABBMax)); 161 | // Clamp计算 162 | // HistoryColor.rgb = YCoCgToRGB(clamp(HistoryYCoCg, AABBMin, AABBMax)); 163 | 164 | //跟随速度变化混合系数 165 | float BlendFactor = saturate(0.05 + length(Motion) * 1000); 166 | 167 | if(HistoryUV.x < 0 || HistoryUV.y < 0 || HistoryUV.x > 1.0f || HistoryUV.y > 1.0f) 168 | { 169 | BlendFactor = 1.0f; 170 | } 171 | return lerp(HistoryColor, Color, BlendFactor); 172 | } 173 | #pragma vertex Vert 174 | #pragma fragment Frag 175 | 176 | ENDHLSL 177 | } 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /Assets/Shaders/StdLib.hlsl: -------------------------------------------------------------------------------- 1 | // Because this framework is supposed to work with the legacy render pipelines AND scriptable render 2 | // pipelines we can't use Unity's shader libraries (some scriptable pipelines come with their own 3 | // shader lib). So here goes a minimal shader lib only used for post-processing to ensure good 4 | // compatibility with all pipelines. 5 | 6 | #ifndef UNITY_POSTFX_STDLIB 7 | #define UNITY_POSTFX_STDLIB 8 | 9 | // ----------------------------------------------------------------------------- 10 | // API macros 11 | 12 | #if defined(SHADER_API_PSSL) 13 | #include "API/PSSL.hlsl" 14 | #elif defined(SHADER_API_XBOXONE) || defined (SHADER_API_GAMECORE) 15 | #include "API/XboxOne.hlsl" 16 | #elif defined(SHADER_API_D3D11) 17 | #include "API/D3D11.hlsl" 18 | #elif defined(SHADER_API_D3D12) 19 | #include "API/D3D12.hlsl" 20 | #elif defined(SHADER_API_D3D9) || defined(SHADER_API_D3D11_9X) 21 | #include "API/D3D9.hlsl" 22 | #elif defined(SHADER_API_VULKAN) 23 | #include "API/Vulkan.hlsl" 24 | #elif defined(SHADER_API_SWITCH) 25 | #include "API/Switch.hlsl" 26 | #elif defined(SHADER_API_METAL) 27 | #include "API/Metal.hlsl" 28 | #elif defined(SHADER_API_PSP2) 29 | #include "API/PSP2.hlsl" 30 | #else 31 | #include "API/OpenGL.hlsl" 32 | #endif 33 | 34 | #if defined(SHADER_API_PSSL) || defined(SHADER_API_XBOXONE) || defined(SHADER_API_SWITCH) || defined(SHADER_API_PSP2) 35 | #define SHADER_API_CONSOLE 36 | #endif 37 | 38 | // ----------------------------------------------------------------------------- 39 | // Constants 40 | 41 | #define HALF_MAX 65504.0 // (2 - 2^-10) * 2^15 42 | #define HALF_MAX_MINUS1 65472.0 // (2 - 2^-9) * 2^15 43 | #define EPSILON 1.0e-4 44 | #define PI 3.14159265359 45 | #define TWO_PI 6.28318530718 46 | #define FOUR_PI 12.56637061436 47 | #define INV_PI 0.31830988618 48 | #define INV_TWO_PI 0.15915494309 49 | #define INV_FOUR_PI 0.07957747155 50 | #define HALF_PI 1.57079632679 51 | #define INV_HALF_PI 0.636619772367 52 | 53 | #define FLT_EPSILON 1.192092896e-07 // Smallest positive number, such that 1.0 + FLT_EPSILON != 1.0 54 | #define FLT_MIN 1.175494351e-38 // Minimum representable positive floating-point number 55 | #define FLT_MAX 3.402823466e+38 // Maximum representable floating-point number 56 | 57 | // ----------------------------------------------------------------------------- 58 | // Compatibility functions 59 | 60 | #if (SHADER_TARGET < 50 && !defined(SHADER_API_PSSL)) 61 | float rcp(float value) 62 | { 63 | return 1.0 / value; 64 | } 65 | #endif 66 | 67 | #if defined(SHADER_API_GLES) 68 | #define mad(a, b, c) (a * b + c) 69 | #endif 70 | 71 | #ifndef INTRINSIC_MINMAX3 72 | float Min3(float a, float b, float c) 73 | { 74 | return min(min(a, b), c); 75 | } 76 | 77 | float2 Min3(float2 a, float2 b, float2 c) 78 | { 79 | return min(min(a, b), c); 80 | } 81 | 82 | float3 Min3(float3 a, float3 b, float3 c) 83 | { 84 | return min(min(a, b), c); 85 | } 86 | 87 | float4 Min3(float4 a, float4 b, float4 c) 88 | { 89 | return min(min(a, b), c); 90 | } 91 | 92 | float Max3(float a, float b, float c) 93 | { 94 | return max(max(a, b), c); 95 | } 96 | 97 | float2 Max3(float2 a, float2 b, float2 c) 98 | { 99 | return max(max(a, b), c); 100 | } 101 | 102 | float3 Max3(float3 a, float3 b, float3 c) 103 | { 104 | return max(max(a, b), c); 105 | } 106 | 107 | float4 Max3(float4 a, float4 b, float4 c) 108 | { 109 | return max(max(a, b), c); 110 | } 111 | #endif // INTRINSIC_MINMAX3 112 | 113 | // https://twitter.com/SebAaltonen/status/878250919879639040 114 | // madd_sat + madd 115 | float FastSign(float x) 116 | { 117 | return saturate(x * FLT_MAX + 0.5) * 2.0 - 1.0; 118 | } 119 | 120 | float2 FastSign(float2 x) 121 | { 122 | return saturate(x * FLT_MAX + 0.5) * 2.0 - 1.0; 123 | } 124 | 125 | float3 FastSign(float3 x) 126 | { 127 | return saturate(x * FLT_MAX + 0.5) * 2.0 - 1.0; 128 | } 129 | 130 | float4 FastSign(float4 x) 131 | { 132 | return saturate(x * FLT_MAX + 0.5) * 2.0 - 1.0; 133 | } 134 | 135 | // Using pow often result to a warning like this 136 | // "pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them" 137 | // PositivePow remove this warning when you know the value is positive and avoid inf/NAN. 138 | float PositivePow(float base, float power) 139 | { 140 | return pow(max(abs(base), float(FLT_EPSILON)), power); 141 | } 142 | 143 | float2 PositivePow(float2 base, float2 power) 144 | { 145 | return pow(max(abs(base), float2(FLT_EPSILON, FLT_EPSILON)), power); 146 | } 147 | 148 | float3 PositivePow(float3 base, float3 power) 149 | { 150 | return pow(max(abs(base), float3(FLT_EPSILON, FLT_EPSILON, FLT_EPSILON)), power); 151 | } 152 | 153 | float4 PositivePow(float4 base, float4 power) 154 | { 155 | return pow(max(abs(base), float4(FLT_EPSILON, FLT_EPSILON, FLT_EPSILON, FLT_EPSILON)), power); 156 | } 157 | 158 | // NaN checker 159 | // /Gic isn't enabled on fxc so we can't rely on isnan() anymore 160 | bool IsNan(float x) 161 | { 162 | // For some reason the following tests outputs "internal compiler error" randomly on desktop 163 | // so we'll use a safer but slightly slower version instead :/ 164 | //return (x <= 0.0 || 0.0 <= x) ? false : true; 165 | return (x < 0.0 || x > 0.0 || x == 0.0) ? false : true; 166 | } 167 | 168 | bool AnyIsNan(float2 x) 169 | { 170 | return IsNan(x.x) || IsNan(x.y); 171 | } 172 | 173 | bool AnyIsNan(float3 x) 174 | { 175 | return IsNan(x.x) || IsNan(x.y) || IsNan(x.z); 176 | } 177 | 178 | bool AnyIsNan(float4 x) 179 | { 180 | return IsNan(x.x) || IsNan(x.y) || IsNan(x.z) || IsNan(x.w); 181 | } 182 | 183 | // ----------------------------------------------------------------------------- 184 | // Std unity data 185 | 186 | float4x4 unity_CameraProjection; 187 | float4x4 unity_MatrixVP; 188 | float4x4 unity_ObjectToWorld; 189 | float4x4 unity_WorldToCamera; 190 | float3 _WorldSpaceCameraPos; 191 | float4 _ProjectionParams; // x: 1 (-1 flipped), y: near, z: far, w: 1/far 192 | float4 unity_ColorSpaceLuminance; 193 | float4 unity_DeltaTime; // x: dt, y: 1/dt, z: smoothDt, w: 1/smoothDt 194 | float4 unity_OrthoParams; // x: width, y: height, z: unused, w: ortho ? 1 : 0 195 | float4 _ZBufferParams; // x: 1-far/near, y: far/near, z: x/far, w: y/far 196 | float4 _ScreenParams; // x: width, y: height, z: 1+1/width, w: 1+1/height 197 | float4 _Time; // x: t/20, y: t, z: t*2, w: t*3 198 | float4 _SinTime; // x: sin(t/20), y: sin(t), z: sin(t*2), w: sin(t*3) 199 | float4 _CosTime; // x: cos(t/20), y: cos(t), z: cos(t*2), w: cos(t*3) 200 | 201 | // ----------------------------------------------------------------------------- 202 | // Std functions 203 | 204 | // Z buffer depth to linear 0-1 depth 205 | // Handles orthographic projection correctly 206 | float Linear01Depth(float z) 207 | { 208 | float isOrtho = unity_OrthoParams.w; 209 | float isPers = 1.0 - unity_OrthoParams.w; 210 | z *= _ZBufferParams.x; 211 | return (1.0 - isOrtho * z) / (isPers * z + _ZBufferParams.y); 212 | } 213 | 214 | float LinearEyeDepth(float z) 215 | { 216 | return rcp(_ZBufferParams.z * z + _ZBufferParams.w); 217 | } 218 | 219 | // Clamp HDR value within a safe range 220 | half3 SafeHDR(half3 c) 221 | { 222 | return min(c, HALF_MAX); 223 | } 224 | 225 | half4 SafeHDR(half4 c) 226 | { 227 | return min(c, HALF_MAX); 228 | } 229 | 230 | // Decode normals stored in _CameraDepthNormalsTexture 231 | float3 DecodeViewNormalStereo(float4 enc4) 232 | { 233 | float kScale = 1.7777; 234 | float3 nn = enc4.xyz * float3(2.0 * kScale, 2.0 * kScale, 0) + float3(-kScale, -kScale, 1); 235 | float g = 2.0 / dot(nn.xyz, nn.xyz); 236 | float3 n; 237 | n.xy = g * nn.xy; 238 | n.z = g - 1.0; 239 | return n; 240 | } 241 | 242 | // Interleaved gradient function from Jimenez 2014 243 | // http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare 244 | float GradientNoise(float2 uv) 245 | { 246 | uv = floor(uv * _ScreenParams.xy); 247 | float f = dot(float2(0.06711056, 0.00583715), uv); 248 | return frac(52.9829189 * frac(f)); 249 | } 250 | 251 | // Vertex manipulation 252 | float2 TransformTriangleVertexToUV(float2 vertex) 253 | { 254 | float2 uv = (vertex + 1.0) * 0.5; 255 | return uv; 256 | } 257 | 258 | #include "xRLib.hlsl" 259 | 260 | // ----------------------------------------------------------------------------- 261 | // Default vertex shaders 262 | 263 | struct AttributesDefault 264 | { 265 | float3 vertex : POSITION; 266 | }; 267 | 268 | struct VaryingsDefault 269 | { 270 | float4 vertex : SV_POSITION; 271 | float2 texcoord : TEXCOORD0; 272 | float2 texcoordStereo : TEXCOORD1; 273 | #if STEREO_INSTANCING_ENABLED 274 | uint stereoTargetEyeIndex : SV_RenderTargetArrayIndex; 275 | #endif 276 | }; 277 | 278 | #if STEREO_INSTANCING_ENABLED 279 | float _DepthSlice; 280 | #endif 281 | 282 | VaryingsDefault VertDefault(AttributesDefault v) 283 | { 284 | VaryingsDefault o; 285 | o.vertex = float4(v.vertex.xy, 0.0, 1.0); 286 | o.texcoord = TransformTriangleVertexToUV(v.vertex.xy); 287 | 288 | #if UNITY_UV_STARTS_AT_TOP 289 | o.texcoord = o.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0); 290 | #endif 291 | 292 | o.texcoordStereo = TransformStereoScreenSpaceTex(o.texcoord, 1.0); 293 | 294 | return o; 295 | } 296 | 297 | float4 _UVTransform; // xy: scale, wz: translate 298 | 299 | #if STEREO_DOUBLEWIDE_TARGET 300 | float4 _PosScaleOffset; // xy: scale, wz: offset 301 | #endif 302 | 303 | VaryingsDefault VertUVTransform(AttributesDefault v) 304 | { 305 | VaryingsDefault o; 306 | 307 | #if STEREO_DOUBLEWIDE_TARGET 308 | o.vertex = float4(v.vertex.xy * _PosScaleOffset.xy + _PosScaleOffset.zw, 0.0, 1.0); 309 | #else 310 | o.vertex = float4(v.vertex.xy, 0.0, 1.0); 311 | #endif 312 | o.texcoord = TransformTriangleVertexToUV(v.vertex.xy) * _UVTransform.xy + _UVTransform.zw; 313 | o.texcoordStereo = TransformStereoScreenSpaceTex(o.texcoord, 1.0); 314 | #if STEREO_INSTANCING_ENABLED 315 | o.stereoTargetEyeIndex = (uint)_DepthSlice; 316 | #endif 317 | return o; 318 | } 319 | 320 | #define TRANSFORM_TEX(tex,name) (tex.xy * name##_ST.xy + name##_ST.zw) 321 | 322 | #endif // UNITY_POSTFX_STDLIB 323 | --------------------------------------------------------------------------------