├── README.md ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── XRSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── EditorBuildSettings.asset ├── TagManager.asset ├── EditorSettings.asset ├── UnityConnectSettings.asset ├── DynamicsManager.asset ├── Physics2DSettings.asset ├── ProBuilderSettings.json ├── NavMeshAreas.asset ├── QualitySettings.asset ├── GraphicsSettings.asset ├── InputManager.asset └── ProjectSettings.asset ├── Assets ├── Scripts.meta ├── Shaders.meta ├── Resources.meta ├── Resources │ ├── Eigen.compute.meta │ ├── ColorSpace.compute.meta │ ├── DDABlur.compute.meta │ ├── EdgeLIC.compute.meta │ ├── GrayScale.compute.meta │ ├── Histogram.compute.meta │ ├── LICBlur.compute.meta │ ├── Statistics.compute.meta │ ├── ColorTransfer.compute.meta │ ├── GaussianBlur.compute.meta │ ├── StructureTensor.compute.meta │ ├── Utility.hlsl.meta │ ├── GrayScale.compute │ ├── ColorSpace.compute │ ├── Histogram.compute │ ├── Eigen.compute │ ├── DDABlur.compute │ ├── ColorTransfer.compute │ ├── GaussianBlur.compute │ ├── LICBlur.compute │ ├── EdgeLIC.compute │ ├── StructureTensor.compute │ ├── Statistics.compute │ └── Utility.hlsl └── Scripts │ ├── LICBlur.cs.meta │ ├── ColorTransfer.cs.meta │ ├── StylizedEdge.cs.meta │ ├── StylizedEdge.cs │ ├── ColorTransfer.cs │ └── LICBlur.cs ├── Logs └── Packages-Update.log ├── .gitignore ├── LICENSE └── Packages └── manifest.json /README.md: -------------------------------------------------------------------------------- 1 | # PostProcessingLib 2 | I will put some interesting post processing effect here. 3 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.2.8f1 2 | m_EditorVersionWithRevision: 2019.2.8f1 (ff5b465c8d13) 3 | -------------------------------------------------------------------------------- /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/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78f44984b63747c4f9d5d56a6e8a9c16 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76abdf89817da8d44a6e9bca2bcaae8f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 118497b2bf3eeb041bb8ebbbe96454a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/Resources/Eigen.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bfb9c8008936e343bd0887625b328f7 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/ColorSpace.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbb22e61969286b4bb9913329c146f2c 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/DDABlur.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da5743127296f86439be568bc49fffed 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/EdgeLIC.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac00fcede15f6a34fabc2a1219f1fc79 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/GrayScale.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5956a6a3f30235e4289650a8c3fecde5 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Histogram.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb958ad8deb7e23478f924899bc35062 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/LICBlur.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e68b84d8f90440489abbd2544ca9b5e 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/Statistics.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e750475c50fdc94f8a861018491138d 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/ColorTransfer.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae0b1e2e68d61e6409320848587fec39 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/GaussianBlur.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f72d1b4dac224ec4184b57f6cd7321f2 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Resources/StructureTensor.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d4d32b4ee1209548812bb028da9f9a9 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /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/Resources/Utility.hlsl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24f85d214add9bd40b3ff24b876a8bad 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scripts/LICBlur.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2196849d6922ab24589b25f9a00f2e21 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/ColorTransfer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dc87cdabc981904bae06f660316216d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/StylizedEdge.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87eb5dfa8655ce84dbbb6978e2f866c9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Logs/Packages-Update.log: -------------------------------------------------------------------------------- 1 | 2 | === Sun Nov 24 20:30:35 2019 3 | 4 | Packages were changed. 5 | Update Mode: mergeDefaultDependencies 6 | 7 | The following packages were added: 8 | com.unity.2d.sprite@1.0.0 9 | com.unity.2d.tilemap@1.0.0 10 | com.unity.cinemachine@2.3.3 11 | com.unity.google.resonance.audio@1.18.2 12 | com.unity.polybrush@1.0.0-preview.17 13 | com.unity.probuilder@4.0.5 14 | -------------------------------------------------------------------------------- /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 | m_Volume: 0.5 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 64 14 | m_SpatializerPlugin: Resonance Audio 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/3DGamekit/Scenes/Start.unity 10 | guid: 57df1e417250bc247976c2c0dc088efe 11 | - enabled: 1 12 | path: Assets/3DGamekit/Scenes/GamePlay/Level1.unity 13 | guid: ed46e53182fb08b4482fd3c4a75bc631 14 | - enabled: 1 15 | path: Assets/3DGamekit/Scenes/GamePlay/Level2.unity 16 | guid: bfc86215544d6ab42b838135fdd17f21 17 | m_configObjects: {} 18 | -------------------------------------------------------------------------------- /Assets/Resources/GrayScale.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel GrayScale 3 | 4 | // Create a RenderTexture with enableRandomWrite flag and set it 5 | // with cs.SetTexture 6 | RWTexture2D Result; 7 | Texture2D Source; 8 | 9 | [numthreads(1,1,1)] 10 | void GrayScale (uint3 id : SV_DispatchThreadID) 11 | { 12 | // TODO: insert actual code here! 13 | 14 | float4 sourceColor = Source[id.xy]; 15 | float grayScale = sourceColor.r*0.299 + sourceColor.g*0.587 + sourceColor.b*0.114; 16 | Result[id.xy] = float4(grayScale,grayScale,grayScale,1); 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Resources/ColorSpace.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel RgbToLab 3 | #pragma kernel LabToRgb 4 | 5 | #include "Utility.hlsl" 6 | // Create a RenderTexture with enableRandomWrite flag and set it 7 | // with cs.SetTexture 8 | RWTexture2D Result; 9 | Texture2D Source; 10 | float Strength; 11 | [numthreads(1,1,1)] 12 | void RgbToLab (uint3 id : SV_DispatchThreadID) 13 | { 14 | Result[id.xy] = float4(AKRgbToLab(Source[id.xy].xyz,Strength),1); 15 | } 16 | 17 | [numthreads(1,1,1)] 18 | void LabToRgb (uint3 id : SV_DispatchThreadID) 19 | { 20 | Result[id.xy] = float4(AKLabToRgb(Source[id.xy].xyz,Strength),1); 21 | } -------------------------------------------------------------------------------- /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 | - FlythroughCam 8 | layers: 9 | - Default 10 | - TransparentFX 11 | - Ignore Raycast 12 | - 13 | - Water 14 | - UI 15 | - 16 | - 17 | - Skybox 18 | - Player 19 | - PostProcessing 20 | - SetDressing 21 | - 22 | - 23 | - Vehicles 24 | - Navmesh 25 | - Environment 26 | - Characters 27 | - Vegetation 28 | - Effects 29 | - Ragdoll 30 | - WaterGeometry 31 | - Terrain 32 | - Enemy 33 | - Cameras 34 | - Props 35 | - Avoid 36 | - CameraCollider 37 | - Collider 38 | - Checkpoint 39 | - DoNotDraw 40 | - Level 41 | m_SortingLayers: 42 | - name: Default 43 | uniqueID: 0 44 | locked: 0 45 | -------------------------------------------------------------------------------- /Assets/Resources/Histogram.compute: -------------------------------------------------------------------------------- 1 | #pragma kernel HistogramInitialize 2 | #pragma kernel HistogramMain 3 | 4 | Texture2D InputTexture; // input texture 5 | 6 | struct histStruct { 7 | uint4 color; 8 | }; 9 | RWStructuredBuffer HistogramBuffer; 10 | 11 | [numthreads(64,1,1)] 12 | void HistogramInitialize(uint3 id : SV_DispatchThreadID) 13 | { 14 | HistogramBuffer[id.x].color = uint4(0, 0, 0, 0); 15 | } 16 | 17 | [numthreads(8,8,1)] 18 | void HistogramMain (uint3 id : SV_DispatchThreadID) 19 | { 20 | uint4 col = uint4(255.0 * InputTexture[id.xy]); 21 | 22 | InterlockedAdd(HistogramBuffer[col.r].color.r, 1); 23 | InterlockedAdd(HistogramBuffer[col.g].color.g, 1); 24 | InterlockedAdd(HistogramBuffer[col.b].color.b, 1); 25 | InterlockedAdd(HistogramBuffer[col.a].color.a, 1); 26 | } -------------------------------------------------------------------------------- /Assets/Resources/Eigen.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel Eigen 3 | #include "Utility.hlsl" 4 | // Create a RenderTexture with enableRandomWrite flag and set it 5 | // with cs.SetTexture 6 | RWTexture2D Result; 7 | Texture2D Source; 8 | 9 | 10 | [numthreads(1,1,1)] 11 | void Eigen (uint3 id : SV_DispatchThreadID) 12 | { 13 | float2 majorEigenvector,minorEigenvector; 14 | float majorEigenValue,minorEigenValue; 15 | StructureTensorToEigen(Source[id.xy].xyz,majorEigenvector,minorEigenvector,majorEigenValue,minorEigenValue); 16 | //float integrationScale = (majorEigenValue - minorEigenValue) /(majorEigenValue + minorEigenValue); 17 | float edge = Source[id.xy].x + Source[id.xy].z; 18 | Result[id.xy] = float4(normalize(minorEigenvector),minorEigenValue,edge); 19 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | [Bb]uilds/ 6 | Assets/AssetStoreTools* 7 | 8 | # Visual Studio cache directory 9 | .vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | *.opendb 26 | 27 | # Unity3D generated meta files 28 | *.pidb.meta 29 | *.pdb.meta 30 | 31 | # Unity3D Generated File On Crash Reports 32 | sysinfo.txt 33 | 34 | # Builds 35 | *.apk 36 | *.unitypackage 37 | 38 | 3DGamekit/ 39 | Gizmos/ 40 | Polybrush Data/ 41 | Scenes/ 42 | Textures/ 43 | 3DGamekit.meta 44 | 3DGameKit_Third-PartyNotice.txt 45 | 3DGameKit_Third-PartyNotice.txt.meta 46 | Gizmos.meta 47 | Polybrush Data.meta 48 | Scenes.meta 49 | Textures.meta 50 | -------------------------------------------------------------------------------- /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: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 1 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: 0 16 | m_EtcTextureFastCompressor: 2 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 5 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | -------------------------------------------------------------------------------- /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: 1 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: 1 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/Resources/DDABlur.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel DDABlur 3 | #include "Utility.hlsl" 4 | // Create a RenderTexture with enableRandomWrite flag and set it 5 | // with cs.SetTexture 6 | Texture2D Source; 7 | Texture2D VectorField; 8 | RWTexture2D Result; 9 | int Length; 10 | float sigma; 11 | int width; 12 | int height; 13 | float step; 14 | 15 | [numthreads(1,1,1)] 16 | void DDABlur (uint3 id : SV_DispatchThreadID) 17 | { 18 | float2 v = VectorField[id.xy].xy; 19 | float3 sum = Source[id.xy].rgb; 20 | float weight = 1; 21 | uint2 p,n; 22 | float2 t; 23 | uint2 bound = uint2(width,height); 24 | for(int i=1;i<=Length;i++){ 25 | t = i*v*step; 26 | p = BoundIndex(id.xy + t + float2(0.5,0.5),bound); 27 | n = BoundIndex(id.xy - t + float2(0.5,0.5),bound); 28 | float k = exp(-i*i*sigma); 29 | sum += (Source[p].rgb + Source[n].rgb)*k; 30 | weight += 2*k; 31 | } 32 | sum /= weight; 33 | Result[id.xy] = float4(sum,1); 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 alpacasking 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /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: 7 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: c8000010c8000010c8000010ffffffffc8020010c8000010ffffffffffffffffc8000010d84067b1c8000010c8000010c8000010c8000010c8029211c8000010c8029a11c842d791c8029211c8000900c840c790c8020010c8029291c840d791c842c798c8000010c8000010c8000011fffff7ffc8020010c8000010c802d211 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /Assets/Resources/ColorTransfer.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel ColorTransfer 3 | 4 | // Create a RenderTexture with enableRandomWrite flag and set it 5 | // with cs.SetTexture 6 | RWTexture2D Result; 7 | Texture2D Source; 8 | RWStructuredBuffer SrcStatisticsBuffer; 9 | RWStructuredBuffer TarStatisticsBuffer; 10 | 11 | [numthreads(1,1,1)] 12 | void ColorTransfer (uint3 id : SV_DispatchThreadID) 13 | { 14 | // TODO: insert actual code here! 15 | float3 src = Source[id.xy].xyz; 16 | float tl,ta,tb; 17 | if(SrcStatisticsBuffer[1] == 0){ 18 | tl = src.x; 19 | } 20 | else{ 21 | tl = (src.x-SrcStatisticsBuffer[0])*TarStatisticsBuffer[1]/SrcStatisticsBuffer[1] + TarStatisticsBuffer[0]; 22 | } 23 | if(SrcStatisticsBuffer[3] == 0){ 24 | ta = src.y; 25 | } 26 | else{ 27 | ta = (src.y-SrcStatisticsBuffer[2])*TarStatisticsBuffer[3]/SrcStatisticsBuffer[3] + TarStatisticsBuffer[2]; 28 | } 29 | if(SrcStatisticsBuffer[5] == 0){ 30 | tb = src.z; 31 | } 32 | else{ 33 | tb = (src.z-SrcStatisticsBuffer[4])*TarStatisticsBuffer[5]/SrcStatisticsBuffer[5] + TarStatisticsBuffer[4]; 34 | } 35 | Result[id.xy] = float4(tl,ta,tb,1); 36 | } 37 | -------------------------------------------------------------------------------- /Assets/Resources/GaussianBlur.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel GaussianBlurHorizontal 3 | #pragma kernel GaussianBlurVertical 4 | #include "Utility.hlsl" 5 | // Create a RenderTexture with enableRandomWrite flag and set it 6 | // with cs.SetTexture 7 | RWTexture2D Result; 8 | Texture2D Source; 9 | int WindowSize; 10 | float Sigma; 11 | int width; 12 | int height; 13 | 14 | [numthreads(1,1,1)] 15 | void GaussianBlurHorizontal (uint3 id : SV_DispatchThreadID) 16 | { 17 | uint2 bound = uint2(width,height); 18 | float4 sum =float4(0,0,0,0); 19 | float weightSum = 0; 20 | for(int i=-WindowSize;i<=WindowSize;i++){ 21 | float weight = exp(-Sigma*i*i); 22 | sum += Source[BoundIndex(uint2(id.x+i,id.y),bound)] * weight; 23 | weightSum += weight; 24 | } 25 | Result[id.xy] = sum/weightSum; 26 | } 27 | 28 | [numthreads(1,1,1)] 29 | void GaussianBlurVertical (uint3 id : SV_DispatchThreadID) 30 | { 31 | uint2 bound = uint2(width,height); 32 | float4 sum =float4(0,0,0,0); 33 | float weightSum = 0; 34 | for(int i=-WindowSize;i<=WindowSize;i++){ 35 | float weight = exp(-Sigma*i*i); 36 | sum += Source[BoundIndex(uint2(id.x,id.y+i),bound)] * weight; 37 | weightSum += weight; 38 | } 39 | Result[id.xy] = sum/weightSum; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /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: 3 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_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /Assets/Resources/LICBlur.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel LICEularian 3 | 4 | #include "Utility.hlsl" 5 | // Create a RenderTexture with enableRandomWrite flag and set it 6 | // with cs.SetTexture 7 | Texture2D Source; 8 | Texture2D VectorField; 9 | RWTexture2D Result; 10 | int Length; 11 | float sigma; 12 | int width; 13 | int height; 14 | float step; 15 | 16 | 17 | [numthreads(1,1,1)] 18 | void LICEularian (uint3 id : SV_DispatchThreadID) 19 | { 20 | float3 sum = Source[id.xy].rgb; 21 | float weight = 1; 22 | 23 | float k; 24 | float2 v = VectorField[id.xy].xy; 25 | float2 pt = float2(id.x+0.5,id.y+0.5) + v*step; 26 | if( v.x ==0 && v.y ==0 ){ 27 | Result[id.xy] = Source[id.xy]; 28 | return; 29 | } 30 | float2 v2; 31 | uint2 p; 32 | uint2 bound = uint2(width,height); 33 | for(int i=1;i Source; 8 | Texture2D VectorField; 9 | RWTexture2D Result; 10 | int Length; 11 | float sigma; 12 | int width; 13 | int height; 14 | float step; 15 | float edgeThreshold; 16 | 17 | [numthreads(1,1,1)] 18 | void LICEularian (uint3 id : SV_DispatchThreadID) 19 | { 20 | if( VectorField[id.xy].w < edgeThreshold ){ 21 | Result[id.xy] = float4(1,1,1,1); 22 | return; 23 | } 24 | 25 | float3 sum = Source[id.xy].rgb; 26 | float weight = 1; 27 | 28 | float k; 29 | float2 v = VectorField[id.xy].xy; 30 | float2 pt = float2(id.x+0.5,id.y+0.5) + v*step; 31 | 32 | float2 v2; 33 | uint2 p; 34 | uint2 bound = uint2(width,height); 35 | for(int i=1;i Source; 6 | RWTexture2D Result; 7 | float p; 8 | int width; 9 | int height; 10 | 11 | [numthreads(1,1,1)] 12 | void StructureTensor(uint3 id : SV_DispatchThreadID) 13 | { 14 | uint2 bound = uint2(width,height); 15 | // rotational symmetric derivative filter 16 | float s_1_1 = Source[BoundIndex(id.xy + int2( -1, -1),bound)].r; 17 | float s0_1 = Source[BoundIndex(id.xy + int2( 0, -1),bound)].r; 18 | float s1_1 = Source[BoundIndex(id.xy + int2( 1, -1),bound)].r; 19 | float s_10 = Source[BoundIndex(id.xy + int2(-1, 0),bound)].r; 20 | float s10 = Source[BoundIndex(id.xy + int2( 1, 0),bound)].r; 21 | float s_11 = Source[BoundIndex(id.xy + int2(-1, 1),bound)].r; 22 | float s01 = Source[BoundIndex(id.xy + int2( 0, 1),bound)].r; 23 | float s11 = Source[BoundIndex(id.xy + int2( 1, 1),bound)].r; 24 | 25 | float dx = (-1*s_11+1*s11-2*s_10+2*s10-1*s_1_1+1*s1_1); 26 | float dy = -(-1*s_11+1*s_1_1-2*s01+2*s0_1-1*s11+1*s1_1); 27 | 28 | //float dx = (p*s_11-p*s11+(1-2*p)*s_10+(2*p-1)*s10+p*s_1_1-p*s1_1)*0.5; 29 | //float dy = -(p*s_11-p*s_1_1+(1-2*p)*s01+(2*p-1)*s0_1+p*s11-p*s1_1)*0.5; 30 | // eigen 31 | float4 tensor = float4(dx*dx,dx*dy,dy*dy,0); 32 | 33 | Result[id.xy] = tensor; 34 | } 35 | 36 | [numthreads(1,1,1)] 37 | void JacobiRelaxation(uint3 id : SV_DispatchThreadID) 38 | { 39 | uint2 bound = uint2(width,height); 40 | float3 tensor = Source[id.xy].xyz; 41 | float s = tensor.x*tensor.x + tensor.y*tensor.y*2 + tensor.z*tensor.z; 42 | if(s > p ) return; 43 | Result[id.xy] = (Source[BoundIndex(id.xy + int2(1,0),bound)] 44 | + Source[BoundIndex(id.xy + int2(-1,0),bound)] 45 | +Source[BoundIndex(id.xy + int2(0,1),bound)] 46 | +Source[BoundIndex(id.xy + int2(0,-1),bound)])*0.25; 47 | } -------------------------------------------------------------------------------- /Assets/Resources/Statistics.compute: -------------------------------------------------------------------------------- 1 | // Each #kernel tells which function to compile; you can have many kernels 2 | #pragma kernel Sum 3 | #pragma kernel SDSum 4 | #pragma kernel AverageSum 5 | #pragma kernel AverageSDSum 6 | #define THREAD_COUNT 1 7 | #define THREAD_X 16 8 | #define THREAD_Y 16 9 | 10 | // Create a RenderTexture with enableRandomWrite flag and set it 11 | // with cs.SetTexture 12 | Texture2D Source; 13 | //SamplerState sampler_LinearClamp; 14 | RWStructuredBuffer StatisticsBuffer; 15 | int Num; 16 | [numthreads(1,1,1)] 17 | void Sum (uint3 id : SV_DispatchThreadID) 18 | { 19 | // TODO: insert actual code here! 20 | //float4 mColor = Source.SampleLevel(sampler_LinearClamp,float2(id.x/(float)THREAD_COUNT,id.y/(float)THREAD_COUNT),0); 21 | float4 mColor = Source[id.xy]; 22 | InterlockedAdd(StatisticsBuffer[0], int(mColor.x)); 23 | InterlockedAdd(StatisticsBuffer[2], int(mColor.y)); 24 | InterlockedAdd(StatisticsBuffer[4], int(mColor.z)); 25 | } 26 | 27 | [numthreads(1,1,1)] 28 | void SDSum (uint3 id : SV_DispatchThreadID) 29 | { 30 | // TODO: insert actual code here! 31 | //float4 mColor = Source.SampleLevel(sampler_LinearClamp,float2(id.x/(float)THREAD_COUNT,id.y/(float)THREAD_COUNT),0); 32 | float4 mColor = Source[id.xy]; 33 | InterlockedAdd(StatisticsBuffer[1],int(pow(mColor.x-StatisticsBuffer[0],2))); 34 | InterlockedAdd(StatisticsBuffer[3],int(pow(mColor.y-StatisticsBuffer[2],2))); 35 | InterlockedAdd(StatisticsBuffer[5],int(pow(mColor.z-StatisticsBuffer[4],2))); 36 | } 37 | 38 | 39 | [numthreads(1,1,1)] 40 | void AverageSum (uint3 id : SV_DispatchThreadID) 41 | { 42 | // TODO: insert actual code here! 43 | StatisticsBuffer[0] /= Num; 44 | StatisticsBuffer[2] /= Num; 45 | StatisticsBuffer[4] /= Num; 46 | } 47 | 48 | [numthreads(1,1,1)] 49 | void AverageSDSum (uint3 id : SV_DispatchThreadID) 50 | { 51 | // TODO: insert actual code here! 52 | StatisticsBuffer[1] = sqrt(StatisticsBuffer[1]/Num); 53 | StatisticsBuffer[3] = sqrt(StatisticsBuffer[3]/Num); 54 | StatisticsBuffer[5] = sqrt(StatisticsBuffer[5]/Num); 55 | } -------------------------------------------------------------------------------- /Assets/Resources/Utility.hlsl: -------------------------------------------------------------------------------- 1 | 2 | float3 AKRgbToLab (float3 rgb,float strength) 3 | { 4 | float L = 0.3811*rgb.r + 0.5783*rgb.g + 0.0402*rgb.b; 5 | float M = 0.1967*rgb.r + 0.7244*rgb.g + 0.0782*rgb.b; 6 | float S = 0.0241*rgb.r + 0.1288*rgb.g + 0.8444*rgb.b; 7 | 8 | //若RGB值均为0,则LMS为0,防止数学错误log0 9 | if(L!=0) L = log(L)/log(10); 10 | if(M!=0) M = log(M)/log(10); 11 | if(S!=0) S = log(S)/log(10); 12 | 13 | float l = (L + M + S)/sqrt(3); 14 | float a = (L + M - 2*S)/sqrt(6); 15 | float b = (L - M)/sqrt(2); 16 | 17 | return float3(l*strength,a*strength,b*strength); 18 | } 19 | 20 | float3 AKLabToRgb (float3 lab,float strength) 21 | { 22 | if(lab.x ==0){ 23 | return float3(0,0,0); 24 | } 25 | float l = lab.x/strength/sqrt(3); 26 | float a = lab.y/strength/sqrt(6); 27 | float b = lab.z/strength/sqrt(2); 28 | float L = l + a + b; 29 | float M = l + a - b; 30 | float S = l - 2*a; 31 | 32 | L = pow(10,L); 33 | M = pow(10,M); 34 | S = pow(10,S); 35 | 36 | float R = saturate(4.4679*L - 3.5873*M + 0.1193*S); 37 | float G = saturate(-1.2186*L + 2.3809*M - 0.1624*S); 38 | float B = saturate(0.0497*L - 0.2439*M + 1.2045*S); 39 | 40 | return float3(R,G,B); 41 | } 42 | 43 | float RgbToGrayScale (float3 rgb) 44 | { 45 | float grayScale = rgb.r*0.299 + rgb.g*0.587 + rgb.b*0.114; 46 | return grayScale; 47 | } 48 | 49 | // return eigenvectors and eigenvalues 50 | void StructureTensorToEigen(float3 structureTensor,out float2 majorEigenvector,out float2 minorEigenvector,out float majorEigenValue,out float minorEigenValue ) 51 | { 52 | float t1 = structureTensor.x + structureTensor.z; 53 | float t2 = sqrt(pow(structureTensor.x - structureTensor.z,2)+4*pow(structureTensor.y,2)); 54 | majorEigenValue = (t1 + t2)/2; 55 | minorEigenValue = (t1 - t2)/2; 56 | majorEigenvector = float2(structureTensor.y,majorEigenValue-structureTensor.x); 57 | minorEigenvector = float2(majorEigenValue-structureTensor.x,-structureTensor.y); 58 | } 59 | 60 | uint2 BoundIndex(uint2 i,uint2 bound){ 61 | return uint2(clamp(i.x,0,bound.x),clamp(i.y,0,bound.y)); 62 | } 63 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.cinemachine": "2.3.3", 6 | "com.unity.collab-proxy": "1.2.16", 7 | "com.unity.ext.nunit": "1.0.0", 8 | "com.unity.google.resonance.audio": "1.18.2", 9 | "com.unity.ide.rider": "1.1.0", 10 | "com.unity.ide.vscode": "1.1.2", 11 | "com.unity.package-manager-ui": "2.2.0", 12 | "com.unity.postprocessing": "2.1.7", 13 | "com.unity.test-framework": "1.0.13", 14 | "com.unity.textmeshpro": "2.0.1", 15 | "com.unity.timeline": "1.1.0", 16 | "com.unity.ugui": "1.0.0", 17 | "com.unity.modules.ai": "1.0.0", 18 | "com.unity.modules.androidjni": "1.0.0", 19 | "com.unity.modules.animation": "1.0.0", 20 | "com.unity.modules.assetbundle": "1.0.0", 21 | "com.unity.modules.audio": "1.0.0", 22 | "com.unity.modules.cloth": "1.0.0", 23 | "com.unity.modules.director": "1.0.0", 24 | "com.unity.modules.imageconversion": "1.0.0", 25 | "com.unity.modules.imgui": "1.0.0", 26 | "com.unity.modules.jsonserialize": "1.0.0", 27 | "com.unity.modules.particlesystem": "1.0.0", 28 | "com.unity.modules.physics": "1.0.0", 29 | "com.unity.modules.physics2d": "1.0.0", 30 | "com.unity.modules.screencapture": "1.0.0", 31 | "com.unity.modules.terrain": "1.0.0", 32 | "com.unity.modules.terrainphysics": "1.0.0", 33 | "com.unity.modules.tilemap": "1.0.0", 34 | "com.unity.modules.ui": "1.0.0", 35 | "com.unity.modules.uielements": "1.0.0", 36 | "com.unity.modules.umbra": "1.0.0", 37 | "com.unity.modules.unityanalytics": "1.0.0", 38 | "com.unity.modules.unitywebrequest": "1.0.0", 39 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 40 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 41 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 42 | "com.unity.modules.unitywebrequestwww": "1.0.0", 43 | "com.unity.modules.vehicles": "1.0.0", 44 | "com.unity.modules.video": "1.0.0", 45 | "com.unity.modules.vr": "1.0.0", 46 | "com.unity.modules.wind": "1.0.0", 47 | "com.unity.modules.xr": "1.0.0" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /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: -1372625422 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 | - serializedVersion: 2 91 | agentTypeID: -1372625422 92 | agentRadius: 0.5 93 | agentHeight: 1 94 | agentSlope: 45 95 | agentClimb: 0.6 96 | ledgeDropHeight: 0 97 | maxJumpAcrossDistance: 0 98 | minRegionArea: 2 99 | manualCellSize: 0 100 | cellSize: 0.16666667 101 | manualTileSize: 0 102 | tileSize: 256 103 | accuratePlacement: 0 104 | debug: 105 | m_Flags: 0 106 | m_SettingNames: 107 | - Humanoid 108 | - Chomper 109 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 2 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Performance 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 | skinWeights: 1 22 | textureQuality: 2 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.2 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: 4 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Balanced 46 | pixelLightCount: 1 47 | shadows: 1 48 | shadowResolution: 1 49 | shadowProjection: 1 50 | shadowCascades: 2 51 | shadowDistance: 30 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | skinWeights: 2 57 | textureQuality: 1 58 | anisotropicTextures: 1 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.5 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 64 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 4 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Fantastic 81 | pixelLightCount: 4 82 | shadows: 2 83 | shadowResolution: 3 84 | shadowProjection: 1 85 | shadowCascades: 4 86 | shadowDistance: 150 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | skinWeights: 4 92 | textureQuality: 0 93 | anisotropicTextures: 2 94 | antiAliasing: 0 95 | softParticles: 1 96 | softVegetation: 1 97 | realtimeReflectionProbes: 1 98 | billboardsFaceCameraPosition: 1 99 | vSyncCount: 0 100 | lodBias: 1 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 4096 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 4 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | m_PerPlatformDefaultQuality: 115 | Standalone: 1 116 | WebGL: 0 117 | -------------------------------------------------------------------------------- /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: 2 15 | m_Shader: {fileID: 4800000, guid: c133f7c09f64ab447b8e96d17ad7cac6, type: 3} 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: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: 50 | - serializedVersion: 5 51 | m_BuildTarget: 1 52 | m_Tier: 1 53 | m_Settings: 54 | standardShaderQuality: 2 55 | renderingPath: 3 56 | hdrMode: 1 57 | realtimeGICPUUsage: 25 58 | useReflectionProbeBoxProjection: 1 59 | useReflectionProbeBlending: 1 60 | useHDR: 1 61 | useDetailNormalMap: 1 62 | useCascadedShadowMaps: 1 63 | prefer32BitShadowMaps: 0 64 | enableLPPV: 1 65 | useDitherMaskForAlphaBlendedShadows: 1 66 | m_Automatic: 0 67 | - serializedVersion: 5 68 | m_BuildTarget: 1 69 | m_Tier: 0 70 | m_Settings: 71 | standardShaderQuality: 2 72 | renderingPath: 3 73 | hdrMode: 1 74 | realtimeGICPUUsage: 25 75 | useReflectionProbeBoxProjection: 1 76 | useReflectionProbeBlending: 1 77 | useHDR: 1 78 | useDetailNormalMap: 1 79 | useCascadedShadowMaps: 1 80 | prefer32BitShadowMaps: 0 81 | enableLPPV: 0 82 | useDitherMaskForAlphaBlendedShadows: 1 83 | m_Automatic: 0 84 | - serializedVersion: 5 85 | m_BuildTarget: 1 86 | m_Tier: 2 87 | m_Settings: 88 | standardShaderQuality: 2 89 | renderingPath: 3 90 | hdrMode: 1 91 | realtimeGICPUUsage: 50 92 | useReflectionProbeBoxProjection: 1 93 | useReflectionProbeBlending: 1 94 | useHDR: 1 95 | useDetailNormalMap: 1 96 | useCascadedShadowMaps: 1 97 | prefer32BitShadowMaps: 0 98 | enableLPPV: 1 99 | useDitherMaskForAlphaBlendedShadows: 1 100 | m_Automatic: 0 101 | m_LightmapStripping: 0 102 | m_FogStripping: 0 103 | m_InstancingStripping: 0 104 | m_LightmapKeepPlain: 1 105 | m_LightmapKeepDirCombined: 1 106 | m_LightmapKeepDynamicPlain: 1 107 | m_LightmapKeepDynamicDirCombined: 1 108 | m_LightmapKeepShadowMask: 1 109 | m_LightmapKeepSubtractive: 1 110 | m_FogKeepLinear: 1 111 | m_FogKeepExp: 1 112 | m_FogKeepExp2: 1 113 | m_AlbedoSwatchInfos: [] 114 | m_LightsUseLinearIntensity: 1 115 | m_LightsUseColorTemperature: 1 116 | -------------------------------------------------------------------------------- /Assets/Scripts/StylizedEdge.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Rendering.PostProcessing; 4 | using UnityEngine.Rendering; 5 | using System.Runtime.InteropServices; 6 | 7 | namespace AlpacasKing 8 | { 9 | 10 | [Serializable] 11 | [PostProcess(typeof(StylizedEdgeRenderer), PostProcessEvent.AfterStack, "Alpacasking/Stylized Edge")] 12 | public sealed class StylizedEdge : PostProcessEffectSettings 13 | { 14 | [Tooltip("Stroke texture used to paint."), DisplayName("Stroke")] 15 | public TextureParameter strokeTexture = new TextureParameter { value = null }; 16 | 17 | [Range(0, 10)] 18 | public IntParameter GaussianBlurWindowSize = new IntParameter { value = 4 }; 19 | 20 | [Range(0.01f, 1f)] 21 | public FloatParameter GaussianBlurSigma = new FloatParameter { value = 0.5f }; 22 | 23 | [Range(0, 10)] 24 | public IntParameter ConvolutionHalfLength = new IntParameter { value = 4 }; 25 | 26 | [Range(0f, 10f)] 27 | public FloatParameter ConvolutionStep = new FloatParameter { value = 1f }; 28 | 29 | [Range(0.01f, 1f)] 30 | public FloatParameter ConvolutionSigma = new FloatParameter { value = 0.1f }; 31 | 32 | [Range(0f, 1f)] 33 | public FloatParameter EdgeThreshold = new FloatParameter { value = 0f }; 34 | 35 | public override bool IsEnabledAndSupported(PostProcessRenderContext context) 36 | { 37 | return enabled.value && strokeTexture != null; 38 | } 39 | } 40 | 41 | 42 | [UnityEngine.Scripting.Preserve] 43 | public sealed class StylizedEdgeRenderer : PostProcessEffectRenderer 44 | { 45 | private ComputeShader structureTensorShader; 46 | 47 | private ComputeShader gaussianBlurShader; 48 | 49 | private ComputeShader edgeLICShader; 50 | 51 | private ComputeShader grayScaleShader; 52 | 53 | private ComputeShader eigenShader; 54 | 55 | private int grayScaleKernelID; 56 | 57 | private int structureTensorKernelID; 58 | 59 | private int gaussianBlurHorizontalKernelID; 60 | 61 | private int gaussianBlurVerticalKernelID; 62 | 63 | private int LLICEularianKernelID; 64 | 65 | private int eigenKernelID; 66 | 67 | private int tempRTID1; 68 | 69 | private int tempRTID2; 70 | 71 | private int tempRTID3; 72 | public override void Init() 73 | { 74 | grayScaleShader = (ComputeShader)Resources.Load("GrayScale"); 75 | structureTensorShader = (ComputeShader)Resources.Load("StructureTensor"); 76 | gaussianBlurShader = (ComputeShader)Resources.Load("GaussianBlur"); 77 | edgeLICShader = (ComputeShader)Resources.Load("EdgeLIC"); 78 | eigenShader = (ComputeShader)Resources.Load("Eigen"); 79 | 80 | grayScaleKernelID = grayScaleShader.FindKernel("GrayScale"); 81 | structureTensorKernelID = structureTensorShader.FindKernel("StructureTensor"); 82 | gaussianBlurHorizontalKernelID = gaussianBlurShader.FindKernel("GaussianBlurHorizontal"); 83 | gaussianBlurVerticalKernelID = gaussianBlurShader.FindKernel("GaussianBlurVertical"); 84 | LLICEularianKernelID = edgeLICShader.FindKernel("LICEularian"); 85 | eigenKernelID = eigenShader.FindKernel("Eigen"); 86 | 87 | 88 | tempRTID1 = Shader.PropertyToID("tempRTID1"); 89 | tempRTID2 = Shader.PropertyToID("tempRTID2"); 90 | tempRTID3 = Shader.PropertyToID("tempRTID3"); 91 | } 92 | public override void Release() 93 | { 94 | 95 | } 96 | 97 | public override void Render(PostProcessRenderContext context) 98 | { 99 | var cmd = context.command; 100 | cmd.BeginSample("StylizedEdge"); 101 | RenderTextureDescriptor desc = new RenderTextureDescriptor(context.width, context.height); 102 | desc.enableRandomWrite = true; 103 | desc.graphicsFormat = UnityEngine.Experimental.Rendering.GraphicsFormat.R32G32B32A32_SFloat; 104 | cmd.GetTemporaryRT(tempRTID1, desc); 105 | cmd.GetTemporaryRT(tempRTID2, desc); 106 | cmd.GetTemporaryRT(tempRTID3, desc); 107 | //To GrayScale 108 | cmd.SetComputeTextureParam(grayScaleShader, grayScaleKernelID, "Source", context.source); 109 | cmd.SetComputeTextureParam(grayScaleShader, grayScaleKernelID, "Result", tempRTID1); 110 | cmd.DispatchCompute(grayScaleShader, grayScaleKernelID, context.width, context.height, 1); 111 | 112 | // Structure Tensor 113 | cmd.SetComputeIntParam(structureTensorShader, "width", context.width); 114 | cmd.SetComputeIntParam(structureTensorShader, "height", context.height); 115 | cmd.SetComputeTextureParam(structureTensorShader, structureTensorKernelID, "Source", tempRTID1); 116 | cmd.SetComputeTextureParam(structureTensorShader, structureTensorKernelID, "Result", tempRTID2); 117 | cmd.SetComputeFloatParam(structureTensorShader, "p", 0.183f); 118 | cmd.DispatchCompute(structureTensorShader, structureTensorKernelID, context.width, context.height, 1); 119 | 120 | // Blur Tensor 121 | cmd.SetComputeIntParam(gaussianBlurShader, "width", context.width); 122 | cmd.SetComputeIntParam(gaussianBlurShader, "height", context.height); 123 | cmd.SetComputeIntParam(gaussianBlurShader, "WindowSize", settings.GaussianBlurWindowSize.value); 124 | cmd.SetComputeFloatParam(gaussianBlurShader, "Sigma", settings.GaussianBlurSigma.value); 125 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurHorizontalKernelID, "Source", tempRTID2); 126 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurHorizontalKernelID, "Result", tempRTID1); 127 | cmd.DispatchCompute(gaussianBlurShader, gaussianBlurHorizontalKernelID, context.width, context.height, 1); 128 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurVerticalKernelID, "Source", tempRTID1); 129 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurVerticalKernelID, "Result", tempRTID2); 130 | cmd.DispatchCompute(gaussianBlurShader, gaussianBlurVerticalKernelID, context.width, context.height, 1); 131 | 132 | // eigen 133 | cmd.SetComputeTextureParam(eigenShader, eigenKernelID, "Source", tempRTID2); 134 | cmd.SetComputeTextureParam(eigenShader, eigenKernelID, "Result", tempRTID1); 135 | cmd.DispatchCompute(eigenShader, eigenKernelID, context.width, context.height, 1); 136 | 137 | // LIC 138 | var strokeTex = settings.strokeTexture.value; 139 | cmd.Blit(strokeTex, tempRTID3,new Vector2(context.width/ (float)strokeTex.width, context.height / (float)strokeTex.height),new Vector2(0,0)); 140 | cmd.SetComputeIntParam(edgeLICShader, "Length", settings.ConvolutionHalfLength.value); 141 | cmd.SetComputeFloatParam(edgeLICShader, "sigma", settings.ConvolutionSigma.value); 142 | cmd.SetComputeIntParam(edgeLICShader, "width", context.width); 143 | cmd.SetComputeIntParam(edgeLICShader, "height", context.height); 144 | cmd.SetComputeFloatParam(edgeLICShader, "step", settings.ConvolutionStep.value); 145 | cmd.SetComputeFloatParam(edgeLICShader, "edgeThreshold", settings.EdgeThreshold.value); 146 | cmd.SetComputeTextureParam(edgeLICShader, LLICEularianKernelID, "Source", tempRTID3); 147 | cmd.SetComputeTextureParam(edgeLICShader, LLICEularianKernelID, "VectorField", tempRTID1); 148 | cmd.SetComputeTextureParam(edgeLICShader, LLICEularianKernelID, "Result", tempRTID2); 149 | cmd.DispatchCompute(edgeLICShader, LLICEularianKernelID, context.width, context.height, 1); 150 | 151 | cmd.Blit(tempRTID2, context.destination); 152 | cmd.ReleaseTemporaryRT(tempRTID1); 153 | cmd.ReleaseTemporaryRT(tempRTID2); 154 | cmd.ReleaseTemporaryRT(tempRTID3); 155 | cmd.EndSample("StylizedEdge"); 156 | } 157 | } 158 | } -------------------------------------------------------------------------------- /Assets/Scripts/ColorTransfer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Rendering.PostProcessing; 4 | using UnityEngine.Rendering; 5 | using System.Runtime.InteropServices; 6 | [Serializable] 7 | [PostProcess(typeof(ColorTransferRenderer), PostProcessEvent.AfterStack, "Alpacasking/ColorTransfer")] 8 | public sealed class ColorTransfer : PostProcessEffectSettings 9 | { 10 | [Tooltip("Target texture."), DisplayName("Target")] 11 | public TextureParameter targetTexture = new TextureParameter { value = null }; 12 | [Range(1, 100), Tooltip("Effect strength."), DisplayName("Strength")] 13 | public FloatParameter Strength = new FloatParameter { value = 10 }; 14 | public override bool IsEnabledAndSupported(PostProcessRenderContext context) 15 | { 16 | return enabled.value 17 | && targetTexture.value != null; 18 | } 19 | } 20 | 21 | 22 | [UnityEngine.Scripting.Preserve] 23 | public sealed class ColorTransferRenderer : PostProcessEffectRenderer 24 | { 25 | private ComputeShader colorSpaceComputeShader; 26 | 27 | private ComputeShader statisticsShader; 28 | 29 | private ComputeShader colorTransferShader; 30 | 31 | private ComputeBuffer srcStatisticsBuffer; 32 | private ComputeBuffer tarStatisticsBuffer; 33 | private int rgbToLabKernelID; 34 | 35 | private int labToRgbKernelID; 36 | 37 | private int sumKernelID; 38 | 39 | private int SDSumKernelID; 40 | 41 | private int averageSumKernelID; 42 | 43 | private int averageSDSumKernelID; 44 | 45 | private int colorTransferKernelID; 46 | private int tempRTID1; 47 | 48 | private int tempRTID2; 49 | 50 | private int tempRTID3; 51 | 52 | private int[] startData = { 0, 0, 0, 0, 0, 0 }; 53 | 54 | private int[] temptData = { 0, 0, 0, 0, 0, 0 }; 55 | public override void Init() 56 | { 57 | colorSpaceComputeShader = (ComputeShader)Resources.Load("ColorSpace"); 58 | statisticsShader = (ComputeShader)Resources.Load("Statistics"); 59 | colorTransferShader = (ComputeShader)Resources.Load("ColorTransfer"); 60 | 61 | rgbToLabKernelID = colorSpaceComputeShader.FindKernel("RgbToLab"); 62 | labToRgbKernelID = colorSpaceComputeShader.FindKernel("LabToRgb"); 63 | 64 | sumKernelID = statisticsShader.FindKernel("Sum"); 65 | SDSumKernelID = statisticsShader.FindKernel("SDSum"); 66 | averageSumKernelID = statisticsShader.FindKernel("AverageSum"); 67 | averageSDSumKernelID = statisticsShader.FindKernel("AverageSDSum"); 68 | colorTransferKernelID = colorTransferShader.FindKernel("ColorTransfer"); 69 | 70 | srcStatisticsBuffer = new ComputeBuffer(6, sizeof(int)); 71 | srcStatisticsBuffer.SetData(startData); 72 | 73 | 74 | tarStatisticsBuffer = new ComputeBuffer(6, sizeof(int)); 75 | tarStatisticsBuffer.SetData(startData); 76 | 77 | tempRTID1 = Shader.PropertyToID("tempRTID1"); 78 | tempRTID2 = Shader.PropertyToID("tempRTID2"); 79 | tempRTID3 = Shader.PropertyToID("tempRTID3"); 80 | 81 | } 82 | public override void Release() 83 | { 84 | if (srcStatisticsBuffer != null) 85 | { 86 | srcStatisticsBuffer.Release(); 87 | } 88 | if (tarStatisticsBuffer != null) 89 | { 90 | tarStatisticsBuffer.Release(); 91 | } 92 | } 93 | 94 | public override void Render(PostProcessRenderContext context) 95 | { 96 | if (srcStatisticsBuffer == null) 97 | { 98 | Init(); 99 | } 100 | int srcWidth = context.width; 101 | int srcHeight = context.height; 102 | int tarWidth = settings.targetTexture.value.width; 103 | int tarHeight = settings.targetTexture.value.height; 104 | /*srcStatisticsBuffer.GetData(temptData); 105 | for (int i = 0; i < 6; i++) 106 | { 107 | Debug.Log(i + "," + temptData[i]); 108 | }*/ 109 | srcStatisticsBuffer.SetData(startData); 110 | tarStatisticsBuffer.SetData(startData); 111 | 112 | var cmd = context.command; 113 | cmd.BeginSample("ColorTransfer"); 114 | RenderTextureDescriptor desc = new RenderTextureDescriptor(srcWidth, srcHeight); 115 | desc.enableRandomWrite = true; 116 | desc.graphicsFormat = UnityEngine.Experimental.Rendering.GraphicsFormat.R32G32B32A32_SFloat; 117 | cmd.GetTemporaryRT(tempRTID1, desc); 118 | cmd.GetTemporaryRT(tempRTID3, desc); 119 | desc.width = tarWidth; 120 | desc.height = tarHeight; 121 | cmd.GetTemporaryRT(tempRTID2, desc); 122 | // source:rgb->lab 123 | cmd.SetComputeFloatParam(colorSpaceComputeShader, "Strength", settings.Strength.value); 124 | cmd.SetComputeTextureParam(colorSpaceComputeShader, rgbToLabKernelID, "Source", context.source); 125 | cmd.SetComputeTextureParam(colorSpaceComputeShader, rgbToLabKernelID, "Result", tempRTID1); 126 | cmd.DispatchCompute(colorSpaceComputeShader, rgbToLabKernelID, srcWidth, srcHeight, 1); 127 | 128 | //source:statistics 129 | cmd.SetComputeTextureParam(statisticsShader, sumKernelID, "Source", tempRTID1); 130 | cmd.SetComputeBufferParam(statisticsShader, sumKernelID, "StatisticsBuffer", srcStatisticsBuffer); 131 | cmd.DispatchCompute(statisticsShader, sumKernelID, srcWidth, srcHeight, 1); 132 | 133 | cmd.SetComputeBufferParam(statisticsShader, averageSumKernelID, "StatisticsBuffer", srcStatisticsBuffer); 134 | cmd.SetComputeIntParam(statisticsShader, "Num", srcWidth * srcHeight); 135 | cmd.DispatchCompute(statisticsShader, averageSumKernelID, 1, 1, 1); 136 | 137 | cmd.SetComputeTextureParam(statisticsShader, SDSumKernelID, "Source", tempRTID1); 138 | cmd.SetComputeBufferParam(statisticsShader, SDSumKernelID, "StatisticsBuffer", srcStatisticsBuffer); 139 | cmd.DispatchCompute(statisticsShader, SDSumKernelID, srcWidth, srcHeight, 1); 140 | 141 | cmd.SetComputeBufferParam(statisticsShader, averageSDSumKernelID, "StatisticsBuffer", srcStatisticsBuffer); 142 | cmd.SetComputeIntParam(statisticsShader, "Num", srcWidth * srcHeight); 143 | cmd.DispatchCompute(statisticsShader, averageSDSumKernelID, 1, 1, 1); 144 | 145 | 146 | // target:rgb->lab 147 | cmd.SetComputeTextureParam(colorSpaceComputeShader, rgbToLabKernelID, "Source", settings.targetTexture.value); 148 | cmd.SetComputeTextureParam(colorSpaceComputeShader, rgbToLabKernelID, "Result", tempRTID2); 149 | cmd.DispatchCompute(colorSpaceComputeShader, rgbToLabKernelID, tarWidth, tarHeight, 1); 150 | 151 | // target:statistics 152 | cmd.SetComputeTextureParam(statisticsShader, sumKernelID, "Source", tempRTID2); 153 | cmd.SetComputeBufferParam(statisticsShader, sumKernelID, "StatisticsBuffer", tarStatisticsBuffer); 154 | cmd.DispatchCompute(statisticsShader, sumKernelID, tarWidth, tarHeight, 1); 155 | 156 | cmd.SetComputeBufferParam(statisticsShader, averageSumKernelID, "StatisticsBuffer", tarStatisticsBuffer); 157 | cmd.SetComputeIntParam(statisticsShader, "Num", tarWidth * tarHeight); 158 | cmd.DispatchCompute(statisticsShader, averageSumKernelID, 1, 1, 1); 159 | 160 | cmd.SetComputeTextureParam(statisticsShader, SDSumKernelID, "Source", tempRTID2); 161 | cmd.SetComputeBufferParam(statisticsShader, SDSumKernelID, "StatisticsBuffer", tarStatisticsBuffer); 162 | cmd.DispatchCompute(statisticsShader, SDSumKernelID, tarWidth, tarHeight, 1); 163 | 164 | cmd.SetComputeBufferParam(statisticsShader, averageSDSumKernelID, "StatisticsBuffer", tarStatisticsBuffer); 165 | cmd.SetComputeIntParam(statisticsShader, "Num", tarWidth * tarHeight); 166 | cmd.DispatchCompute(statisticsShader, averageSDSumKernelID, 1, 1, 1); 167 | 168 | 169 | // color transfer 170 | cmd.SetComputeTextureParam(colorTransferShader, colorTransferKernelID, "Source", tempRTID1); 171 | cmd.SetComputeTextureParam(colorTransferShader, colorTransferKernelID, "Result", tempRTID3); 172 | cmd.SetComputeBufferParam(colorTransferShader, colorTransferKernelID, "SrcStatisticsBuffer", srcStatisticsBuffer); 173 | cmd.SetComputeBufferParam(colorTransferShader, colorTransferKernelID, "TarStatisticsBuffer", tarStatisticsBuffer); 174 | cmd.DispatchCompute(colorTransferShader, colorTransferKernelID, srcWidth, srcHeight, 1); 175 | 176 | // lab->rgb 177 | cmd.SetComputeTextureParam(colorSpaceComputeShader, labToRgbKernelID, "Source", tempRTID3); 178 | cmd.SetComputeTextureParam(colorSpaceComputeShader, labToRgbKernelID, "Result", tempRTID1); 179 | cmd.DispatchCompute(colorSpaceComputeShader, labToRgbKernelID, srcWidth, srcHeight, 1); 180 | 181 | 182 | cmd.Blit(tempRTID1, context.destination); 183 | 184 | cmd.ReleaseTemporaryRT(tempRTID1); 185 | cmd.ReleaseTemporaryRT(tempRTID2); 186 | cmd.ReleaseTemporaryRT(tempRTID3); 187 | cmd.EndSample("ColorTransfer"); 188 | } 189 | } -------------------------------------------------------------------------------- /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: 1000 17 | dead: 0.001 18 | sensitivity: 1000 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: 1000 33 | dead: 0.001 34 | sensitivity: 1000 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: 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: CameraX 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: 1 149 | type: 1 150 | axis: 0 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: CameraY 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0 162 | sensitivity: 0.1 163 | snap: 0 164 | invert: 1 165 | type: 1 166 | axis: 1 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Mouse ScrollWheel 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0 178 | sensitivity: 0.1 179 | snap: 0 180 | invert: 0 181 | type: 1 182 | axis: 2 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Horizontal 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 0 193 | dead: 0.19 194 | sensitivity: 1 195 | snap: 0 196 | invert: 0 197 | type: 2 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Vertical 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 0 209 | dead: 0.19 210 | sensitivity: 1 211 | snap: 0 212 | invert: 1 213 | type: 2 214 | axis: 1 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire1 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: Fire2 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 1 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: Fire3 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: joystick button 3 254 | altNegativeButton: 255 | altPositiveButton: 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: Jump 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: joystick button 0 270 | altNegativeButton: 271 | altPositiveButton: 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: Submit 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: return 286 | altNegativeButton: 287 | altPositiveButton: joystick button 0 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Submit 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: enter 302 | altNegativeButton: 303 | altPositiveButton: space 304 | gravity: 1000 305 | dead: 0.001 306 | sensitivity: 1000 307 | snap: 0 308 | invert: 0 309 | type: 0 310 | axis: 0 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Cancel 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: escape 318 | altNegativeButton: 319 | altPositiveButton: joystick button 1 320 | gravity: 1000 321 | dead: 0.001 322 | sensitivity: 1000 323 | snap: 0 324 | invert: 0 325 | type: 0 326 | axis: 0 327 | joyNum: 0 328 | - serializedVersion: 3 329 | m_Name: CameraX 330 | descriptiveName: 331 | descriptiveNegativeName: 332 | negativeButton: 333 | positiveButton: escape 334 | altNegativeButton: 335 | altPositiveButton: joystick button 1 336 | gravity: 0 337 | dead: 0.19 338 | sensitivity: 1 339 | snap: 0 340 | invert: 0 341 | type: 2 342 | axis: 3 343 | joyNum: 0 344 | - serializedVersion: 3 345 | m_Name: CameraY 346 | descriptiveName: 347 | descriptiveNegativeName: 348 | negativeButton: 349 | positiveButton: escape 350 | altNegativeButton: 351 | altPositiveButton: joystick button 1 352 | gravity: 0 353 | dead: 0.19 354 | sensitivity: 1 355 | snap: 0 356 | invert: 0 357 | type: 2 358 | axis: 4 359 | joyNum: 0 360 | - serializedVersion: 3 361 | m_Name: Pause 362 | descriptiveName: 363 | descriptiveNegativeName: 364 | negativeButton: 365 | positiveButton: escape 366 | altNegativeButton: 367 | altPositiveButton: joystick button 7 368 | gravity: 0 369 | dead: 0.19 370 | sensitivity: 1 371 | snap: 0 372 | invert: 0 373 | type: 0 374 | axis: 0 375 | joyNum: 0 376 | -------------------------------------------------------------------------------- /Assets/Scripts/LICBlur.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.Rendering.PostProcessing; 4 | using UnityEngine.Rendering; 5 | using System.Runtime.InteropServices; 6 | 7 | namespace AlpacasKing 8 | { 9 | 10 | public enum ConvolutionType 11 | { 12 | DDA, 13 | LIC 14 | } 15 | 16 | [Serializable] 17 | public sealed class ConvolutionTypeParameter : ParameterOverride { } 18 | 19 | 20 | [Serializable] 21 | [PostProcess(typeof(LineIntegralConvolutionRenderer), PostProcessEvent.AfterStack, "Alpacasking/Line Integral Convolution")] 22 | public sealed class LineIntegralConvolution : PostProcessEffectSettings 23 | { 24 | public ConvolutionTypeParameter Type = new ConvolutionTypeParameter { value = ConvolutionType.LIC }; 25 | 26 | [Range(0, 10)] 27 | public IntParameter RelaxationIteration = new IntParameter { value = 2 }; 28 | 29 | [Range(0f, 10f)] 30 | public FloatParameter RelaxationThreshold = new FloatParameter { value = 1f }; 31 | 32 | [Range(0, 10)] 33 | public IntParameter ConvolutionIteration = new IntParameter { value = 1 }; 34 | 35 | [Range(0, 10)] 36 | public IntParameter GaussianBlurWindowSize = new IntParameter { value = 4 }; 37 | 38 | [Range(0.01f, 1f)] 39 | public FloatParameter GaussianBlurSigma = new FloatParameter { value = 0.5f }; 40 | 41 | [Range(0, 10)] 42 | public IntParameter ConvolutionHalfLength = new IntParameter { value = 4 }; 43 | 44 | [Range(0f, 10f)] 45 | public FloatParameter ConvolutionStep = new FloatParameter { value = 1f }; 46 | 47 | [Range(0.01f, 1f)] 48 | public FloatParameter ConvolutionSigma = new FloatParameter { value = 0.1f }; 49 | 50 | public override bool IsEnabledAndSupported(PostProcessRenderContext context) 51 | { 52 | return enabled.value; 53 | } 54 | } 55 | 56 | 57 | [UnityEngine.Scripting.Preserve] 58 | public sealed class LineIntegralConvolutionRenderer : PostProcessEffectRenderer 59 | { 60 | private ComputeShader structureTensorShader; 61 | 62 | private ComputeShader gaussianBlurShader; 63 | 64 | private ComputeShader LICBlurShader; 65 | 66 | private ComputeShader DDABlurShader; 67 | 68 | private ComputeShader grayScaleShader; 69 | 70 | private ComputeShader eigenShader; 71 | 72 | private int grayScaleKernelID; 73 | 74 | private int structureTensorKernelID; 75 | 76 | private int jacobiRelaxationKernelID; 77 | 78 | private int gaussianBlurHorizontalKernelID; 79 | 80 | private int gaussianBlurVerticalKernelID; 81 | 82 | private int LLICEularianKernelID; 83 | 84 | private int DDABlurKernelID; 85 | 86 | private int eigenKernelID; 87 | 88 | private int tempRTID1; 89 | 90 | private int tempRTID2; 91 | 92 | private int tempRTID3; 93 | public override void Init() 94 | { 95 | grayScaleShader = (ComputeShader)Resources.Load("GrayScale"); 96 | structureTensorShader = (ComputeShader)Resources.Load("StructureTensor"); 97 | gaussianBlurShader = (ComputeShader)Resources.Load("GaussianBlur"); 98 | LICBlurShader = (ComputeShader)Resources.Load("LICBlur"); 99 | DDABlurShader = (ComputeShader)Resources.Load("DDABlur"); 100 | eigenShader = (ComputeShader)Resources.Load("Eigen"); 101 | 102 | grayScaleKernelID = grayScaleShader.FindKernel("GrayScale"); 103 | structureTensorKernelID = structureTensorShader.FindKernel("StructureTensor"); 104 | jacobiRelaxationKernelID = structureTensorShader.FindKernel("JacobiRelaxation"); 105 | gaussianBlurHorizontalKernelID = gaussianBlurShader.FindKernel("GaussianBlurHorizontal"); 106 | gaussianBlurVerticalKernelID = gaussianBlurShader.FindKernel("GaussianBlurVertical"); 107 | LLICEularianKernelID = LICBlurShader.FindKernel("LICEularian"); 108 | DDABlurKernelID = DDABlurShader.FindKernel("DDABlur"); 109 | eigenKernelID = eigenShader.FindKernel("Eigen"); 110 | 111 | 112 | tempRTID1 = Shader.PropertyToID("tempRTID1"); 113 | tempRTID2 = Shader.PropertyToID("tempRTID2"); 114 | tempRTID3 = Shader.PropertyToID("tempRTID3"); 115 | } 116 | public override void Release() 117 | { 118 | 119 | } 120 | 121 | public override void Render(PostProcessRenderContext context) 122 | { 123 | var cmd = context.command; 124 | cmd.BeginSample("LICBlur"); 125 | RenderTextureDescriptor desc = new RenderTextureDescriptor(context.width, context.height); 126 | desc.enableRandomWrite = true; 127 | desc.graphicsFormat = UnityEngine.Experimental.Rendering.GraphicsFormat.R32G32B32A32_SFloat; 128 | cmd.GetTemporaryRT(tempRTID1, desc); 129 | cmd.GetTemporaryRT(tempRTID2, desc); 130 | cmd.GetTemporaryRT(tempRTID3, desc); 131 | //To GrayScale 132 | cmd.SetComputeTextureParam(grayScaleShader, grayScaleKernelID, "Source", context.source); 133 | cmd.SetComputeTextureParam(grayScaleShader, grayScaleKernelID, "Result", tempRTID1); 134 | cmd.DispatchCompute(grayScaleShader, grayScaleKernelID, context.width, context.height, 1); 135 | 136 | // Structure Tensor 137 | cmd.SetComputeIntParam(structureTensorShader, "width", context.width); 138 | cmd.SetComputeIntParam(structureTensorShader, "height", context.height); 139 | cmd.SetComputeTextureParam(structureTensorShader, structureTensorKernelID, "Source", tempRTID1); 140 | cmd.SetComputeTextureParam(structureTensorShader, structureTensorKernelID, "Result", tempRTID2); 141 | cmd.SetComputeFloatParam(structureTensorShader, "p", 0.183f); 142 | cmd.DispatchCompute(structureTensorShader, structureTensorKernelID, context.width, context.height, 1); 143 | 144 | // Jacobi Relaxation 145 | cmd.SetComputeFloatParam(structureTensorShader, "p", settings.RelaxationThreshold.value); 146 | for (int i = 0; i < settings.RelaxationIteration.value; i++) 147 | { 148 | cmd.SetComputeTextureParam(structureTensorShader, jacobiRelaxationKernelID, "Source", tempRTID2); 149 | cmd.SetComputeTextureParam(structureTensorShader, jacobiRelaxationKernelID, "Result", tempRTID1); 150 | 151 | cmd.DispatchCompute(structureTensorShader, jacobiRelaxationKernelID, context.width, context.height, 1); 152 | cmd.SetComputeTextureParam(structureTensorShader, jacobiRelaxationKernelID, "Source", tempRTID1); 153 | cmd.SetComputeTextureParam(structureTensorShader, jacobiRelaxationKernelID, "Result", tempRTID2); 154 | cmd.DispatchCompute(structureTensorShader, jacobiRelaxationKernelID, context.width, context.height, 1); 155 | } 156 | 157 | // Blur Tensor 158 | cmd.SetComputeIntParam(gaussianBlurShader, "width", context.width); 159 | cmd.SetComputeIntParam(gaussianBlurShader, "height", context.height); 160 | cmd.SetComputeIntParam(gaussianBlurShader, "WindowSize", settings.GaussianBlurWindowSize.value); 161 | cmd.SetComputeFloatParam(gaussianBlurShader, "Sigma", settings.GaussianBlurSigma.value); 162 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurHorizontalKernelID, "Source", tempRTID2); 163 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurHorizontalKernelID, "Result", tempRTID1); 164 | cmd.DispatchCompute(gaussianBlurShader, gaussianBlurHorizontalKernelID, context.width, context.height, 1); 165 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurVerticalKernelID, "Source", tempRTID1); 166 | cmd.SetComputeTextureParam(gaussianBlurShader, gaussianBlurVerticalKernelID, "Result", tempRTID2); 167 | cmd.DispatchCompute(gaussianBlurShader, gaussianBlurVerticalKernelID, context.width, context.height, 1); 168 | 169 | // eigen 170 | cmd.SetComputeTextureParam(eigenShader, eigenKernelID, "Source", tempRTID2); 171 | cmd.SetComputeTextureParam(eigenShader, eigenKernelID, "Result", tempRTID1); 172 | cmd.DispatchCompute(eigenShader, eigenKernelID, context.width, context.height, 1); 173 | 174 | // LIC 175 | ComputeShader convolutionShader; 176 | int convolutionKernelID; 177 | switch (settings.Type.value) 178 | { 179 | case ConvolutionType.DDA: 180 | convolutionShader = DDABlurShader; 181 | convolutionKernelID = DDABlurKernelID; 182 | break; 183 | case ConvolutionType.LIC: 184 | convolutionShader = LICBlurShader; 185 | convolutionKernelID = LLICEularianKernelID; 186 | break; 187 | default: 188 | convolutionShader = LICBlurShader; 189 | convolutionKernelID = LLICEularianKernelID; 190 | break; 191 | } 192 | cmd.Blit(context.source, tempRTID3); 193 | cmd.SetComputeIntParam(convolutionShader, "Length", settings.ConvolutionHalfLength.value); 194 | cmd.SetComputeFloatParam(convolutionShader, "sigma", settings.ConvolutionSigma.value); 195 | cmd.SetComputeIntParam(convolutionShader, "width", context.width); 196 | cmd.SetComputeIntParam(convolutionShader, "height", context.height); 197 | cmd.SetComputeFloatParam(convolutionShader, "step", settings.ConvolutionStep.value); 198 | for (int i = 0; i < settings.ConvolutionIteration.value; i++) 199 | { 200 | 201 | cmd.SetComputeTextureParam(convolutionShader, convolutionKernelID, "Source", tempRTID3); 202 | cmd.SetComputeTextureParam(convolutionShader, convolutionKernelID, "VectorField", tempRTID1); 203 | cmd.SetComputeTextureParam(convolutionShader, convolutionKernelID, "Result", tempRTID2); 204 | cmd.DispatchCompute(convolutionShader, convolutionKernelID, context.width, context.height, 1); 205 | 206 | cmd.SetComputeTextureParam(convolutionShader, convolutionKernelID, "Source", tempRTID2); 207 | cmd.SetComputeTextureParam(convolutionShader, convolutionKernelID, "VectorField", tempRTID1); 208 | cmd.SetComputeTextureParam(convolutionShader, convolutionKernelID, "Result", tempRTID3); 209 | cmd.DispatchCompute(convolutionShader, convolutionKernelID, context.width, context.height, 1); 210 | } 211 | 212 | 213 | cmd.Blit(tempRTID3, context.destination); 214 | cmd.ReleaseTemporaryRT(tempRTID1); 215 | cmd.ReleaseTemporaryRT(tempRTID2); 216 | cmd.ReleaseTemporaryRT(tempRTID3); 217 | cmd.EndSample("LICBlur"); 218 | } 219 | } 220 | } -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 18 7 | productGUID: 00000000000000000000000000000000 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: PostProcessingLib 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | displayResolutionDialog: 1 56 | iosUseCustomAppBackgroundBehavior: 0 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidUseSwappy: 0 69 | androidBlitType: 0 70 | defaultIsNativeResolution: 1 71 | macRetinaSupport: 0 72 | runInBackground: 1 73 | captureSingleScreen: 0 74 | muteOtherAudioSources: 0 75 | Prepare IOS For Recording: 0 76 | Force IOS Speakers When Recording: 0 77 | deferSystemGesturesMode: 0 78 | hideHomeButton: 0 79 | submitAnalytics: 1 80 | usePlayerLog: 1 81 | bakeCollisionMeshes: 0 82 | forceSingleInstance: 0 83 | useFlipModelSwapchain: 1 84 | resizableWindow: 0 85 | useMacAppStoreValidation: 0 86 | macAppStoreCategory: public.app-category.games 87 | gpuSkinning: 1 88 | graphicsJobs: 1 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 0 95 | allowFullscreenSwitch: 1 96 | graphicsJobMode: 0 97 | fullscreenMode: 1 98 | xboxSpeechDB: 0 99 | xboxEnableHeadOrientation: 0 100 | xboxEnableGuest: 0 101 | xboxEnablePIXSampling: 0 102 | metalFramebufferOnly: 0 103 | xboxOneResolution: 0 104 | xboxOneSResolution: 0 105 | xboxOneXResolution: 3 106 | xboxOneMonoLoggingLevel: 0 107 | xboxOneLoggingLevel: 1 108 | xboxOneDisableEsram: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 0 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | vulkanEnableSetSRGBWrite: 0 117 | m_SupportedAspectRatios: 118 | 4:3: 1 119 | 5:4: 1 120 | 16:10: 1 121 | 16:9: 1 122 | Others: 1 123 | bundleVersion: 1.0 124 | preloadedAssets: [] 125 | metroInputSource: 0 126 | wsaTransparentSwapchain: 0 127 | m_HolographicPauseOnTrackingLoss: 1 128 | xboxOneDisableKinectGpuReservation: 0 129 | xboxOneEnable7thCore: 0 130 | vrSettings: 131 | cardboard: 132 | depthFormat: 0 133 | enableTransitionView: 0 134 | daydream: 135 | depthFormat: 0 136 | useSustainedPerformanceMode: 0 137 | enableVideoLayer: 0 138 | useProtectedVideoMemory: 0 139 | minimumSupportedHeadTracking: 0 140 | maximumSupportedHeadTracking: 1 141 | hololens: 142 | depthFormat: 1 143 | depthBufferSharingEnabled: 0 144 | lumin: 145 | depthFormat: 0 146 | frameTiming: 2 147 | enableGLCache: 0 148 | glCacheMaxBlobSize: 524288 149 | glCacheMaxFileSize: 8388608 150 | oculus: 151 | sharedDepthBuffer: 0 152 | dashSupport: 0 153 | lowOverheadMode: 0 154 | protectedContext: 0 155 | v2Signing: 0 156 | enable360StereoCapture: 0 157 | isWsaHolographicRemotingEnabled: 0 158 | protectGraphicsMemory: 0 159 | enableFrameTimingStats: 0 160 | useHDRDisplay: 0 161 | m_ColorGamuts: 00000000 162 | targetPixelDensity: 30 163 | resolutionScalingMode: 0 164 | androidSupportedAspectRatio: 1 165 | androidMaxAspectRatio: 2.1 166 | applicationIdentifier: {} 167 | buildNumber: {} 168 | AndroidBundleVersionCode: 1 169 | AndroidMinSdkVersion: 16 170 | AndroidTargetSdkVersion: 0 171 | AndroidPreferredInstallLocation: 1 172 | aotOptions: 173 | stripEngineCode: 1 174 | iPhoneStrippingLevel: 0 175 | iPhoneScriptCallOptimization: 0 176 | ForceInternetPermission: 0 177 | ForceSDCardPermission: 0 178 | CreateWallpaper: 0 179 | APKExpansionFiles: 0 180 | keepLoadedShadersAlive: 0 181 | StripUnusedMeshComponents: 0 182 | VertexChannelCompressionMask: 214 183 | iPhoneSdkVersion: 988 184 | iOSTargetOSVersionString: 9.0 185 | tvOSSdkVersion: 0 186 | tvOSRequireExtendedGameController: 0 187 | tvOSTargetOSVersionString: 9.0 188 | uIPrerenderedIcon: 0 189 | uIRequiresPersistentWiFi: 0 190 | uIRequiresFullScreen: 1 191 | uIStatusBarHidden: 1 192 | uIExitOnSuspend: 0 193 | uIStatusBarStyle: 0 194 | iPhoneSplashScreen: {fileID: 0} 195 | iPhoneHighResSplashScreen: {fileID: 0} 196 | iPhoneTallHighResSplashScreen: {fileID: 0} 197 | iPhone47inSplashScreen: {fileID: 0} 198 | iPhone55inPortraitSplashScreen: {fileID: 0} 199 | iPhone55inLandscapeSplashScreen: {fileID: 0} 200 | iPhone58inPortraitSplashScreen: {fileID: 0} 201 | iPhone58inLandscapeSplashScreen: {fileID: 0} 202 | iPadPortraitSplashScreen: {fileID: 0} 203 | iPadHighResPortraitSplashScreen: {fileID: 0} 204 | iPadLandscapeSplashScreen: {fileID: 0} 205 | iPadHighResLandscapeSplashScreen: {fileID: 0} 206 | iPhone65inPortraitSplashScreen: {fileID: 0} 207 | iPhone65inLandscapeSplashScreen: {fileID: 0} 208 | iPhone61inPortraitSplashScreen: {fileID: 0} 209 | iPhone61inLandscapeSplashScreen: {fileID: 0} 210 | appleTVSplashScreen: {fileID: 0} 211 | appleTVSplashScreen2x: {fileID: 0} 212 | tvOSSmallIconLayers: [] 213 | tvOSSmallIconLayers2x: [] 214 | tvOSLargeIconLayers: [] 215 | tvOSLargeIconLayers2x: [] 216 | tvOSTopShelfImageLayers: [] 217 | tvOSTopShelfImageLayers2x: [] 218 | tvOSTopShelfImageWideLayers: [] 219 | tvOSTopShelfImageWideLayers2x: [] 220 | iOSLaunchScreenType: 0 221 | iOSLaunchScreenPortrait: {fileID: 0} 222 | iOSLaunchScreenLandscape: {fileID: 0} 223 | iOSLaunchScreenBackgroundColor: 224 | serializedVersion: 2 225 | rgba: 0 226 | iOSLaunchScreenFillPct: 100 227 | iOSLaunchScreenSize: 100 228 | iOSLaunchScreenCustomXibPath: 229 | iOSLaunchScreeniPadType: 0 230 | iOSLaunchScreeniPadImage: {fileID: 0} 231 | iOSLaunchScreeniPadBackgroundColor: 232 | serializedVersion: 2 233 | rgba: 0 234 | iOSLaunchScreeniPadFillPct: 100 235 | iOSLaunchScreeniPadSize: 100 236 | iOSLaunchScreeniPadCustomXibPath: 237 | iOSUseLaunchScreenStoryboard: 0 238 | iOSLaunchScreenCustomStoryboardPath: 239 | iOSDeviceRequirements: [] 240 | iOSURLSchemes: [] 241 | iOSBackgroundModes: 0 242 | iOSMetalForceHardShadows: 0 243 | metalEditorSupport: 1 244 | metalAPIValidation: 1 245 | iOSRenderExtraFrameOnPause: 1 246 | appleDeveloperTeamID: 247 | iOSManualSigningProvisioningProfileID: 248 | tvOSManualSigningProvisioningProfileID: 249 | iOSManualSigningProvisioningProfileType: 0 250 | tvOSManualSigningProvisioningProfileType: 0 251 | appleEnableAutomaticSigning: 0 252 | iOSRequireARKit: 0 253 | iOSAutomaticallyDetectAndAddCapabilities: 1 254 | appleEnableProMotion: 0 255 | clonedFromGUID: f435ec5a0d8f64af890b32a23289bc59 256 | templatePackageId: 257 | templateDefaultScene: 258 | AndroidTargetArchitectures: 5 259 | AndroidSplashScreenScale: 0 260 | androidSplashScreen: {fileID: 0} 261 | AndroidKeystoreName: '{inproject}: ' 262 | AndroidKeyaliasName: 263 | AndroidBuildApkPerCpuArchitecture: 0 264 | AndroidTVCompatibility: 1 265 | AndroidIsGame: 1 266 | AndroidEnableTango: 0 267 | androidEnableBanner: 1 268 | androidUseLowAccuracyLocation: 0 269 | androidUseCustomKeystore: 0 270 | m_AndroidBanners: 271 | - width: 320 272 | height: 180 273 | banner: {fileID: 0} 274 | androidGamepadSupportLevel: 0 275 | AndroidValidateAppBundleSize: 1 276 | AndroidAppBundleSizeToValidate: 150 277 | resolutionDialogBanner: {fileID: 0} 278 | m_BuildTargetIcons: [] 279 | m_BuildTargetPlatformIcons: [] 280 | m_BuildTargetBatching: 281 | - m_BuildTarget: Standalone 282 | m_StaticBatching: 1 283 | m_DynamicBatching: 1 284 | m_BuildTargetGraphicsAPIs: 285 | - m_BuildTarget: MacStandaloneSupport 286 | m_APIs: 1000000011000000 287 | m_Automatic: 0 288 | - m_BuildTarget: WindowsStandaloneSupport 289 | m_APIs: 02000000 290 | m_Automatic: 1 291 | m_BuildTargetVRSettings: [] 292 | openGLRequireES31: 0 293 | openGLRequireES31AEP: 0 294 | openGLRequireES32: 0 295 | vuforiaEnabled: 0 296 | m_TemplateCustomTags: {} 297 | mobileMTRendering: 298 | iPhone: 1 299 | tvOS: 1 300 | m_BuildTargetGroupLightmapEncodingQuality: 301 | - m_BuildTarget: Standalone 302 | m_EncodingQuality: 1 303 | - m_BuildTarget: XboxOne 304 | m_EncodingQuality: 1 305 | - m_BuildTarget: PS4 306 | m_EncodingQuality: 1 307 | m_BuildTargetGroupLightmapSettings: [] 308 | playModeTestRunnerEnabled: 0 309 | runPlayModeTestAsEditModeTest: 0 310 | actionOnDotNetUnhandledException: 1 311 | enableInternalProfiler: 0 312 | logObjCUncaughtExceptions: 1 313 | enableCrashReportAPI: 0 314 | cameraUsageDescription: 315 | locationUsageDescription: 316 | microphoneUsageDescription: 317 | switchNetLibKey: 318 | switchSocketMemoryPoolSize: 6144 319 | switchSocketAllocatorPoolSize: 128 320 | switchSocketConcurrencyLimit: 14 321 | switchScreenResolutionBehavior: 2 322 | switchUseCPUProfiler: 0 323 | switchApplicationID: 0x0005000C10000001 324 | switchNSODependencies: 325 | switchTitleNames_0: 326 | switchTitleNames_1: 327 | switchTitleNames_2: 328 | switchTitleNames_3: 329 | switchTitleNames_4: 330 | switchTitleNames_5: 331 | switchTitleNames_6: 332 | switchTitleNames_7: 333 | switchTitleNames_8: 334 | switchTitleNames_9: 335 | switchTitleNames_10: 336 | switchTitleNames_11: 337 | switchTitleNames_12: 338 | switchTitleNames_13: 339 | switchTitleNames_14: 340 | switchPublisherNames_0: 341 | switchPublisherNames_1: 342 | switchPublisherNames_2: 343 | switchPublisherNames_3: 344 | switchPublisherNames_4: 345 | switchPublisherNames_5: 346 | switchPublisherNames_6: 347 | switchPublisherNames_7: 348 | switchPublisherNames_8: 349 | switchPublisherNames_9: 350 | switchPublisherNames_10: 351 | switchPublisherNames_11: 352 | switchPublisherNames_12: 353 | switchPublisherNames_13: 354 | switchPublisherNames_14: 355 | switchIcons_0: {fileID: 0} 356 | switchIcons_1: {fileID: 0} 357 | switchIcons_2: {fileID: 0} 358 | switchIcons_3: {fileID: 0} 359 | switchIcons_4: {fileID: 0} 360 | switchIcons_5: {fileID: 0} 361 | switchIcons_6: {fileID: 0} 362 | switchIcons_7: {fileID: 0} 363 | switchIcons_8: {fileID: 0} 364 | switchIcons_9: {fileID: 0} 365 | switchIcons_10: {fileID: 0} 366 | switchIcons_11: {fileID: 0} 367 | switchIcons_12: {fileID: 0} 368 | switchIcons_13: {fileID: 0} 369 | switchIcons_14: {fileID: 0} 370 | switchSmallIcons_0: {fileID: 0} 371 | switchSmallIcons_1: {fileID: 0} 372 | switchSmallIcons_2: {fileID: 0} 373 | switchSmallIcons_3: {fileID: 0} 374 | switchSmallIcons_4: {fileID: 0} 375 | switchSmallIcons_5: {fileID: 0} 376 | switchSmallIcons_6: {fileID: 0} 377 | switchSmallIcons_7: {fileID: 0} 378 | switchSmallIcons_8: {fileID: 0} 379 | switchSmallIcons_9: {fileID: 0} 380 | switchSmallIcons_10: {fileID: 0} 381 | switchSmallIcons_11: {fileID: 0} 382 | switchSmallIcons_12: {fileID: 0} 383 | switchSmallIcons_13: {fileID: 0} 384 | switchSmallIcons_14: {fileID: 0} 385 | switchManualHTML: 386 | switchAccessibleURLs: 387 | switchLegalInformation: 388 | switchMainThreadStackSize: 1048576 389 | switchPresenceGroupId: 0x0005000C10000001 390 | switchLogoHandling: 0 391 | switchReleaseVersion: 0 392 | switchDisplayVersion: 1.0.0 393 | switchStartupUserAccount: 0 394 | switchTouchScreenUsage: 0 395 | switchSupportedLanguagesMask: 0 396 | switchLogoType: 0 397 | switchApplicationErrorCodeCategory: 398 | switchUserAccountSaveDataSize: 0 399 | switchUserAccountSaveDataJournalSize: 0 400 | switchApplicationAttribute: 0 401 | switchCardSpecSize: 4 402 | switchCardSpecClock: 25 403 | switchRatingsMask: 0 404 | switchRatingsInt_0: 0 405 | switchRatingsInt_1: 0 406 | switchRatingsInt_2: 0 407 | switchRatingsInt_3: 0 408 | switchRatingsInt_4: 0 409 | switchRatingsInt_5: 0 410 | switchRatingsInt_6: 0 411 | switchRatingsInt_7: 0 412 | switchRatingsInt_8: 0 413 | switchRatingsInt_9: 0 414 | switchRatingsInt_10: 0 415 | switchRatingsInt_11: 0 416 | switchLocalCommunicationIds_0: 0x0005000C10000001 417 | switchLocalCommunicationIds_1: 418 | switchLocalCommunicationIds_2: 419 | switchLocalCommunicationIds_3: 420 | switchLocalCommunicationIds_4: 421 | switchLocalCommunicationIds_5: 422 | switchLocalCommunicationIds_6: 423 | switchLocalCommunicationIds_7: 424 | switchParentalControl: 0 425 | switchAllowsScreenshot: 1 426 | switchAllowsVideoCapturing: 1 427 | switchAllowsRuntimeAddOnContentInstall: 0 428 | switchDataLossConfirmation: 0 429 | switchUserAccountLockEnabled: 0 430 | switchSystemResourceMemory: 16777216 431 | switchSupportedNpadStyles: 3 432 | switchNativeFsCacheSize: 32 433 | switchIsHoldTypeHorizontal: 0 434 | switchSupportedNpadCount: 8 435 | switchSocketConfigEnabled: 0 436 | switchTcpInitialSendBufferSize: 32 437 | switchTcpInitialReceiveBufferSize: 64 438 | switchTcpAutoSendBufferSizeMax: 256 439 | switchTcpAutoReceiveBufferSizeMax: 256 440 | switchUdpSendBufferSize: 9 441 | switchUdpReceiveBufferSize: 42 442 | switchSocketBufferEfficiency: 4 443 | switchSocketInitializeEnabled: 1 444 | switchNetworkInterfaceManagerInitializeEnabled: 1 445 | switchPlayerConnectionEnabled: 1 446 | ps4NPAgeRating: 12 447 | ps4NPTitleSecret: 448 | ps4NPTrophyPackPath: 449 | ps4ParentalLevel: 1 450 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 451 | ps4Category: 0 452 | ps4MasterVersion: 01.00 453 | ps4AppVersion: 01.00 454 | ps4AppType: 0 455 | ps4ParamSfxPath: 456 | ps4VideoOutPixelFormat: 0 457 | ps4VideoOutInitialWidth: 1920 458 | ps4VideoOutBaseModeInitialWidth: 1920 459 | ps4VideoOutReprojectionRate: 120 460 | ps4PronunciationXMLPath: 461 | ps4PronunciationSIGPath: 462 | ps4BackgroundImagePath: 463 | ps4StartupImagePath: 464 | ps4StartupImagesFolder: 465 | ps4IconImagesFolder: 466 | ps4SaveDataImagePath: 467 | ps4SdkOverride: 468 | ps4BGMPath: 469 | ps4ShareFilePath: 470 | ps4ShareOverlayImagePath: 471 | ps4PrivacyGuardImagePath: 472 | ps4NPtitleDatPath: 473 | ps4RemotePlayKeyAssignment: -1 474 | ps4RemotePlayKeyMappingDir: 475 | ps4PlayTogetherPlayerCount: 0 476 | ps4EnterButtonAssignment: 1 477 | ps4ApplicationParam1: 0 478 | ps4ApplicationParam2: 0 479 | ps4ApplicationParam3: 0 480 | ps4ApplicationParam4: 0 481 | ps4DownloadDataSize: 0 482 | ps4GarlicHeapSize: 2048 483 | ps4ProGarlicHeapSize: 2560 484 | playerPrefsMaxSize: 32768 485 | ps4Passcode: 5PN2qmWqBlQ9wQj99nsQzldVI5ZuGXbE 486 | ps4pnSessions: 1 487 | ps4pnPresence: 1 488 | ps4pnFriends: 1 489 | ps4pnGameCustomData: 1 490 | playerPrefsSupport: 0 491 | enableApplicationExit: 0 492 | resetTempFolder: 1 493 | restrictedAudioUsageRights: 0 494 | ps4UseResolutionFallback: 0 495 | ps4ReprojectionSupport: 0 496 | ps4UseAudio3dBackend: 0 497 | ps4SocialScreenEnabled: 0 498 | ps4ScriptOptimizationLevel: 3 499 | ps4Audio3dVirtualSpeakerCount: 14 500 | ps4attribCpuUsage: 0 501 | ps4PatchPkgPath: 502 | ps4PatchLatestPkgPath: 503 | ps4PatchChangeinfoPath: 504 | ps4PatchDayOne: 0 505 | ps4attribUserManagement: 0 506 | ps4attribMoveSupport: 0 507 | ps4attrib3DSupport: 0 508 | ps4attribShareSupport: 0 509 | ps4attribExclusiveVR: 0 510 | ps4disableAutoHideSplash: 0 511 | ps4videoRecordingFeaturesUsed: 0 512 | ps4contentSearchFeaturesUsed: 0 513 | ps4attribEyeToEyeDistanceSettingVR: 0 514 | ps4IncludedModules: [] 515 | monoEnv: 516 | splashScreenBackgroundSourceLandscape: {fileID: 0} 517 | splashScreenBackgroundSourcePortrait: {fileID: 0} 518 | blurSplashScreenBackground: 1 519 | spritePackerPolicy: 520 | webGLMemorySize: 256 521 | webGLExceptionSupport: 1 522 | webGLNameFilesAsHashes: 0 523 | webGLDataCaching: 0 524 | webGLDebugSymbols: 0 525 | webGLEmscriptenArgs: 526 | webGLModulesDirectory: 527 | webGLTemplate: APPLICATION:Default 528 | webGLAnalyzeBuildSize: 0 529 | webGLUseEmbeddedResources: 0 530 | webGLCompressionFormat: 1 531 | webGLLinkerTarget: 0 532 | webGLThreadsSupport: 0 533 | webGLWasmStreaming: 0 534 | scriptingDefineSymbols: 535 | 1: UNITY_POST_PROCESSING_STACK_V1;UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 536 | 4: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 537 | 7: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 538 | 13: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 539 | 14: UNITY_POST_PROCESSING_STACK_V2 540 | 17: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 541 | 18: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 542 | 19: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 543 | 20: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 544 | 21: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 545 | 22: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 546 | 23: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 547 | 24: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 548 | 25: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 549 | 26: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 550 | 27: UNITY_POST_PROCESSING_STACK_V2;PROBUILDER_FBX_ENABLED 551 | 28: UNITY_POST_PROCESSING_STACK_V2 552 | 29: UNITY_POST_PROCESSING_STACK_V2 553 | platformArchitecture: {} 554 | scriptingBackend: {} 555 | il2cppCompilerConfiguration: {} 556 | managedStrippingLevel: {} 557 | incrementalIl2cppBuild: {} 558 | allowUnsafeCode: 0 559 | additionalIl2CppArgs: 560 | scriptingRuntimeVersion: 1 561 | gcIncremental: 0 562 | gcWBarrierValidation: 0 563 | apiCompatibilityLevelPerPlatform: 564 | Standalone: 6 565 | m_RenderingPath: 1 566 | m_MobileRenderingPath: 1 567 | metroPackageName: Platformer3DClient 568 | metroPackageVersion: 569 | metroCertificatePath: 570 | metroCertificatePassword: 571 | metroCertificateSubject: 572 | metroCertificateIssuer: 573 | metroCertificateNotAfter: 0000000000000000 574 | metroApplicationDescription: Platformer3DClient 575 | wsaImages: {} 576 | metroTileShortName: 577 | metroTileShowName: 0 578 | metroMediumTileShowName: 0 579 | metroLargeTileShowName: 0 580 | metroWideTileShowName: 0 581 | metroSupportStreamingInstall: 0 582 | metroLastRequiredScene: 0 583 | metroDefaultTileSize: 1 584 | metroTileForegroundText: 2 585 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 586 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 587 | a: 1} 588 | metroSplashScreenUseBackgroundColor: 0 589 | platformCapabilities: {} 590 | metroTargetDeviceFamilies: {} 591 | metroFTAName: 592 | metroFTAFileTypes: [] 593 | metroProtocolName: 594 | XboxOneProductId: 595 | XboxOneUpdateKey: 596 | XboxOneSandboxId: 597 | XboxOneContentId: 598 | XboxOneTitleId: 599 | XboxOneSCId: 600 | XboxOneGameOsOverridePath: 601 | XboxOnePackagingOverridePath: 602 | XboxOneAppManifestOverridePath: 603 | XboxOneVersion: 1.0.0.0 604 | XboxOnePackageEncryption: 0 605 | XboxOnePackageUpdateGranularity: 2 606 | XboxOneDescription: 607 | XboxOneLanguage: 608 | - enus 609 | XboxOneCapability: [] 610 | XboxOneGameRating: {} 611 | XboxOneIsContentPackage: 0 612 | XboxOneEnableGPUVariability: 0 613 | XboxOneSockets: {} 614 | XboxOneSplashScreen: {fileID: 0} 615 | XboxOneAllowedProductIds: [] 616 | XboxOnePersistentLocalStorageSize: 0 617 | XboxOneXTitleMemory: 8 618 | xboxOneScriptCompiler: 1 619 | XboxOneOverrideIdentityName: 620 | vrEditorSettings: 621 | daydream: 622 | daydreamIconForeground: {fileID: 0} 623 | daydreamIconBackground: {fileID: 0} 624 | cloudServicesEnabled: 625 | Build: 1 626 | UNet: 1 627 | luminIcon: 628 | m_Name: 629 | m_ModelFolderPath: 630 | m_PortalFolderPath: 631 | luminCert: 632 | m_CertPath: 633 | m_SignPackage: 1 634 | luminIsChannelApp: 0 635 | luminVersion: 636 | m_VersionCode: 1 637 | m_VersionName: 638 | facebookSdkVersion: 7.9.1 639 | facebookAppId: 640 | facebookCookies: 1 641 | facebookLogging: 1 642 | facebookStatus: 1 643 | facebookXfbml: 0 644 | facebookFrictionlessRequests: 1 645 | apiCompatibilityLevel: 6 646 | cloudProjectId: 647 | framebufferDepthMemorylessMode: 0 648 | projectName: Platformer3DClient 649 | organizationId: 650 | cloudEnabled: 0 651 | enableNativePlatformBackendsForNewInputSystem: 0 652 | disableOldInputManagerSupport: 0 653 | legacyClampBlendShapeWeights: 1 654 | --------------------------------------------------------------------------------