From d61d2f19edde6436bc9317449ec0a9ee16aaa0b2 Mon Sep 17 00:00:00 2001 From: Reinier Vens Date: Wed, 13 Jul 2022 04:15:20 +0100 Subject: [PATCH] Raymarching Cleanup Removed redundant code from raymarching implementation Moved last remaining raymarching variable (Extinction) to environment settings --- Assets/Plugins/AtmosphereScattering.meta | 8 - .../Plugins/AtmosphereScattering/Example.meta | 8 - .../Example/New Scene.unity | 544 ---------------- .../Example/New Scene.unity.meta | 7 - .../Plugins/AtmosphereScattering/Scripts.meta | 8 - .../Scripts/AerialPerspective.cs | 92 --- .../Scripts/AerialPerspective.cs.meta | 11 - .../Scripts/AtmLutHelper.cs | 568 ----------------- .../Scripts/AtmLutHelper.cs.meta | 11 - .../Scripts/AtmosphereConfig.cs | 111 ---- .../Scripts/AtmosphereConfig.cs.meta | 11 - .../Scripts/AtmosphereScatteringLutManager.cs | 252 -------- .../AtmosphereScatteringLutManager.cs.meta | 14 - .../Scripts/CameraControl.cs | 46 -- .../Scripts/CameraControl.cs.meta | 13 - .../Scripts/CameraVolumeHelper.cs | 16 - .../Scripts/CameraVolumeHelper.cs.meta | 11 - .../Scripts/SunIntensityController.cs | 36 -- .../Scripts/SunIntensityController.cs.meta | 11 - .../Plugins/AtmosphereScattering/Shaders.meta | 8 - .../Shaders/AerialPerspective.shader | 100 --- .../Shaders/AerialPerspective.shader.meta | 8 - .../Shaders/AerialPerspectiveHelper.cginc | 148 ----- .../AerialPerspectiveHelper.cginc.meta | 10 - .../AtmosphereScatteringComputeShader.compute | 353 ----------- ...sphereScatteringComputeShader.compute.meta | 8 - .../AtmosphereScattering/Shaders/Common.cginc | 276 -------- .../Shaders/Common.cginc.meta | 10 - .../Shaders/GroundHelper.cginc | 125 ---- .../Shaders/GroundHelper.cginc.meta | 10 - .../Shaders/MultipleScatteringHelper.cginc | 209 ------ .../MultipleScatteringHelper.cginc.meta | 10 - .../Shaders/SingleScatteringHelper.cginc | 245 -------- .../Shaders/SingleScatteringHelper.cginc.meta | 10 - .../Shaders/SkyboxRendering.shader | 108 ---- .../Shaders/SkyboxRendering.shader.meta | 10 - .../Shaders/TransmittanceHelper.cginc | 144 ----- .../Shaders/TransmittanceHelper.cginc.meta | 10 - .../Shaders/VolumeTexturePreview.shader | 58 -- .../Shaders/VolumeTexturePreview.shader.meta | 8 - .../AtmosphereScattering/Transparent.meta | 8 - .../Transparent/CompareScene.unity | 526 ---------------- .../Transparent/CompareScene.unity.meta | 7 - .../Transparent/Opaque.mat | 76 --- .../Transparent/Opaque.mat.meta | 8 - .../Transparent/Transparent-Ap.mat | 76 --- .../Transparent/Transparent-Ap.mat.meta | 8 - .../Transparent/TransparentExample.shader | 100 --- .../TransparentExample.shader.meta | 8 - .../{VolumeCloud/Scripts => }/Playdead.meta | 0 .../Scripts => }/Playdead/EffectBase.cs | 0 .../Scripts => }/Playdead/EffectBase.cs.meta | 0 .../Scripts => }/Playdead/Extensions.cs | 0 .../Scripts => }/Playdead/Extensions.cs.meta | 0 .../Scripts => }/Playdead/LICENSE.txt | 0 .../Scripts => }/Playdead/LICENSE.txt.meta | 0 Assets/Plugins/VolumeCloud.meta | 8 - Assets/Plugins/VolumeCloud/Editor.meta | 10 - .../Plugins/VolumeCloud/Editor/Config.asset | 3 - .../VolumeCloud/Editor/Config.asset.meta | 10 - .../Editor/VolumeCloudWindowEditor.cs | 141 ----- .../Editor/VolumeCloudWindowEditor.cs.meta | 13 - Assets/Plugins/VolumeCloud/Example.meta | 10 - .../VolumeCloud/Example/Screenshot1.meta | 8 - .../Example/Screenshot1/Screenshot1.unity | 594 ------------------ .../Screenshot1/Screenshot1.unity.meta | 9 - .../Screenshot1/Screenshot1_Profiles.meta | 8 - .../AtmManager Profile.asset | 3 - .../AtmManager Profile.asset.meta | 8 - .../VolumeCloud/Example/Screenshot2.meta | 8 - .../Example/Screenshot2/Config.asset | 3 - .../Example/Screenshot2/Config.asset.meta | 10 - .../Example/Screenshot2/Screenshot2.unity | 329 ---------- .../Screenshot2/Screenshot2.unity.meta | 9 - .../VolumeCloud/Example/Screenshot3.meta | 8 - .../Example/Screenshot3/Config.asset | 3 - .../Example/Screenshot3/Config.asset.meta | 10 - .../Example/Screenshot3/Screenshot3.unity | 303 --------- .../Screenshot3/Screenshot3.unity.meta | 9 - .../VolumeCloud/Example/Screenshot4.meta | 8 - .../Example/Screenshot4/Screenshot4.unity | 383 ----------- .../Screenshot4/Screenshot4.unity.meta | 9 - Assets/Plugins/VolumeCloud/Scripts.meta | 10 - .../VolumeCloud/Scripts/MouseMovement.cs | 16 - .../VolumeCloud/Scripts/MouseMovement.cs.meta | 13 - .../VolumeCloud/Scripts/NoiseGenerator.meta | 10 - .../NoiseGenerator/BaseNoiseGenerator.cs | 10 - .../NoiseGenerator/BaseNoiseGenerator.cs.meta | 13 - .../NoiseGenerator/CurlNoiseGenerator.cs | 35 -- .../NoiseGenerator/CurlNoiseGenerator.cs.meta | 13 - .../NoiseGenerator/CustomTexGenerator.cs | 20 - .../NoiseGenerator/CustomTexGenerator.cs.meta | 13 - .../NoiseGenerator/First3DTexGenerator.cs | 45 -- .../First3DTexGenerator.cs.meta | 13 - .../NoiseGenerator/IBaseNoiseGenerator.cs | 23 - .../IBaseNoiseGenerator.cs.meta | 13 - .../NoiseGenerator/PerlinNoiseGenerator.cs | 97 --- .../PerlinNoiseGenerator.cs.meta | 13 - .../Scripts/NoiseGenerator/Utils.cs | 39 -- .../Scripts/NoiseGenerator/Utils.cs.meta | 13 - .../NoiseGenerator/WorleyNoiseGenerator.cs | 59 -- .../WorleyNoiseGenerator.cs.meta | 13 - .../Scripts/VolumeCloudConfiguration.cs | 146 ----- .../Scripts/VolumeCloudConfiguration.cs.meta | 16 - .../Scripts/VolumeCloudRenderer.cs | 241 ------- .../VolumeCloudWindowConfigurations.cs | 15 - .../VolumeCloudWindowConfigurations.cs.meta | 13 - Assets/Plugins/VolumeCloud/Shaders.meta | 10 - .../Shaders/AerialPerspectiveHelper.cginc | 147 ----- .../AerialPerspectiveHelper.cginc.meta | 10 - .../VolumeCloud/Shaders/BilateralBlur.shader | 526 ---------------- .../Shaders/BilateralBlur.shader.meta | 10 - .../Shaders/CloudHeightPreprocess.compute | 30 - .../CloudHeightPreprocess.compute.meta | 8 - .../Shaders/CloudHierarchicalRaymarch.cginc | 116 ---- .../CloudHierarchicalRaymarch.cginc.meta | 8 - .../Shaders/HeightMapDownsample.shader | 98 --- .../Shaders/HeightMapDownsample.shader.meta | 8 - Assets/Plugins/VolumeCloud/Textures.meta | 10 - .../VolumeCloud/Textures/BaseNoise.asset | 3 - .../VolumeCloud/Textures/BaseNoise.asset.meta | 10 - .../Plugins/VolumeCloud/Textures/Cloudy.psd | 3 - .../VolumeCloud/Textures/Cloudy.psd.meta | 96 --- .../VolumeCloud/Textures/CurlNoise.asset | 3 - .../VolumeCloud/Textures/CurlNoise.asset.meta | 10 - .../VolumeCloud/Textures/DetailNoise.asset | 3 - .../Textures/DetailNoise.asset.meta | 10 - .../VolumeCloud/Textures/HeightDensityMap.png | 3 - .../Textures/HeightDensityMap.png.meta | 86 --- .../VolumeCloud/Textures/Screenshot1.psd | 3 - .../VolumeCloud/Textures/Screenshot1.psd.meta | 86 --- .../VolumeCloud/Textures/SingleHugeCloud.psd | 3 - .../Textures/SingleHugeCloud.psd.meta | 76 --- Assets/Plugins/VolumeCloud/Textures/Test.psd | 3 - .../VolumeCloud/Textures/Test.psd.meta | 96 --- Assets/Resources/Settings.asset | 4 +- Assets/Scenes/ARPG.unity | 17 +- Assets/Scenes/Main Menu.unity | 2 +- Assets/Scripts/ServerShared/Environment.cs | 1 + .../Zone Display/VolumeCloudRenderer.cs | 159 +++++ .../Zone Display}/VolumeCloudRenderer.cs.meta | 0 Assets/Scripts/Zone Display/VolumeSampling.cs | 15 +- .../Raymarching}/CloudNormalRaymarch.cginc | 0 .../CloudNormalRaymarch.cginc.meta | 0 .../Raymarching}/CloudShader.shader | 85 +-- .../Raymarching}/CloudShader.shader.meta | 0 .../Raymarching}/CloudShaderHelper.cginc | 54 -- .../Raymarching}/CloudShaderHelper.cginc.meta | 0 GameData/PlayerSettings.msgpack | 2 +- UserSettings/EditorUserSettings.asset | 2 +- 150 files changed, 187 insertions(+), 8921 deletions(-) delete mode 100644 Assets/Plugins/AtmosphereScattering.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Example.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Example/New Scene.unity delete mode 100644 Assets/Plugins/AtmosphereScattering/Example/New Scene.unity.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs delete mode 100644 Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader delete mode 100644 Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat.meta delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader delete mode 100644 Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader.meta rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead.meta (100%) rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead/EffectBase.cs (100%) rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead/EffectBase.cs.meta (100%) rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead/Extensions.cs (100%) rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead/Extensions.cs.meta (100%) rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead/LICENSE.txt (100%) rename Assets/Plugins/{VolumeCloud/Scripts => }/Playdead/LICENSE.txt.meta (100%) delete mode 100644 Assets/Plugins/VolumeCloud.meta delete mode 100644 Assets/Plugins/VolumeCloud/Editor.meta delete mode 100644 Assets/Plugins/VolumeCloud/Editor/Config.asset delete mode 100644 Assets/Plugins/VolumeCloud/Editor/Config.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs delete mode 100644 Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot1.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot2.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot3.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot4.meta delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity delete mode 100644 Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/VolumeCloudRenderer.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs delete mode 100644 Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs.meta delete mode 100644 Assets/Plugins/VolumeCloud/Shaders.meta delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc.meta delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader.meta delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute.meta delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc.meta delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader delete mode 100644 Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset delete mode 100644 Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/Cloudy.psd delete mode 100644 Assets/Plugins/VolumeCloud/Textures/Cloudy.psd.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset delete mode 100644 Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset delete mode 100644 Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png delete mode 100644 Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd delete mode 100644 Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd delete mode 100644 Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd.meta delete mode 100644 Assets/Plugins/VolumeCloud/Textures/Test.psd delete mode 100644 Assets/Plugins/VolumeCloud/Textures/Test.psd.meta create mode 100644 Assets/Scripts/Zone Display/VolumeCloudRenderer.cs rename Assets/{Plugins/VolumeCloud/Scripts => Scripts/Zone Display}/VolumeCloudRenderer.cs.meta (100%) rename Assets/{Plugins/VolumeCloud/Shaders => Shaders/Raymarching}/CloudNormalRaymarch.cginc (100%) rename Assets/{Plugins/VolumeCloud/Shaders => Shaders/Raymarching}/CloudNormalRaymarch.cginc.meta (100%) rename Assets/{Plugins/VolumeCloud/Shaders => Shaders/Raymarching}/CloudShader.shader (73%) rename Assets/{Plugins/VolumeCloud/Shaders => Shaders/Raymarching}/CloudShader.shader.meta (100%) rename Assets/{Plugins/VolumeCloud/Shaders => Shaders/Raymarching}/CloudShaderHelper.cginc (73%) rename Assets/{Plugins/VolumeCloud/Shaders => Shaders/Raymarching}/CloudShaderHelper.cginc.meta (100%) diff --git a/Assets/Plugins/AtmosphereScattering.meta b/Assets/Plugins/AtmosphereScattering.meta deleted file mode 100644 index e278c94ff..000000000 --- a/Assets/Plugins/AtmosphereScattering.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4a05bb7e252ad90438c47651bf01d639 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Example.meta b/Assets/Plugins/AtmosphereScattering/Example.meta deleted file mode 100644 index f57919432..000000000 --- a/Assets/Plugins/AtmosphereScattering/Example.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1160bd9542584c24f9b140d6356fd375 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Example/New Scene.unity b/Assets/Plugins/AtmosphereScattering/Example/New Scene.unity deleted file mode 100644 index 454fbabb1..000000000 --- a/Assets/Plugins/AtmosphereScattering/Example/New Scene.unity +++ /dev/null @@ -1,544 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 1147614136} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.056427088, g: 0.12670922, b: 0.296874, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &7102893 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 7102896} - - component: {fileID: 7102895} - - component: {fileID: 7102894} - - component: {fileID: 7102898} - - component: {fileID: 7102897} - - component: {fileID: 7102899} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &7102894 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 ---- !u!20 &7102895 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 10000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &7102896 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -172.5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &7102897 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3} - m_Name: - m_EditorClassIdentifier: - profile: {fileID: 0} ---- !u!114 &7102898 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 45d85419f2e23c540999c1a1fee6ed90, type: 3} - m_Name: - m_EditorClassIdentifier: - distance: 10 - center: {x: 0, y: 0, z: 0} - scale: 1 - distanceSpeed: 0.1 - rotationSpeed: 0.1 ---- !u!114 &7102899 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b535dacf702e20c4b9ef528e42081835, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTexSize: {x: 128, y: 128, z: 32} ---- !u!1 &74323546 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 74323548} - - component: {fileID: 74323547} - - component: {fileID: 74323549} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &74323547 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 74323546} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &74323548 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 74323546} - m_LocalRotation: {x: -0.03515344, y: -0.86159647, z: 0.50277907, w: 0.060241405} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 59.559002, y: -164.05801, z: 13.835001} ---- !u!114 &74323549 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 74323546} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325c269146dc2ac49b190f730a961573, type: 3} - m_Name: - m_EditorClassIdentifier: - basePosition: {x: 0, y: 50, z: 0} ---- !u!1 &297555710 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 297555712} - - component: {fileID: 297555711} - m_Layer: 0 - m_Name: GameObject - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &297555711 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 297555710} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e16dd2ddbdfa7ea4f87a3cfb032ffd0f, type: 3} - m_Name: - m_EditorClassIdentifier: - progressiveUpdate: 1 - computeShader: {fileID: 7200000, guid: 2d4396a54b390d742b84d4bb4a122e54, type: 3} - outputDebug: 0 - lutConfig: - transmittanceSize: {x: 256, y: 128} - scatteringSize: {x: 32, y: 128, z: 32} - irradianceSize: {x: 64, y: 32} - cameraVolumeSize: {x: 128, y: 128, z: 32} - atmosphereConfig: {fileID: 11400000, guid: 8e73e89daf00b8447b2410427953df25, type: 2} ---- !u!4 &297555712 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 297555710} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2.736024, y: 2.8123064, z: -0.70711327} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!21 &1147614136 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Skybox/AtmosphereScatteringPrecomputed - m_Shader: {fileID: 4800000, guid: e2088dd19a71d1244976cd0de1ff68a7, type: 3} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: [] - m_Floats: [] - m_Colors: [] ---- !u!1 &1729729729 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 1996505793} - serializedVersion: 5 - m_Component: - - component: {fileID: 1729729730} - m_Layer: 0 - m_Name: Missing Prefab - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1729729730 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 1996505793} - m_GameObject: {fileID: 1729729729} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1764631964 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1764631968} - - component: {fileID: 1764631967} - - component: {fileID: 1764631966} - - component: {fileID: 1764631965} - m_Layer: 0 - m_Name: Cube - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1764631965 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 10302, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!65 &1764631966 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1764631967 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1764631968 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -969, y: 1, z: 7922} - m_LocalScale: {x: 2000, y: 2000, z: 2000} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &1996505793 -Prefab: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_RootOrder - value: 4 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalScale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalScale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 474104, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - propertyPath: m_LocalScale.z - value: 1 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_ParentPrefab: {fileID: 100100000, guid: d5335c8f26bfe754b960f5d390edcb98, type: 2} - m_IsPrefabParent: 0 diff --git a/Assets/Plugins/AtmosphereScattering/Example/New Scene.unity.meta b/Assets/Plugins/AtmosphereScattering/Example/New Scene.unity.meta deleted file mode 100644 index 73121f5f7..000000000 --- a/Assets/Plugins/AtmosphereScattering/Example/New Scene.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: dacf033ff4744d446a53da2400fe27bc -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts.meta b/Assets/Plugins/AtmosphereScattering/Scripts.meta deleted file mode 100644 index 96633224e..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 11b97a229abf2df46a16432582b9f95d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs b/Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs deleted file mode 100644 index bdfe9da23..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.AtmosphereScattering { - - public class AerialPerspective : MonoBehaviour { - private new Camera camera; - private void Start() { - camera = GetComponent(); - if ((camera.depthTextureMode & DepthTextureMode.Depth) == 0) - camera.depthTextureMode |= DepthTextureMode.Depth; - material = new Material(Shader.Find("Hidden/Yangrc/AerialPerspective")); - } - - private Material material; - - [ImageEffectOpaque] - private void OnRenderImage(RenderTexture source, RenderTexture destination) { - material.SetVector("_ProjectionExtents", camera.GetProjectionExtents()); - Graphics.Blit(source, destination, material, 0); - } - - private void Update() { - //Control sun intensity. - } - - private RenderTexture transmittanceVolume; - private RenderTexture scatteringVolume; - public Vector3Int volumeTexSize = new Vector3Int(128, 128, 32); - - Vector3[] _FrustumCorners = new Vector3[4]; - //Generate camera volume texture. - private void OnPreRender() { - if (RenderSettings.sun == null) - return; - // get four corners of camera frustom in world space - // bottom left - _FrustumCorners[0] = camera.ViewportToWorldPoint(new Vector3(0, 0, camera.farClipPlane)); - // bottom right - _FrustumCorners[1] = camera.ViewportToWorldPoint(new Vector3(1, 0, camera.farClipPlane)); - // top left - _FrustumCorners[2] = camera.ViewportToWorldPoint(new Vector3(0, 1, camera.farClipPlane)); - // top right - _FrustumCorners[3] = camera.ViewportToWorldPoint(new Vector3(1, 1, camera.farClipPlane)); - - //Render camera volume texture. - var projection_matrix = GL.GetGPUProjectionMatrix(camera.projectionMatrix, false); - AtmLutHelper.CreateCameraAlignedVolumeTexture(ref transmittanceVolume, ref scatteringVolume, volumeTexSize); - AtmLutHelper.UpdateCameraVolume( - transmittanceVolume, - scatteringVolume, - volumeTexSize, - transform.position, - -RenderSettings.sun.transform.forward, - _FrustumCorners, - new Vector2(camera.nearClipPlane, camera.farClipPlane) - ); - - //Set it. - Shader.SetGlobalTexture("_CameraVolumeTransmittance", transmittanceVolume); - Shader.SetGlobalTexture("_CameraVolumeScattering", scatteringVolume); - var vp_matrix = projection_matrix * camera.worldToCameraMatrix; - Shader.SetGlobalMatrix("_Camera_VP", vp_matrix); - } - - private void OnDisable() { - Shader.SetGlobalTexture("_CameraVolumeTransmittance", null); - Shader.SetGlobalTexture("_CameraVolumeScattering", null); - } - } - - public static class CameraExtension { - public static Vector4 GetProjectionExtents(this Camera camera, float texelOffsetX, float texelOffsetY) { - if (camera == null) - return Vector4.zero; - - float oneExtentY = camera.orthographic ? camera.orthographicSize : Mathf.Tan(0.5f * Mathf.Deg2Rad * camera.fieldOfView); - float oneExtentX = oneExtentY * camera.aspect; - float texelSizeX = oneExtentX / (0.5f * camera.pixelWidth); - float texelSizeY = oneExtentY / (0.5f * camera.pixelHeight); - float oneJitterX = texelSizeX * texelOffsetX; - float oneJitterY = texelSizeY * texelOffsetY; - - return new Vector4(oneExtentX, oneExtentY, oneJitterX, oneJitterY);// xy = frustum extents at distance 1, zw = jitter at distance 1 - } - - public static Vector4 GetProjectionExtents(this Camera camera) { - return GetProjectionExtents(camera, 0.0f, 0.0f); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs.meta deleted file mode 100644 index ff5b69655..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AerialPerspective.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b535dacf702e20c4b9ef528e42081835 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs b/Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs deleted file mode 100644 index 4d2b51de1..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs +++ /dev/null @@ -1,568 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UnityEngine; -namespace Yangrc.AtmosphereScattering { - - public static class HighResolutionDateTime { - public static bool IsAvailable { get; private set; } - - [DllImport("Kernel32.dll", CallingConvention = CallingConvention.Winapi)] - private static extern void GetSystemTimePreciseAsFileTime(out long filetime); - - public static DateTime UtcNow { - get { - if (!IsAvailable) { - throw new InvalidOperationException( - "High resolution clock isn't available."); - } - - long filetime; - GetSystemTimePreciseAsFileTime(out filetime); - - return DateTime.FromFileTimeUtc(filetime); - } - } - - static HighResolutionDateTime() { - try { - long filetime; - GetSystemTimePreciseAsFileTime(out filetime); - IsAvailable = true; - } catch (EntryPointNotFoundException) { - // Not running Windows 8 or higher. - IsAvailable = false; - } - } - } - - public class ProgressiveLutUpdater { - - public void Cleanup() { - var allTextures = new List { - this.groundIrradianceCombine, - this.multiScatteringCombine, - this.multiScatteringDensity, - - this.singleMie, - this.singleRayleigh, - this.transmittance, - }; - allTextures.AddRange( - this.groundIrradianceTemp); - allTextures.AddRange( - this.multiScatteringTemp); - - for (int i = 0; i < allTextures.Count; i++) { - if (allTextures[i] != null && allTextures[i].IsCreated()) - allTextures[i].Release(); - } - } - - public interface ITimeLogger { - void Log(string itemName); - } - - public AtmosphereConfig atmConfigToUse { get; set; } - public AtmosphereConfig atmConfigUsedToUpdate { get; private set; } - public AtmLutGenerateConfig lutConfig { get; set; } - ITimeLogger logger; - public ProgressiveLutUpdater(AtmosphereConfig atmConfig, AtmLutGenerateConfig lutConfig, ITimeLogger logger = null) { - this.atmConfigToUse = atmConfig; - this.lutConfig = lutConfig; - this.logger = logger; - working = false; - atmConfigUsedToUpdate = ScriptableObject.CreateInstance(); - } - public const int k_MultiScatteringOrderDepth = 4; - - public RenderTexture[] groundIrradianceTemp = new RenderTexture[k_MultiScatteringOrderDepth + 1]; - public RenderTexture multiScatteringDensity; - public RenderTexture[] multiScatteringTemp = new RenderTexture[k_MultiScatteringOrderDepth + 1]; - - public RenderTexture transmittance; - public RenderTexture singleRayleigh, singleMie; - public RenderTexture multiScatteringCombine, groundIrradianceCombine; - internal string name; - - public bool working { get; private set; } - - private void Log(string t) { - if (this.logger != null) - logger.Log(t); - } - - public IEnumerator UpdateCoroutine() { - working = true; - atmConfigUsedToUpdate.CopyDataFrom(atmConfigToUse); - AtmLutHelper.CreateTransmittanceTexture(ref transmittance, lutConfig); - using (new ConvenientStopwatch("Complete Lut update timecost", Log)) { - //Update transmittance. - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - using (new ConvenientStopwatch("Transmittance ", Log)) { - AtmLutHelper.UpdateTransmittance( - transmittance, - lutConfig, - 0.0f, - 1.0f - ); - yield return null; - } - - //Update GroundDirect - using (new ConvenientStopwatch("GroundDirect", Log)) { - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - AtmLutHelper.CreateGroundIrradianceTexture(ref groundIrradianceTemp[0], 0, lutConfig); - AtmLutHelper.UpdateGroundDirectIrradiance(groundIrradianceTemp[0], transmittance, lutConfig, 0.0f, 1.0f); - yield return null; - } - - //Update SingleRayleigh/Mie - using (new ConvenientStopwatch("Single Rayleigh/Mie", Log)) { - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - AtmLutHelper.CreateSingleRayleighMieTexture(ref singleRayleigh, ref singleMie, lutConfig); - AtmLutHelper.UpdateSingleRayleighMie(singleRayleigh, singleMie, transmittance, lutConfig); - yield return null; - } - - AtmLutHelper.CreateMultiScatteringTexture(ref multiScatteringTemp[1], 1, lutConfig); //This texture is not "Meaningful"(Since the 1-st order should be SingleRayleigh and SingleMie, and this tex won't be used in actual computation either), but we need to make an empty one to avoid shader error. - - using (new ConvenientStopwatch("GroundIrradiance 1", Log)) { - //Ground irradiance of 1-st order scattering. - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - AtmLutHelper.CreateGroundIrradianceTexture(ref groundIrradianceTemp[1], 1, lutConfig); - AtmLutHelper.UpdateGroundIrradiance(groundIrradianceTemp[1], singleRayleigh, singleMie, multiScatteringTemp[1], 1, lutConfig, 0.0f, 1.0f); - yield return null; - } - - //Real game start. - AtmLutHelper.CreateMultiScatteringDensityTexture(ref multiScatteringDensity, lutConfig); - - for (int i = 2; i <= k_MultiScatteringOrderDepth; i++) { - using (new ConvenientStopwatch("Multi Scattering Density" + i, Log)) { - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - AtmLutHelper.UpdateMultiScatteringDensity(multiScatteringDensity, transmittance, singleRayleigh, singleMie, multiScatteringTemp[i - 1], groundIrradianceTemp[i - 2], i, lutConfig); - yield return null; - } - - AtmLutHelper.CreateGroundIrradianceTexture(ref groundIrradianceTemp[i], i, lutConfig); - using (new ConvenientStopwatch("Ground Irradiance" + i, Log)) { - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - AtmLutHelper.UpdateGroundIrradiance(groundIrradianceTemp[i], singleRayleigh, singleMie, multiScatteringTemp[i - 1], i - 1, lutConfig); - yield return null; - } - - AtmLutHelper.CreateMultiScatteringTexture(ref multiScatteringTemp[i], i, lutConfig); - using (new ConvenientStopwatch("Multi Scattering " + i, Log)) { - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - AtmLutHelper.UpdateMultiScatteringCombineDensity(multiScatteringTemp[i], transmittance, multiScatteringDensity, lutConfig); - yield return null; - } - } - - //Combine our multiscattering texture. - AtmLutHelper.CreateFinalCombinedTexture(ref multiScatteringCombine, ref groundIrradianceCombine, lutConfig); - AtmLutHelper.ClearFinalCombinedMultiScatter(multiScatteringCombine, lutConfig); - AtmLutHelper.ClearFinalCombinedIrradiance(groundIrradianceCombine, lutConfig); - - AtmLutHelper.ApplyComputeShaderParams(lutConfig, atmConfigUsedToUpdate); - for (int i = 2; i <= k_MultiScatteringOrderDepth; i++) { - AtmLutHelper.UpdateFinalCombinedMultiScatter(multiScatteringCombine, multiScatteringTemp[i], lutConfig); - } - - for (int i = 1; i <= k_MultiScatteringOrderDepth; i++) { - AtmLutHelper.UpdateFinalCombinedIrradiance(groundIrradianceCombine, groundIrradianceTemp[i], lutConfig); - } - } - //All calculations are done. - - /* DON"T RELEASE TEMP TEXTURES HERE, IT WILL CAUSE GRAPHICS GLITCH(FLASHING) WHEN RENDERING SKYBOX. I DON'T KNOW WHY.(2017.4.11f1) */ - /* AND THAT GLITCH COST ME 4 HOURS TO FIND OUT, THANK YOU UNITY */ - /* I guess that after combine dispatch call, the process isn't finished immediately, if we release the textures right now, it will blow up. */ - /* but I tried to wait for a few frame(yield return null), still doesn't work. */ - ////Release all temp textures. They won't be used in the future. - //for (int i = 0; i < groundIrradianceTemp.Length; i++) { - // if (groundIrradianceTemp[i] != null) { - // groundIrradianceTemp[i].Release(); - // groundIrradianceTemp[i] = null; - // } - //} - //for (int i = 0; i < multiScatteringTemp.Length; i++) { - // if (multiScatteringTemp[i] != null) { - // multiScatteringTemp[i].Release(); - // multiScatteringTemp[i] = null; - // } - //} - - //Done! - working = false; - yield break; - } - } - - [System.Serializable] - public class AtmLutGenerateConfig { - public Vector2Int transmittanceSize = new Vector2Int(512, 512); - public Vector3Int scatteringSize = new Vector3Int(32, 32, 128); - public Vector2Int irradianceSize = new Vector2Int(32, 32); - public Vector3Int cameraVolumeSize = new Vector3Int(128, 128, 32); - private static class Keys { - private static readonly int transmittanceSize = Shader.PropertyToID("TransmittanceSize"); - private static readonly int scatteringSize = Shader.PropertyToID("ScatteringSize"); - private static readonly int irradianceSize = Shader.PropertyToID("IrradianceSize"); - } - public void Apply(ComputeShader shader) { - shader.SetInts("TransmittanceSize", transmittanceSize.x, transmittanceSize.y); - shader.SetInts("ScatteringSize", scatteringSize.x, scatteringSize.y, scatteringSize.z); - shader.SetInts("IrradianceSize", irradianceSize.x, irradianceSize.y); - } - } - - public class ConvenientStopwatch : System.IDisposable { - public ConvenientStopwatch(string name, System.Action Log = null) { - this.name = name; - start = HighResolutionDateTime.UtcNow; - this.Log = Log; - } - System.Action Log; - DateTime start; - string name; - public void Dispose() { - var timeSpan = HighResolutionDateTime.UtcNow - start; - if (Log != null) - Log(name + ":" + timeSpan.TotalMilliseconds); - } - } - - public static class AtmLutHelper { - - public static void Init(ComputeShader shader) { - if (computeShader == null) { - AtmLutHelper.computeShader = shader; - SetupKernals(computeShader); - } - } - - public static ComputeShader computeShader; - private static int CalculateTransmittanceLUT; - private static int CalculateSingleScatteringLUT; - private static int CalculateGroundDirectIrradianceLUT; - private static int CalculateGroundIndirectIrradianceLUT; - private static int CalculateMultipleScatteringDensityLUT; - private static int CalculateMultipleScatteringLUT; - private static int SumGroundIrradianceLUT; - private static int SumMultipleScatteringLUT; - private static int ClearCombineGroundIrradianceLUT; - private static int ClearCombineMultipleScatteringLUT; - - private static int CalculateCameraScatteringVolume; - - /// - /// These functions help do all the "SetXXX" stuff. - /// So we can focus on how to generate Luts. - /// - - private static void SetupKernals(ComputeShader computeShader) { - CalculateTransmittanceLUT = computeShader.FindKernel("CalculateTransmittanceLUT"); - CalculateSingleScatteringLUT = computeShader.FindKernel("CalculateSingleScatteringLUT"); - CalculateGroundDirectIrradianceLUT = computeShader.FindKernel("CalculateGroundDirectIrradianceLUT"); - CalculateGroundIndirectIrradianceLUT = computeShader.FindKernel("CalculateGroundIndirectIrradianceLUT"); - CalculateMultipleScatteringDensityLUT = computeShader.FindKernel("CalculateMultipleScatteringDensityLUT"); - CalculateMultipleScatteringLUT = computeShader.FindKernel("CalculateMultipleScatteringLUT"); - SumGroundIrradianceLUT = computeShader.FindKernel("CombineGroundIrradianceLUT"); - SumMultipleScatteringLUT = computeShader.FindKernel("CombineMultipleScatteringLUT"); - ClearCombineGroundIrradianceLUT = computeShader.FindKernel("ClearCombineGroundIrradianceLUT"); - ClearCombineMultipleScatteringLUT = computeShader.FindKernel("ClearCombineMultipleScatteringLUT"); - - CalculateCameraScatteringVolume = computeShader.FindKernel("CalculateCameraScatteringVolume"); - } - - public static void ApplyComputeShaderParams(AtmLutGenerateConfig lutConfig, AtmosphereConfig atmConfig) { - lutConfig.Apply(computeShader); - atmConfig.Apply(computeShader); - } - - private static void CreateLUT(ref RenderTexture result, string name, int width, int height, int zsize, RenderTextureFormat format, bool forceReplace = false) { - if (result != null) { - if (!forceReplace && result.name == name && result.width == width && result.height == height && result.volumeDepth == zsize && result.format == format) - return; - result.Release(); - } - result = new RenderTexture(width, height, 0, format, RenderTextureReadWrite.Linear); - result.name = name; - result.enableRandomWrite = true; - if (zsize > 0) { - result.dimension = UnityEngine.Rendering.TextureDimension.Tex3D; - result.volumeDepth = zsize; - } else { - result.dimension = UnityEngine.Rendering.TextureDimension.Tex2D; - } - result.filterMode = FilterMode.Bilinear; - result.wrapMode = TextureWrapMode.Clamp; - result.Create(); - } - - private static void NormalizeProgressPointer(float start, float end, int length, out int startInt, out int endInt) { - if (end < start) { - var t = start; - start = end; - end = t; - } - - start = Mathf.Clamp01(start); - end = Mathf.Clamp01(end); - startInt = Mathf.RoundToInt(length * start); - endInt = Mathf.RoundToInt(length * end); - } - - public static void CreateTransmittanceTexture( - ref RenderTexture target, - AtmLutGenerateConfig lutconfig) { - CreateLUT(ref target, "Transmittance", lutconfig.transmittanceSize.x, lutconfig.transmittanceSize.y, 0, RenderTextureFormat.ARGBFloat); - } - - public static void CreateSingleRayleighMieTexture(ref RenderTexture rayleigh, ref RenderTexture mie, AtmLutGenerateConfig lutconfig) { - CreateLUT(ref rayleigh, "SingleMie", lutconfig.scatteringSize.x, lutconfig.scatteringSize.y, lutconfig.scatteringSize.z, RenderTextureFormat.ARGBFloat); - CreateLUT(ref mie, "SingleRayleigh", lutconfig.scatteringSize.x, lutconfig.scatteringSize.y, lutconfig.scatteringSize.z, RenderTextureFormat.ARGBFloat); - } - - public static void CreateGroundIrradianceTexture(ref RenderTexture target, int order, AtmLutGenerateConfig lutconfig) { - CreateLUT(ref target, "Ground Irrdiance Order " + order, lutconfig.irradianceSize.x, lutconfig.irradianceSize.y, 0, RenderTextureFormat.ARGBFloat); - } - - public static void CreateMultiScatteringDensityTexture( - ref RenderTexture result, - AtmLutGenerateConfig lutConfig - ) { - CreateLUT(ref result, "MultiScatteringDensity", lutConfig.scatteringSize.x, lutConfig.scatteringSize.y, lutConfig.scatteringSize.z, RenderTextureFormat.ARGBFloat); - } - - public static void CreateMultiScatteringTexture( - ref RenderTexture result, - int order, - AtmLutGenerateConfig lutConfig - ) { - CreateLUT(ref result, "MultiScattering " + order, lutConfig.scatteringSize.x, lutConfig.scatteringSize.y, lutConfig.scatteringSize.z, RenderTextureFormat.ARGBFloat); - } - - public static void CreateFinalCombinedTexture( - ref RenderTexture MultipleScatteringLUT, - ref RenderTexture IrradianceLUT, - AtmLutGenerateConfig lutConfig - ) { - CreateLUT(ref MultipleScatteringLUT, "Multiple Scattering Combined Final", lutConfig.scatteringSize.x, lutConfig.scatteringSize.y, lutConfig.scatteringSize.z, RenderTextureFormat.ARGBFloat, true); - CreateLUT(ref IrradianceLUT, "Irradiance Combined Final", lutConfig.irradianceSize.x, lutConfig.irradianceSize.y, 0, RenderTextureFormat.ARGBFloat, true); - } - - public static void CreateCameraAlignedVolumeTexture( - ref RenderTexture transmittance, - ref RenderTexture scattering, - Vector3Int volumeTexSize - ) { - CreateLUT(ref transmittance, - "CameraVolumeTransmittance", - volumeTexSize.x, - volumeTexSize.y, - volumeTexSize.z, - RenderTextureFormat.ARGBFloat, - false); - CreateLUT(ref scattering, - "CameraVolumeScattering", - volumeTexSize.x, - volumeTexSize.y, - volumeTexSize.z, - RenderTextureFormat.ARGBFloat, - false); - } - - public static void UpdateTransmittance( - RenderTexture target, - AtmLutGenerateConfig lutConfig, - float start = 0.0f, - float end = 1.0f - ) { - int xStart, xEnd; - NormalizeProgressPointer(start, end, lutConfig.transmittanceSize.x / 32, out xStart, out xEnd); - computeShader.SetInts("_ThreadOffset", xStart, 0, 0); - computeShader.SetTexture(CalculateTransmittanceLUT, "TransmittanceLUTResult", target); - computeShader.Dispatch(CalculateTransmittanceLUT, xEnd - xStart, lutConfig.transmittanceSize.y / 32, 1); - } - - public static void UpdateSingleRayleighMie( - RenderTexture rayleightarget, - RenderTexture mietarget, - RenderTexture TransmittanceLUT, - AtmLutGenerateConfig lutConfig, - float start = 0.0f, - float end = 1.0f - ) { - - int xStart, xEnd; - NormalizeProgressPointer(start, end, lutConfig.scatteringSize.x / 8, out xStart, out xEnd); - computeShader.SetInts("_ThreadOffset", xStart, 0, 0); - - computeShader.SetTexture(CalculateSingleScatteringLUT, "TransmittanceLUT", TransmittanceLUT); - computeShader.SetTexture(CalculateSingleScatteringLUT, "SingleScatteringMieLUTResult", mietarget); - computeShader.SetTexture(CalculateSingleScatteringLUT, "SingleScatteringRayleighLUTResult", rayleightarget); - - computeShader.Dispatch(CalculateSingleScatteringLUT, xEnd - xStart, lutConfig.scatteringSize.y / 8, lutConfig.scatteringSize.z / 8); - } - - public static void UpdateGroundDirectIrradiance( - RenderTexture target, - RenderTexture TransmittanceLUT, - AtmLutGenerateConfig lutConfig, - float start = 0.0f, - float end = 1.0f - ) { - int xStart, xEnd; - NormalizeProgressPointer(start, end, lutConfig.irradianceSize.x / 32, out xStart, out xEnd); - computeShader.SetInts("_ThreadOffset", xStart, 0, 0); - - computeShader.SetTexture(CalculateGroundDirectIrradianceLUT, "TransmittanceLUT", TransmittanceLUT); - computeShader.SetTexture(CalculateGroundDirectIrradianceLUT, "GroundDirectIrradianceResult", target); - computeShader.Dispatch(CalculateGroundDirectIrradianceLUT, xEnd - xStart, lutConfig.irradianceSize.y / 32, 1); - } - - public static void UpdateGroundIrradiance( - RenderTexture target, - RenderTexture singleRayleigh, - RenderTexture singleMie, - RenderTexture multiScattering, - int scatteringOrder, - AtmLutGenerateConfig lutConfig, - float start = 0.0f, - float end = 1.0f - ) { - int xStart, xEnd; - NormalizeProgressPointer(start, end, lutConfig.irradianceSize.x / 32, out xStart, out xEnd); - computeShader.SetInts("_ThreadOffset", xStart, 0, 0); - - computeShader.SetInt("ScatteringOrder", scatteringOrder); - computeShader.SetTexture(CalculateGroundIndirectIrradianceLUT, "SingleRayleighScatteringLUT", singleRayleigh); - computeShader.SetTexture(CalculateGroundIndirectIrradianceLUT, "SingleMieScatteringLUT", singleMie); - computeShader.SetTexture(CalculateGroundIndirectIrradianceLUT, "MultipleScatteringLUT", multiScattering); - computeShader.SetTexture(CalculateGroundIndirectIrradianceLUT, "GroundIndirectIrradianceResult", target); - computeShader.Dispatch(CalculateGroundIndirectIrradianceLUT, xEnd - xStart, lutConfig.irradianceSize.y / 32, 1); - } - - public static void UpdateMultiScatteringDensity( - RenderTexture target, - RenderTexture TransmittanceLUT, - RenderTexture SingleScatteringLUTRayleigh, - RenderTexture SingleScatteringLUTMie, - RenderTexture MultiScatteringOfLastOrder, - RenderTexture GroundDirectIrradianceLUT, - int scatteringOrder, - AtmLutGenerateConfig lutConfig, - float start = 0.0f, - float end = 1.0f - ) { - int xStart, xEnd; - NormalizeProgressPointer(start, end, lutConfig.scatteringSize.x / 8, out xStart, out xEnd); - computeShader.SetInts("_ThreadOffset", xStart, 0, 0); - - computeShader.SetTexture(CalculateMultipleScatteringDensityLUT, "TransmittanceLUT", TransmittanceLUT); - computeShader.SetTexture(CalculateMultipleScatteringDensityLUT, "SingleRayleighScatteringLUT", SingleScatteringLUTRayleigh); - computeShader.SetTexture(CalculateMultipleScatteringDensityLUT, "SingleMieScatteringLUT", SingleScatteringLUTMie); - computeShader.SetTexture(CalculateMultipleScatteringDensityLUT, "IrradianceLUT", GroundDirectIrradianceLUT); - computeShader.SetTexture(CalculateMultipleScatteringDensityLUT, "MultipleScatteringLUT", MultiScatteringOfLastOrder); - computeShader.SetInt("ScatteringOrder", scatteringOrder); - computeShader.SetTexture(CalculateMultipleScatteringDensityLUT, "MultipleScatteringDensityResult", target); - computeShader.Dispatch(CalculateMultipleScatteringDensityLUT, xEnd - xStart, lutConfig.scatteringSize.y / 8, lutConfig.scatteringSize.z / 8); - } - - - public static void UpdateMultiScatteringCombineDensity( - RenderTexture target, - RenderTexture TransmittanceLUT, - RenderTexture multipleScatteringDensity, - AtmLutGenerateConfig lutConfig, - float start = 0.0f, - float end = 1.0f - ) { - int xStart, xEnd; - NormalizeProgressPointer(start, end, lutConfig.scatteringSize.x / 8, out xStart, out xEnd); - computeShader.SetInts("_ThreadOffset", xStart, 0, 0); - - computeShader.SetTexture(CalculateMultipleScatteringLUT, "TransmittanceLUT", TransmittanceLUT); - computeShader.SetTexture(CalculateMultipleScatteringLUT, "MultipleScatteringDensityLUT", multipleScatteringDensity); - computeShader.SetTexture(CalculateMultipleScatteringLUT, "MultipleScatteringResult", target); - computeShader.Dispatch(CalculateMultipleScatteringLUT, xEnd - xStart, lutConfig.scatteringSize.y / 8, lutConfig.scatteringSize.z / 8); - } - - public static void ClearFinalCombinedMultiScatter( - RenderTexture multiScatteringTarget, - AtmLutGenerateConfig lutConfig - ) { - computeShader.SetTexture(ClearCombineMultipleScatteringLUT, "ScatteringSumTarget", multiScatteringTarget); - computeShader.Dispatch(ClearCombineMultipleScatteringLUT, lutConfig.scatteringSize.x / 8, lutConfig.scatteringSize.y / 8, lutConfig.scatteringSize.z / 8); - } - - public static void UpdateFinalCombinedMultiScatter( - RenderTexture multiScatteringTarget, - RenderTexture multiScatteringOfSingleOrder, - AtmLutGenerateConfig lutConfig - ) { - computeShader.SetTexture(SumMultipleScatteringLUT, "ScatteringSumTarget", multiScatteringTarget); - computeShader.SetTexture(SumMultipleScatteringLUT, "ScatteringSumAdd", multiScatteringOfSingleOrder); - computeShader.Dispatch(SumMultipleScatteringLUT, lutConfig.scatteringSize.x / 8, lutConfig.scatteringSize.y / 8, lutConfig.scatteringSize.z / 8); - } - - public static void ClearFinalCombinedIrradiance( - RenderTexture target, - AtmLutGenerateConfig lutConfig - ) { - computeShader.SetTexture(ClearCombineGroundIrradianceLUT, "GroundIrradianceSumTarget", target); - computeShader.Dispatch(ClearCombineGroundIrradianceLUT, lutConfig.irradianceSize.x / 32, lutConfig.irradianceSize.y / 32, 1); - } - - public static void UpdateFinalCombinedIrradiance( - RenderTexture target, - RenderTexture irradianceOfSingleOrder, - AtmLutGenerateConfig lutConfig - ) { - computeShader.SetTexture(SumGroundIrradianceLUT, "GroundIrradianceSumTarget", target); - computeShader.SetTexture(SumGroundIrradianceLUT, "GroundIrradianceSumAdder", irradianceOfSingleOrder); - computeShader.Dispatch(SumGroundIrradianceLUT, lutConfig.irradianceSize.x / 32, lutConfig.irradianceSize.y / 32, 1); - } - - /// - /// Calculate camera frustrum aligned volume. - /// See frostbite slider for more. - /// - /// Target to store transmittance - /// Target to store scattering - /// Volume tex size, used to determine dispatch call params - /// Camera world pos - /// Sun direction(pointing towards sun) - /// four corners of camera frustrum(bl, br, tl, tr). We can't use projection matrix since we divide depth equal range, so we manually interpolate uvw using these corners and near/far plane - /// Near and far plane distance - public static void UpdateCameraVolume( - RenderTexture transmittanceTarget, - RenderTexture scatteringTarget, - Vector3Int volumeSize, - Vector3 cameraPos, - Vector3 sunDirection, - Vector3[] frustrumCorners, - Vector2 nearFarPlane - ) { - //Here we need calculated lerpable luts. This kinda break the code sepration. Any better idea? - AtmosphereScatteringLutManager.instance.UpdateComputeShaderValueForLerpedAp(computeShader, CalculateCameraScatteringVolume); - - computeShader.SetTexture(CalculateCameraScatteringVolume, "CameraVolumeTransmittance", transmittanceTarget); - computeShader.SetTexture(CalculateCameraScatteringVolume, "CameraVolumeScattering", scatteringTarget); - computeShader.SetVector("_CameraPos", cameraPos); - computeShader.SetVector("_SunDir", sunDirection); - - computeShader.SetVector("_CamBotLeft", frustrumCorners[0]); - computeShader.SetVector("_CamBotRight", frustrumCorners[1]); - computeShader.SetVector("_CamTopLeft", frustrumCorners[2]); - computeShader.SetVector("_CamTopRight", frustrumCorners[3]); - computeShader.SetVector("_NearFarPlane", nearFarPlane); - computeShader.Dispatch(CalculateCameraScatteringVolume, volumeSize.x / 8, volumeSize.y / 8, volumeSize.z / 8); - } - } - -} \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs.meta deleted file mode 100644 index 95db60560..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AtmLutHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 31d43eddaa5ab52468dfdf0df4f69d6a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs b/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs deleted file mode 100644 index 9cb14057c..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.AtmosphereScattering { - [CreateAssetMenu] - public class AtmosphereConfig : ScriptableObject { - - static readonly Vector3 OZoneConst = 6e-7f * new Vector3(3.426f, 8.298f, 0.356f); - static readonly Vector3 RayleighScatteringConst = 1e-6f * new Vector3(5.8f, 13.5f, 33.1f); - static readonly float MieScatteringConst = 2e-6f; - - private static class Keys { - public static int atmosphere_top_radius = Shader.PropertyToID("atmosphere_top_radius"); - public static int atmosphere_bot_radius = Shader.PropertyToID("atmosphere_bot_radius"); - public static int atmosphere_sun_angular_radius = Shader.PropertyToID("atmosphere_sun_angular_radius"); - public static int rayleigh_scattering = Shader.PropertyToID("rayleigh_scattering"); - public static int rayleigh_scale_height = Shader.PropertyToID("rayleigh_scale_height"); - public static int mie_scattering = Shader.PropertyToID("mie_scattering"); - public static int mie_extinction = Shader.PropertyToID("mie_extinction"); - public static int mie_scale_height = Shader.PropertyToID("mie_scale_height"); - public static int mie_phase_function_g = Shader.PropertyToID("mie_phase_function_g"); - public static int absorption_extinction = Shader.PropertyToID("absorption_extinction"); - public static int absorption_extinction_scale_height = Shader.PropertyToID("absorption_extinction_scale_height"); - public static int lightingScale = Shader.PropertyToID("_LightScale"); - public static int sunIrradianceOnAtm = Shader.PropertyToID("_SunIrradianceOnAtm"); - } - - public void Apply(Material mat) { - Shader.SetGlobalFloat(Keys.atmosphere_top_radius, atmosphere_top_radius); - Shader.SetGlobalFloat(Keys.atmosphere_bot_radius, atmosphere_bot_radius); - Shader.SetGlobalFloat(Keys.atmosphere_sun_angular_radius, atmosphere_sun_angular_radius); - Shader.SetGlobalVector(Keys.rayleigh_scattering, rayleigh_scattering_spectrum); - Shader.SetGlobalFloat(Keys.rayleigh_scale_height, rayleigh_scale_height); - Shader.SetGlobalFloat(Keys.mie_scattering, atmosphereDensity * mie_scattering * MieScatteringConst); - Shader.SetGlobalFloat(Keys.mie_extinction, mie_extinction_spectrum); - Shader.SetGlobalFloat(Keys.mie_scale_height, mie_scale_height); - Shader.SetGlobalFloat(Keys.mie_phase_function_g, mie_phase_function_g); - Shader.SetGlobalVector(Keys.absorption_extinction, ozone_extinction_spectrum); - Shader.SetGlobalFloat(Keys.absorption_extinction_scale_height, ozone_scale_height); - Shader.SetGlobalFloat(Keys.lightingScale, LightingScale); - Shader.SetGlobalVector(Keys.sunIrradianceOnAtm, sunIrradianceOnAtmosphere); - } - - public void Apply(ComputeShader shader) { - shader.SetFloat(Keys.atmosphere_top_radius, atmosphere_top_radius); - shader.SetFloat(Keys.atmosphere_bot_radius, atmosphere_bot_radius); - shader.SetFloat(Keys.atmosphere_sun_angular_radius, atmosphere_sun_angular_radius); - shader.SetVector(Keys.rayleigh_scattering, rayleigh_scattering_spectrum); - shader.SetFloat(Keys.rayleigh_scale_height, rayleigh_scale_height); - shader.SetFloat(Keys.mie_scattering, atmosphereDensity * mie_scattering * MieScatteringConst); - shader.SetFloat(Keys.mie_extinction, mie_extinction_spectrum); - shader.SetFloat(Keys.mie_scale_height, mie_scale_height); - shader.SetFloat(Keys.mie_phase_function_g, mie_phase_function_g); - shader.SetVector(Keys.absorption_extinction, ozone_extinction_spectrum); - shader.SetFloat(Keys.absorption_extinction_scale_height, ozone_scale_height); - shader.SetVector(Keys.sunIrradianceOnAtm, sunIrradianceOnAtmosphere); - } - - public float atmosphereDensity = 1.0f; - public Vector3 sunIrradianceOnAtmosphere = new Vector3(1.0f, 1.0f, 1.0f); - public float LightingScale = 2.0f * 3.1415926f; - public float atmosphere_top_radius = 6.36e6f + 6e4f; - public float atmosphere_bot_radius = 6.36e6f; - public float atmosphere_sun_angular_radius = 0.0087f; - public float rayleigh_scattering = 1.0f; - public float rayleigh_scale_height = 8000.0f; - public Vector3 rayleigh_scattering_spectrum { - get { - return atmosphereDensity * rayleigh_scattering * RayleighScatteringConst; - } - } - public Vector3 ozone_extinction_spectrum { - get { - return atmosphereDensity * OZoneConst * ozone_extinction; - } - } - public float mie_scattering = 1.0f; - public float mie_extinction { - get { - return mie_scattering * 1.1f; - } - } - public float mie_extinction_spectrum { - get { - return atmosphereDensity * mie_extinction * MieScatteringConst; - } - } - public float mie_scale_height = 1200.0f; - public float mie_phase_function_g = 0.8f; - public float ozone_extinction = 1.0f; - public float ozone_scale_height = 1000.0f; - - public void CopyDataFrom(AtmosphereConfig config) { - this.atmosphereDensity = config.atmosphereDensity; - this.LightingScale = config.LightingScale; - this.sunIrradianceOnAtmosphere = config.sunIrradianceOnAtmosphere; - this.atmosphere_top_radius = config.atmosphere_top_radius; - this.atmosphere_bot_radius = config.atmosphere_bot_radius; - this.atmosphere_sun_angular_radius = config.atmosphere_sun_angular_radius; - this.rayleigh_scattering = config.rayleigh_scattering; - this.rayleigh_scale_height = config.rayleigh_scale_height; - this.mie_scattering = config.mie_scattering; - this.mie_scale_height = config.mie_scale_height; - this.mie_phase_function_g = config.mie_phase_function_g; - this.ozone_extinction = config.ozone_extinction; - this.ozone_scale_height = config.ozone_scale_height; - - } -} -} diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs.meta deleted file mode 100644 index 135d88552..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereConfig.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a909801085fa7db47939f4858f8f7a1f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs b/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs deleted file mode 100644 index 5a7230081..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs +++ /dev/null @@ -1,252 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using UnityEngine; - -namespace Yangrc.AtmosphereScattering { - [ExecuteInEditMode] - public class AtmosphereScatteringLutManager : MonoBehaviour , ProgressiveLutUpdater.ITimeLogger{ - public static AtmosphereScatteringLutManager instance { - get { - return _instance; - } - } - private static AtmosphereScatteringLutManager _instance; - public bool progressiveUpdate; - [SerializeField] - private ComputeShader computeShader; - [SerializeField] - private bool outputDebug = false; - public AtmLutGenerateConfig lutConfig; - public AtmosphereConfig atmosphereConfig; - [System.NonSerialized] - public Material skyboxMaterial; - - //We prepare 3 updater, the 0-index one is "currently updating", 1-index is "just updated", and 2-index is the oldest one. - //During rendering, we interpolate 1 and 2, and updating 0. - private ProgressiveLutUpdater[] pingPongUpdaters = new ProgressiveLutUpdater[3]; - - public ProgressiveLutUpdater newestLut { get { - return pingPongUpdaters[1]; - } } - public ProgressiveLutUpdater oldLut { - get { - return pingPongUpdaters[2]; - } - } - - //Shift all updater to one right. - private void RotatePingpongUpdater() { - var temp = pingPongUpdaters[pingPongUpdaters.Length-1]; - for (int i = pingPongUpdaters.Length - 1; i > 0; i--) { - pingPongUpdaters[i] = pingPongUpdaters[i - 1]; - } - pingPongUpdaters[0] = temp; - } - - private void Awake() { - if (_instance != null) { - throw new System.InvalidOperationException("AtmosphereScatteringLutManager already exists!"); - } - } - - private void OnEnable() { - if (computeShader == null) { - throw new System.InvalidOperationException("Compute shader not set!"); - } - _instance = this; - AtmLutHelper.Init(computeShader); - for (int i = 0; i < pingPongUpdaters.Length; i++) { - pingPongUpdaters[i] = new ProgressiveLutUpdater(null, lutConfig, this); - pingPongUpdaters[i].name = "Updater " + i; - } - - //Quickly complete two set luts. - for (int i = 1; i <= 2; i++) { - pingPongUpdaters[i].atmConfigToUse = atmosphereConfig; - var t = pingPongUpdaters[i].UpdateCoroutine(); - while (t.MoveNext()) ; - } - UpdateSkyboxMaterial(pingPongUpdaters[1], pingPongUpdaters[2]); - - KickOffUpdater(pingPongUpdaters[0]); - } - - private void KickOffUpdater(ProgressiveLutUpdater updater) { - updater.atmConfigToUse = atmosphereConfig; - StartCoroutine(updater.UpdateCoroutine()); - } - - private float lerpValue = 0.0f; - private void Update() { - if (!pingPongUpdaters[0].working && progressiveUpdate) { - //Use the finished luts. - UpdateSkyboxMaterial(pingPongUpdaters[0], pingPongUpdaters[1]); - - lerpValue = 0.0f; - - //Rotate to right. - RotatePingpongUpdater(); - - //Next updater. - KickOffUpdater(pingPongUpdaters[0]); - } - UpdateLerpValue(); - } - - private void UpdateLerpValue() { - //We now require 19 frames to update - - lerpValue += 1.0f / 19.0f; - if (skyboxMaterial != null) - Shader.SetGlobalFloat("_LerpValue", lerpValue); - } - - private void OnDisable() { - for (int i = 0; i < pingPongUpdaters.Length; i++) { - pingPongUpdaters[i].Cleanup(); - } - } - - public void UpdateComputeShaderValueForLerpedAp(ComputeShader shader, int kernelId) { - newestLut.atmConfigUsedToUpdate.Apply(shader); - shader.SetTexture(kernelId, "_SingleRayleigh_1", oldLut.singleRayleigh); - shader.SetTexture(kernelId, "_SingleMie_1", oldLut.singleMie); - shader.SetTexture(kernelId, "_SingleRayleigh_2", newestLut.singleRayleigh); - shader.SetTexture(kernelId, "_SingleMie_2", newestLut.singleMie); - shader.SetTexture(kernelId, "_MultipleScattering_1", oldLut.multiScatteringCombine); - shader.SetTexture(kernelId, "_MultipleScattering_2", newestLut.multiScatteringCombine); - shader.SetTexture(kernelId, "_Transmittance_1", oldLut.transmittance); - shader.SetTexture(kernelId, "_Transmittance_2", newestLut.transmittance); - shader.SetTexture(kernelId, "_GroundIrradiance_1", oldLut.groundIrradianceCombine); - shader.SetTexture(kernelId, "_GroundIrradiance_2", newestLut.groundIrradianceCombine); - shader.SetVector("_ScatteringSize", (Vector3)lutConfig.scatteringSize); - shader.SetVector("_GroundIrradianceSize", (Vector2)lutConfig.irradianceSize); - shader.SetVector("_TransmittanceSize", (Vector2)lutConfig.transmittanceSize); - } - - public void UpdateSkyboxMaterial(ProgressiveLutUpdater updater, ProgressiveLutUpdater oldUpdater) { - if (this.skyboxMaterial==null) - this.skyboxMaterial = new Material(Shader.Find("Skybox/AtmosphereScatteringPrecomputed")); - updater.atmConfigUsedToUpdate.Apply(skyboxMaterial); - Shader.SetGlobalTexture("_SingleRayleigh_1", oldUpdater.singleRayleigh); - Shader.SetGlobalTexture("_SingleMie_1", oldUpdater.singleMie); - Shader.SetGlobalTexture("_SingleRayleigh_2", updater.singleRayleigh); - Shader.SetGlobalTexture("_SingleMie_2", updater.singleMie); - Shader.SetGlobalTexture("_MultipleScattering_1", oldUpdater.multiScatteringCombine); - Shader.SetGlobalTexture("_MultipleScattering_2", updater.multiScatteringCombine); - Shader.SetGlobalTexture("_Transmittance_1", oldUpdater.transmittance); - Shader.SetGlobalTexture("_Transmittance_2", updater.transmittance); - Shader.SetGlobalTexture("_GroundIrradiance_1", oldUpdater.groundIrradianceCombine); - Shader.SetGlobalTexture("_GroundIrradiance_2", updater.groundIrradianceCombine); - Shader.SetGlobalVector("_ScatteringSize", (Vector3)lutConfig.scatteringSize); - Shader.SetGlobalVector("_GroundIrradianceSize", (Vector2)lutConfig.irradianceSize); - Shader.SetGlobalVector("_TransmittanceSize", (Vector2)lutConfig.transmittanceSize); - RenderSettings.skybox = this.skyboxMaterial; - } - - public void Log(string itemName) { - if (outputDebug) - Debug.Log(itemName); - } - - public Vector3 GetRadianceAt(float mu_s, Vector3 basePosition) { - var t = atmosphereConfig.sunIrradianceOnAtmosphere; - var r = basePosition + new Vector3(0.0f, atmosphereConfig.atmosphere_bot_radius, 0.0f); - var transmittance = TransmittanceCalculate.GetTransmittanceToSun(atmosphereConfig, r.magnitude, mu_s); - t.Scale(transmittance); - return t; - } - } - - public static class TransmittanceCalculate { - - static float ClampCosine(float mu) { - return Mathf.Clamp(mu, -1.0f, 1.0f); - } - - static float ClampDistance(float d) { - return Mathf.Max(d, 0.0f); - } - - static float ClampRadius(AtmosphereConfig atmosphere, float r) { - return Mathf.Clamp(r, atmosphere.atmosphere_bot_radius, atmosphere.atmosphere_top_radius); - } - - static float SafeSqrt(float a) { - return Mathf.Sqrt(Mathf.Max(a, 0.0f)); - } - - static float DistanceToTopAtmosphereBoundary(AtmosphereConfig atmosphere, - float r, float mu) { - float discriminant = r * r * (mu * mu - 1.0f) + - atmosphere.atmosphere_top_radius * atmosphere.atmosphere_top_radius; - return ClampDistance(-r * mu + SafeSqrt(discriminant)); - } - - static float GetScaleHeight(float altitude, float scale_height) { - return Mathf.Exp(-altitude / scale_height); - } - - static float ComputeOpticalLengthToTopAtmosphereBoundary( - AtmosphereConfig atmosphere, float r, float mu, float scale_height) { - // Number of intervals for the numerical integration. - const int SAMPLE_COUNT = 500; - // The integration step, i.e. the length of each integration interval. - float dx = - DistanceToTopAtmosphereBoundary(atmosphere, r, mu) / (float)SAMPLE_COUNT; - // Integration loop. - float result = 0.0f; - for (int i = 0; i <= SAMPLE_COUNT; ++i) { - float d_i = (float)i * dx; - // Distance between the current sample point and the planet center. - float r_i = Mathf.Sqrt(d_i * d_i + 2.0f * r * mu * d_i + r * r); - // Number density at the current sample point (divided by the number density - // at the bottom of the atmosphere, yielding a dimensionless number). - float y_i = GetScaleHeight(r_i - atmosphere.atmosphere_bot_radius, scale_height); - // Sample weight (from the trapezoidal rule). - float weight_i = i == 0 || i == SAMPLE_COUNT ? 0.5f : 1.0f; - result += y_i * weight_i * dx; - } - return result; - } - - public static Vector3 ComputeTransmittanceToTopAtmosphereBoundary( - AtmosphereConfig atmosphere, float r, float mu) { - Vector3 rayleigh = atmosphere.rayleigh_scattering_spectrum * - ComputeOpticalLengthToTopAtmosphereBoundary( - atmosphere, r, mu, atmosphere.rayleigh_scale_height); - Vector3 mie = Vector3.one * atmosphere.mie_extinction_spectrum * - ComputeOpticalLengthToTopAtmosphereBoundary( - atmosphere, r, mu, atmosphere.mie_scale_height); - Vector3 ozone = atmosphere.ozone_extinction_spectrum * - ComputeOpticalLengthToTopAtmosphereBoundary( - atmosphere, r, mu, atmosphere.ozone_scale_height); - var sum = rayleigh + mie + ozone; - return new Vector3( - Mathf.Exp(-sum.x), - Mathf.Exp(-sum.y), - Mathf.Exp(-sum.z) - ); - } - - public static Vector3 GetTransmittanceToSun( - AtmosphereConfig atmosphere, - float r, float mu_s) { - float sin_theta_h = atmosphere.atmosphere_bot_radius / r; - float cos_theta_h = -Mathf.Sqrt(Mathf.Max(1.0f - sin_theta_h * sin_theta_h, 0.0f)); - - var transmittanceToCenter = ComputeTransmittanceToTopAtmosphereBoundary( - atmosphere, r, mu_s); - - var lower_bound = -sin_theta_h * atmosphere.atmosphere_sun_angular_radius; - var upper_bound = sin_theta_h * atmosphere.atmosphere_sun_angular_radius; - - var fraction = (mu_s - cos_theta_h - lower_bound) / (upper_bound - lower_bound); - fraction = Mathf.Clamp01(fraction); - - return transmittanceToCenter * fraction; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs.meta deleted file mode 100644 index 93816f7e0..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/AtmosphereScatteringLutManager.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: e16dd2ddbdfa7ea4f87a3cfb032ffd0f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: - - computeShader: {fileID: 7200000, guid: 2d4396a54b390d742b84d4bb4a122e54, type: 3} - - atmosphereConfig: {fileID: 11400000, guid: 8e73e89daf00b8447b2410427953df25, type: 2} - - skyboxMaterial: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs b/Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs deleted file mode 100644 index 12c64d96e..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class CameraControl : MonoBehaviour { - public float distance = 10.0f; - public Vector3 center; - - private Vector2 lastFrameMouse; - - public float scale = 1.0f; - - public float distanceSpeed = .1f; - public float rotationSpeed = .1f; - - private void Update() { - var mouseDelta = (Vector2)Input.mousePosition - lastFrameMouse; - lastFrameMouse = Input.mousePosition; - - if (Input.GetMouseButton(2)) { - //Translate. - center += ((transform.right * mouseDelta.x) + (transform.up * mouseDelta.y)) * scale * distance; - } - - if (Input.GetMouseButton(1)) { - distance += mouseDelta.x * distanceSpeed * Mathf.Max(1.0f, 0.1f * distance); - } - - if (Input.GetMouseButton(0)) { - //Rotate. - var currentRotation = transform.rotation; - var currentYaw = currentRotation.eulerAngles.y; - var currentPitch = currentRotation.eulerAngles.x; - - currentPitch -= mouseDelta.y * rotationSpeed; - currentYaw += mouseDelta.x * rotationSpeed; - currentPitch = Mathf.Max(0, currentPitch); - - var newRotation = Quaternion.Euler(currentPitch, currentYaw, 0.0f); - - transform.rotation = newRotation; - } - - transform.position = transform.rotation * Vector3.forward * -distance + center; - } -} diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs.meta deleted file mode 100644 index a936a7475..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/CameraControl.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 45d85419f2e23c540999c1a1fee6ed90 -timeCreated: 1547180827 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs b/Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs deleted file mode 100644 index eed286927..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class CameraVolumeHelper : MonoBehaviour { - - // Use this for initialization - void Start () { - - } - - // Update is called once per frame - void Update () { - - } -} diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs.meta deleted file mode 100644 index f9ca7684f..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/CameraVolumeHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0e8391fcc2d8a5144ace172efd446a95 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs b/Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs deleted file mode 100644 index 1c60dca0b..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.AtmosphereScattering { - [RequireComponent(typeof(Light))] - public class SunIntensityController : MonoBehaviour { - - private new Light light; - - //This is the "base" position, used to sample transmittance to sun, and set a final intensity. - // - //In real-life, objects at different position are affected by different sun intensity. - //But in Unity all objects share the same sun. - //So we need to set a base position, and assume all objects are at this position when affected by sun. - public Vector3 basePosition = new Vector3(0.0f, 50.0f, 0.0f); - - private void Awake() { - light = GetComponent(); - } - - // Update is called once per frame - void Update() { - var t = AtmosphereScatteringLutManager.instance; - if (t != null) { - //Sun-zenith cos. - var mu_s = Vector3.Dot(Vector3.down, transform.forward); - var radianceAtZero = t.GetRadianceAt(mu_s, basePosition); - - light.intensity = radianceAtZero.magnitude / (2 * Mathf.PI); - var normalized = radianceAtZero.normalized; - light.color = new Color(normalized.x, normalized.y, normalized.z); - } - } - } -} diff --git a/Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs.meta b/Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs.meta deleted file mode 100644 index 850d4af68..000000000 --- a/Assets/Plugins/AtmosphereScattering/Scripts/SunIntensityController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 325c269146dc2ac49b190f730a961573 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders.meta b/Assets/Plugins/AtmosphereScattering/Shaders.meta deleted file mode 100644 index 2a7c1a5ba..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5252171c9ff51e140b7d257eb101b9e4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader b/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader deleted file mode 100644 index 3923d3f12..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader +++ /dev/null @@ -1,100 +0,0 @@ -Shader "Hidden/Yangrc/AerialPerspective" -{ - Properties - { - _MainTex ("Texture", 2D) = "white" {} - } - SubShader - { - // No culling or depth - Cull Off ZWrite Off ZTest Always - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "AerialPerspectiveHelper.cginc" - #include "Lighting.cginc" - float4 _ProjectionExtents; - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - float4 vertex : SV_POSITION; - float4 scrPos: TEXCOORD1; - float2 vsray : TEXCOORD2; - }; - - v2f vert (appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = v.uv; - o.scrPos = ComputeScreenPos(o.vertex); - o.vsray = (2.0 * v.uv - 1.0) * _ProjectionExtents.xy + _ProjectionExtents.zw; - return o; - } - - sampler2D _MainTex; - sampler2D _CameraDepthTexture; - float _LightScale; - - void CalculateRMuMusForDistancePoint(Length r, Number mu, Number mu_s, Number nu, Number d, OUT(Length) r_d, OUT(Number) mu_d, OUT(Number) mu_s_d); - void CalculateRMuMusFromPosViewdir(AtmosphereParameters atm, float3 pos, float3 view_ray, float3 sun_direction, OUT(float) mu, OUT(float) mu_s, OUT(float) nu); - float3 GetTransmittanceToTopAtmosphereBoundaryLerped(float r, float mu); - - half4 frag (v2f i) : SV_Target - { - float3 vspos = float3(i.vsray, 1.0); - float4 worldPos = mul(unity_CameraToWorld, float4(vspos, 1.0)); - worldPos /= worldPos.w; - - half4 original = tex2D(_MainTex, i.uv); - - AtmosphereParameters atm = GetAtmParameters(); - float3 view_ray = normalize(worldPos.xyz - _WorldSpaceCameraPos); - float raw_depth = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, i.scrPos); - float distance = LinearEyeDepth(raw_depth); - if (distance / _ProjectionParams.z > 0.999f) { - return original; - } - float depth = (distance - _ProjectionParams.x) / (_ProjectionParams.z - _ProjectionParams.x); - - float3 pixel_pos = worldPos + distance * view_ray; -#if 1 - float r, mu, mu_s, nu; - float r_d, mu_d, mu_s_d; //Current pixel on screen's info - CalculateRMuMusFromPosViewdir(atm, _WorldSpaceCameraPos, view_ray, _WorldSpaceLightPos0, r, mu, mu_s, nu); - float d1, d2; - bool ray_r_mu_intersects_ground = RayIntersectsGround(atm, r, mu, d1, d2); - CalculateRMuMusForDistancePoint(atm, r, mu, mu_s, nu, distance, r_d, mu_d, mu_s_d); - - //Transmittance to target point. - float3 transmittanceToTarget = GetTransmittanceLerped(r, mu, distance, ray_r_mu_intersects_ground); - - //Here the two ray (r, mu) and (r_d, mu_d) is pointing same direction. - //so ray_r_mu_intersects_ground should apply to both of them. - //If we do intersect calculation later, some precision problems might appear, causing glitches near horizontal view dir. - float3 scatteringBetween = - GetTotalScatteringLerped(r, mu, mu_s, nu, ray_r_mu_intersects_ground) - - GetTotalScatteringLerped(r_d, mu_d, mu_s_d, nu, ray_r_mu_intersects_ground) * transmittanceToTarget; -#else - float3 uvw = float3(i.uv, depth); - float3 transmittanceToTarget = GetTransmittanceWithCameraVolume(uvw); - float3 scatteringBetween = GetScatteringWithCameraVolume(uvw); -#endif - return half4(original * transmittanceToTarget + scatteringBetween, 1.0); - } - ENDCG - } - } -} diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader.meta b/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader.meta deleted file mode 100644 index 0b842b030..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspective.shader.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 312bffdb76c84374bb88d26526be3dae -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc b/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc deleted file mode 100644 index 3b4c7135f..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc +++ /dev/null @@ -1,148 +0,0 @@ -#ifndef __AERIAL_PERSPECTIVE_HELPER__ -#define __AERIAL_PERSPECTIVE_HELPER__ - -#include "Common.cginc" -#include "TransmittanceHelper.cginc" -#include "GroundHelper.cginc" -#include "MultipleScatteringHelper.cginc" -#include "SingleScatteringHelper.cginc" - -#define LERP_TEXTURE(dim, name) \ -sampler ## dim ## D name ## _1; \ -sampler ## dim ## D name ## _2; - -LERP_TEXTURE(2, _Transmittance) -LERP_TEXTURE(2, _GroundIrradiance) -LERP_TEXTURE(3, _SingleRayleigh) -LERP_TEXTURE(3, _SingleMie) -LERP_TEXTURE(3, _MultipleScattering) - -float2 _TransmittanceSize; -float3 _ScatteringSize; -float2 _GroundIrradianceSize; -float3 _SunIrradianceOnAtm; -float _LerpValue; - -float3 GetTransmittanceLerped(float r, float mu, float d, bool intersect_ground) { - AtmosphereParameters atm = GetAtmParameters(); - float3 lerp1 = GetTransmittance( - atm, _Transmittance_1, _TransmittanceSize, r, mu, d, intersect_ground); - float3 lerp2 = GetTransmittance( - atm, _Transmittance_2, _TransmittanceSize, r, mu, d, intersect_ground); - - return lerp(lerp1, lerp2, _LerpValue); -} - -float3 GetTransmittanceToTopAtmosphereBoundaryLerped(float r, float mu) { - AtmosphereParameters atm = GetAtmParameters(); - float3 lerp1 = GetTransmittanceToTopAtmosphereBoundary( - atm, _Transmittance_1, _TransmittanceSize, r, mu); - float3 lerp2 = GetTransmittanceToTopAtmosphereBoundary( - atm, _Transmittance_2, _TransmittanceSize, r, mu); - - return lerp(lerp1, lerp2, _LerpValue); -} - -void CalculateRMuMusFromPosViewdir(AtmosphereParameters atm, float3 pos, float3 view_ray, float3 sun_direction, OUT(float) r, OUT(float) mu, OUT(float) mu_s, OUT(float) nu) { - float3 camera = pos + float3(0, atm.bottom_radius, 0); - r = max(atm.bottom_radius + 0.5f, length(camera)); - float rmu = dot(camera, view_ray); - mu = rmu / r; - mu_s = dot(camera, sun_direction) / r; - nu = dot(view_ray, sun_direction); -} - -void CalculateRMuMusForDistancePoint(AtmosphereParameters atm, Length r, Number mu, Number mu_s, float nu, Number d, OUT(Length) r_d, OUT(Number) mu_d, OUT(Number) mu_s_d) { - - r_d = ClampRadius(atm, sqrt(d * d + 2.0 * r * mu * d + r * r)); - r_d = max(atm.bottom_radius + 0.5f, r_d); - mu_d = ClampCosine((r * mu + d) / r_d); - mu_s_d = ClampCosine((r * mu_s + d * nu) / r_d); -} - -float3 InternalGetRayleighLerped(AtmosphereParameters atm, float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - - return SampleScatteringLerped(atm, - _SingleRayleigh_1, - _SingleRayleigh_2, - _LerpValue, - _ScatteringSize, - r, mu, mu_s, - ray_r_mu_intersects_ground) * - RayleighPhaseFunction(nu); -} - -float3 InternalGetMieLerped(AtmosphereParameters atm, float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - return SampleScatteringLerped(atm, - _SingleMie_1, - _SingleMie_2, - _LerpValue, - _ScatteringSize, - r, mu, mu_s, - ray_r_mu_intersects_ground) * - MiePhaseFunction(atm.mie_phase_function_g, nu); -} - -float3 InternalGetLerpedGroundIrradiance(AtmosphereParameters atm, float r, float mu, float mu_s) { - return lerp(GetIrradiance(atm, _GroundIrradiance_1, _GroundIrradianceSize, r, mu_s), GetIrradiance(atm, _GroundIrradiance_2, _GroundIrradianceSize, r, mu_s), _LerpValue); -} - -float3 InternalGetMultipleLerped(AtmosphereParameters atm, float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - return - SampleScatteringLerped(atm, - _MultipleScattering_1, - _MultipleScattering_2, - _LerpValue, - _ScatteringSize, - r, mu, mu_s, - ray_r_mu_intersects_ground); -} - -void ComputeSingleScattering( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu, Number mu_s, Number nu, - bool ray_r_mu_intersects_ground, - OUT(IrradianceSpectrum) rayleigh, OUT(IrradianceSpectrum) mie); - -float3 GetTotalScatteringLerped(float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - AtmosphereParameters atm = GetAtmParameters(); - return - (InternalGetRayleighLerped(atm, r, mu, mu_s, nu, ray_r_mu_intersects_ground) - + InternalGetMieLerped(atm, r, mu, mu_s, nu, ray_r_mu_intersects_ground) - + InternalGetMultipleLerped(atm, r, mu, mu_s, nu, ray_r_mu_intersects_ground)) * _SunIrradianceOnAtm; -} - -float3 GetTotalScatteringLerped(float r, float mu, float mu_s, float nu) { - AtmosphereParameters atm = GetAtmParameters(); - bool ray_r_mu_intersects_ground = RayIntersectsGround(atm, r, mu); - return GetTotalScatteringLerped(r, mu, mu_s, nu, ray_r_mu_intersects_ground); -} - -float3 EvaluateSunDiskRadianceOfUnitRadiance(AtmosphereParameters atm, float r, float mu, float nu) { - //Evaluate sun's solid angle by formula omega = 2 * PI * ( 1 - cos(sun_angular_radius)) (https://en.wikipedia.org/wiki/Solid_angle) - float cos_sun_angular_radius = cos(atm.sun_angular_radius); - float radianceTransmitted = max(0.0f, (nu - cos_sun_angular_radius) / (1.0f - cos_sun_angular_radius)); - float solidAngle = 2 * 3.1415926 * (1 - cos_sun_angular_radius); - return _SunIrradianceOnAtm * radianceTransmitted / solidAngle / 500.0f; //Avoiding it blind your eye. -} - - -/* -=============================== -Camera volume stuff. -=============================== -*/ -sampler3D _CameraVolumeTransmittance; -sampler3D _CameraVolumeScattering; - -float3 GetTransmittanceWithCameraVolume(float3 uvw) { - return tex3Dlod(_CameraVolumeTransmittance, float4(uvw, 0.0f)).rgb * _SunIrradianceOnAtm; -} - -float3 GetScatteringWithCameraVolume(float3 uvw) { - return tex3Dlod(_CameraVolumeScattering, float4(uvw, 0.0f)).rgb * _SunIrradianceOnAtm; -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc.meta b/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc.meta deleted file mode 100644 index ff0b17ae3..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 689759fe522f7ce4eaa6fc304ca996c3 -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute b/Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute deleted file mode 100644 index 352ef7830..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute +++ /dev/null @@ -1,353 +0,0 @@ - -/* -Helper functions. See https://ebruneton.github.io/precomputed_atmospheric_scattering/atmosphere/functions.glsl.html#transmittance_computation -*/ -//Convert (0.0, 1.0) to actual texel position. - -#include "./TransmittanceHelper.cginc" -#include "SingleScatteringHelper.cginc" -#include "MultipleScatteringHelper.cginc" -#include "GroundHelper.cginc" - -#pragma kernel CalculateTransmittanceLUT -#pragma kernel CalculateSingleScatteringLUT -#pragma kernel CalculateMultipleScatteringDensityLUT -#pragma kernel CalculateMultipleScatteringLUT -#pragma kernel CalculateGroundDirectIrradianceLUT -#pragma kernel CalculateGroundIndirectIrradianceLUT -#pragma kernel CombineGroundIrradianceLUT -#pragma kernel CombineMultipleScatteringLUT -#pragma kernel ClearCombineGroundIrradianceLUT -#pragma kernel ClearCombineMultipleScatteringLUT -#pragma kernel CalculateCameraScatteringVolume - -/* -Common parameters. -*/ -sampler2D TransmittanceLUT; -sampler3D SingleRayleighScatteringLUT; -sampler3D SingleMieScatteringLUT; -sampler3D MultipleScatteringDensityLUT; -sampler3D MultipleScatteringLUT; -sampler2D IrradianceLUT; -int2 TransmittanceSize; -int3 ScatteringSize; -int2 IrradianceSize; -int ScatteringOrder; - -//When only part of results need to be computed, we offset some results. -uint3 _ThreadOffset; - - -/* -================================== -||Transmittance LUT calculation.|| -================================== -*/ - -RWTexture2D TransmittanceLUTResult; - -DimensionlessSpectrum ComputeTransmittanceToTopAtmosphereBoundaryTexture( - IN(AtmosphereParameters) atmosphere, IN(vec2) uv_coord, IN(vec2) tex_size) { - Length r; - Number mu; - GetRMuFromTransmittanceTextureUv( - atmosphere, uv_coord, r, mu, tex_size.x, tex_size.y); - return ComputeTransmittanceToTopAtmosphereBoundary(atmosphere, r, mu); -} - -[numthreads(32, 32, 1)] -void CalculateTransmittanceLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) -{ - id += _ThreadOffset * uint3(32, 32, 1); - - uint w, h; - TransmittanceLUTResult.GetDimensions(w, h); - AtmosphereParameters atm = GetAtmParameters(); - - float2 uv = vec2((0.5f + id.x) / w, (0.5f + id.y) / h); - float r, mu; - - GetRMuFromTransmittanceTextureUv( - atm, uv, r, mu, w, h); - - float3 result = ComputeTransmittanceToTopAtmosphereBoundaryTexture( - atm, uv, vec2(w, h) - ); - - TransmittanceLUTResult[id.xy] = result; -} - -/* -================================== -|| SingleScattering || -================================== -*/ - -RWTexture3D SingleScatteringRayleighLUTResult; -RWTexture3D SingleScatteringMieLUTResult; - -[numthreads(8, 8, 8)] -void CalculateSingleScatteringLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) -{ - id += _ThreadOffset * uint3(8, 8, 8); - - uint w, h, d; - SingleScatteringRayleighLUTResult.GetDimensions(w, h, d); - AtmosphereParameters atm = GetAtmParameters(); - - float3 uvw = vec3((0.5f + id.x) / w, (0.5f + id.y) / h, (0.5f + id.z) / d); - - float3 rayleigh, mie; - ComputeSingleScatteringTexture( - atm, TransmittanceLUT, uint2(TransmittanceSize), uvw, uint3(ScatteringSize), rayleigh, mie - ); - - SingleScatteringMieLUTResult[id.xyz] = mie; - SingleScatteringRayleighLUTResult[id.xyz] = rayleigh; -} - -/* -========================================== -|| Multiple Scattering Density || -========================================== -*/ -RWTexture3D MultipleScatteringDensityResult; - -RadianceDensitySpectrum ComputeScatteringDensityTexture( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 scattering_size, - IN(IrradianceTexture) irradiance_texture, - uint2 irradiance_size, - IN(vec3) frag_coord, int scattering_order); - -[numthreads(8,8,8)] -void CalculateMultipleScatteringDensityLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - - id += _ThreadOffset * uint3(8, 8, 8); - - uint w, h, d; - MultipleScatteringDensityResult.GetDimensions(w, h, d); - AtmosphereParameters atm = GetAtmParameters(); - - float3 uvw = vec3((0.5f + id.x) / w, (0.5f + id.y) / h, (0.5f + id.z) / d); - - float3 density = ComputeScatteringDensityTexture( - atm, TransmittanceLUT, TransmittanceSize, - SingleRayleighScatteringLUT, SingleMieScatteringLUT, MultipleScatteringLUT, ScatteringSize, - IrradianceLUT, IrradianceSize, - uvw, ScatteringOrder - ); - - MultipleScatteringDensityResult[id.xyz] = density; -} - - -/* -========================================== -|| Multiple Scattering || -========================================== -*/ - -RWTexture3D MultipleScatteringResult; - -RadianceSpectrum ComputeMultipleScatteringTexture( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(ScatteringDensityTexture) scattering_density_texture, - uint3 scattering_size, - IN(vec3) frag_coord); - -[numthreads(8, 8, 8)] -void CalculateMultipleScatteringLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(8, 8, 8); - - uint w, h, d; - MultipleScatteringResult.GetDimensions(w, h, d); - AtmosphereParameters atm = GetAtmParameters(); - - float3 uvw = vec3((0.5f + id.x) / w, (0.5f + id.y) / h, (0.5f + id.z) / d); - - float3 scattering = ComputeMultipleScatteringTexture(atm, TransmittanceLUT, TransmittanceSize, MultipleScatteringDensityLUT, ScatteringSize, uvw); - - MultipleScatteringResult[id.xyz] = scattering; -} - -/* -========================================== -|| Ground Direct Irradiance || -========================================== -*/ - -RWTexture2D GroundDirectIrradianceResult; - -IrradianceSpectrum ComputeDirectIrradianceTexture( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(vec2) frag_coord, - uint2 irrdiance_size); - -[numthreads(32, 32, 1)] -void CalculateGroundDirectIrradianceLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(32, 32, 1); - - uint w, h; - GroundDirectIrradianceResult.GetDimensions(w, h); - AtmosphereParameters atm = GetAtmParameters(); - - float2 uvw = vec2((0.5f + id.x) / w, (0.5f + id.y) / h); - - float3 irradiance = ComputeDirectIrradianceTexture(atm, TransmittanceLUT, TransmittanceSize, uvw, IrradianceSize); - - GroundDirectIrradianceResult[id.xy] = irradiance; -} - - -/* -========================================== -|| Ground Indirect Irradiance || -========================================== -*/ - -RWTexture2D GroundIndirectIrradianceResult; - -IrradianceSpectrum ComputeIndirectIrradianceTexture( - IN(AtmosphereParameters) atmosphere, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 scattering_size, - IN(vec2) frag_coord, int scattering_order, uint2 irrdiance_size); - -[numthreads(32, 32, 1)] -void CalculateGroundIndirectIrradianceLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(32, 32, 1); - - uint w, h; - GroundIndirectIrradianceResult.GetDimensions(w, h); - AtmosphereParameters atm = GetAtmParameters(); - - float2 uvw = vec2((0.5f + id.x) / w, (0.5f + id.y) / h); - - float3 irradiance = ComputeIndirectIrradianceTexture(atm, - SingleRayleighScatteringLUT, SingleMieScatteringLUT, MultipleScatteringLUT, ScatteringSize, - uvw, ScatteringOrder, uint2(w,h)); - - GroundIndirectIrradianceResult[id.xy] = irradiance; -} - - -/* -========================================== -|| Ground Irradiance Combine || -========================================== -*/ - -RWTexture2D GroundIrradianceSumTarget; -RWTexture2D GroundIrradianceSumAdder; - -[numthreads(32, 32, 1)] -void CombineGroundIrradianceLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(32, 32, 1); - - GroundIrradianceSumTarget[id.xy] += GroundIrradianceSumAdder[id.xy]; -} - -[numthreads(32, 32, 1)] -void ClearCombineGroundIrradianceLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(32, 32, 1); - GroundIrradianceSumTarget[id.xy] = 0.0f; -} - -/* -========================================== -|| Scattering Combine || -========================================== -*/ - -RWTexture3D ScatteringSumTarget; -RWTexture3D ScatteringSumAdd; - -[numthreads(8, 8, 8)] -void CombineMultipleScatteringLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(8, 8, 8); - - ScatteringSumTarget[id.xyz] += ScatteringSumAdd[id.xyz]; -} -[numthreads(8, 8, 8)] -void ClearCombineMultipleScatteringLUT(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(8, 8, 8); - - ScatteringSumTarget[id.xyz] = 0.0f; -} - -/* -========================================== -|| Camera Volume Tex || -========================================== -*/ -#include "HLSLSupport.cginc" -#include "AerialPerspectiveHelper.cginc" -RWTexture3D CameraVolumeTransmittance; -RWTexture3D CameraVolumeScattering; -float4x4 Inverse_VP; -float3 _CameraPos; -float3 _SunDir; - -float2 _NearFarPlane; -float3 _CamBotLeft; -float3 _CamBotRight; -float3 _CamTopLeft; -float3 _CamTopRight; - -[numthreads(8, 8, 8)] -void CalculateCameraScatteringVolume(uint3 id : SV_DispatchThreadID, uint3 groupid : SV_GroupThreadID) { - id += _ThreadOffset * uint3(8, 8, 8); - - uint3 whd; - CameraVolumeScattering.GetDimensions(whd.x, whd.y, whd.z); - float3 texelSize = 1.0f / whd; - - //Get uvw from id. - float3 uvw = (id + 0.5f) * texelSize; - - float3 viewDir; - - //Get camera ray. - { - float3 t1 = lerp(_CamBotLeft, _CamBotRight, uvw.x); - float3 t2 = lerp(_CamTopLeft, _CamTopRight, uvw.x); - float3 ray_end = lerp(t1, t2, uvw.y); - viewDir = ray_end - _CameraPos; - } - - float distance = lerp(_NearFarPlane.x, _NearFarPlane.y, uvw.z); - viewDir = normalize(viewDir); - - AtmosphereParameters atm = GetAtmParameters(); - float3 earthToCamera = _CameraPos + float3(0.0f, atm.bottom_radius, 0.0f); - - float r, mu, mu_s, nu; - float r_d, mu_d, mu_s_d; - - CalculateRMuMusFromPosViewdir(atm, _CameraPos, viewDir, _SunDir, r, mu, mu_s, nu); - float d1, d2; - bool ray_r_mu_intersects_ground = RayIntersectsGround(atm, r, mu, d1, d2); - CalculateRMuMusForDistancePoint(atm, r, mu, mu_s, nu, distance, r_d, mu_d, mu_s_d); - - float3 transmittanceToTarget = GetTransmittanceLerped( - r, mu, distance, ray_r_mu_intersects_ground); - float3 scatteringBetween = - GetTotalScatteringLerped(r, mu, mu_s, nu, ray_r_mu_intersects_ground) - - GetTotalScatteringLerped(r_d, mu_d, mu_s_d, nu, ray_r_mu_intersects_ground) * transmittanceToTarget; - - CameraVolumeTransmittance[id] = transmittanceToTarget; - CameraVolumeScattering[id] = scatteringBetween; -} diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute.meta b/Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute.meta deleted file mode 100644 index 99b755ef0..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/AtmosphereScatteringComputeShader.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2d4396a54b390d742b84d4bb4a122e54 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 4 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc b/Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc deleted file mode 100644 index ebff8e30d..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc +++ /dev/null @@ -1,276 +0,0 @@ -#ifndef __COMMON_HELPER__ -#define __COMMON_HELPER__ - -#define Length float -#define Wavelength float -#define Angle float -#define SolidAngle float -#define Power float -#define LuminousPower float - -#define Number float -#define InverseLength float -#define Area float -#define Volume float -#define NumberDensity float -#define Irradiance float -#define Radiance float -#define SpectralPower float -#define SpectralIrradiance float -#define SpectralRadiance float -#define SpectralRadianceDensity float -#define ScatteringCoefficient float -#define InverseSolidAngle float -#define LuminousIntensity float -#define Luminance float -#define Illuminance float - -// A generic function from Wavelength to some other type. -#define AbstractSpectrum vec3 -// A function from Wavelength to Number. -#define DimensionlessSpectrum vec3 -// A function from Wavelength to SpectralPower. -#define PowerSpectrum vec3 -// A function from Wavelength to SpectralIrradiance. -#define IrradianceSpectrum vec3 -// A function from Wavelength to SpectralRadiance. -#define RadianceSpectrum vec3 -// A function from Wavelength to SpectralRadianceDensity. -#define RadianceDensitySpectrum vec3 -// A function from Wavelength to ScaterringCoefficient. -#define ScatteringSpectrum vec3 - -// A position in 3D (3 length values). -#define Position vec3 -// A unit direction vector in 3D (3 unitless values). -#define Direction vec3 -// A vector of 3 luminance values. -#define Luminance3 half3 -// A vector of 3 illuminance values. -#define Illuminance3 half3 - -#define TransmittanceTexture sampler2D -#define IrradianceTexture sampler2D -#define ScatteringTexture sampler3D -#define ScatteringDensityTexture sampler3D -#define ReducedScatteringTexture sampler3D -#define vec2 float2 -#define vec3 float3 -#define vec4 float4 -#define IN(x) x -#define OUT(x) out x -#define assert(x) ; - -static const Length m = 1.0f; -static const Wavelength nm = 1.0f; -static const Angle rad = 1.0f; -static const SolidAngle sr = 1.0; -static const Power watt = 1.0; -static const LuminousPower lm = 1.0; - -static const float PI = 3.14159265358979323846; - -static const Length km = 1000.0 * m; -static const Area m2 = m * m; -static const Volume m3 = m * m * m; -static const Angle pi = PI * rad; -static const Angle deg = pi / 180.0; -static const Irradiance watt_per_square_meter = watt / m2; -static const Radiance watt_per_square_meter_per_sr = watt / (m2 * sr); -static const SpectralIrradiance watt_per_square_meter_per_nm = watt / (m2 * nm); -static const SpectralRadiance watt_per_square_meter_per_sr_per_nm = -watt / (m2 * sr * nm); -static const SpectralRadianceDensity watt_per_cubic_meter_per_sr_per_nm = -watt / (m3 * sr * nm); -static const LuminousIntensity cd = lm / sr; -static const LuminousIntensity kcd = 1000.0 * cd; -static const Luminance cd_per_square_meter = cd / m2; -static const Luminance kcd_per_square_meter = kcd / m2; - -struct AtmosphereParameters { - Length top_radius; - Length bottom_radius; - Number sun_angular_radius; - DimensionlessSpectrum rayleigh_scattering; - IrradianceSpectrum ground_albedo; - Number rayleigh_scale_height; - Number mie_scattering; - Number mie_extinction; - Number mie_scale_height; - DimensionlessSpectrum absorption_extinction; - Number absorption_extinction_scale_height; - Number solar_irradiance; - Number mu_s_min; - Number mie_phase_function_g; -}; - -AtmosphereParameters GetAtmosphereStruct( - float atmosphere_top_radius, - float atmosphere_bot_radius, - float atmosphere_sun_angular_radius, - DimensionlessSpectrum rayleigh_scattering, - Number rayleigh_scale_height, - Number mie_scattering, - Number mie_extinction, - Number mie_scale_height, - Number mie_phase_function_g, - DimensionlessSpectrum absorption_extinction, - Number absorption_extinction_scale_height -) { - AtmosphereParameters result; - result.top_radius = atmosphere_top_radius; - result.bottom_radius = atmosphere_bot_radius; - result.sun_angular_radius = atmosphere_sun_angular_radius; - - - result.rayleigh_scattering = rayleigh_scattering; - result.rayleigh_scale_height = rayleigh_scale_height; - result.mie_scattering = mie_scattering; - result.mie_extinction = mie_extinction; - result.mie_scale_height = mie_scale_height; - result.mie_phase_function_g = mie_phase_function_g; - result.absorption_extinction = absorption_extinction; - result.absorption_extinction_scale_height = absorption_extinction_scale_height; - - result.solar_irradiance = 1.0f; - result.mu_s_min = -0.2f; - result.ground_albedo = float3(0.1, 0.1, 0.1); - return result; -} - - -Number ClampCosine(Number mu) { - return clamp(mu, Number(-1.0), Number(1.0)); -} - -Length ClampDistance(Length d) { - return max(d, 0.0); -} - -Length ClampRadius(IN(AtmosphereParameters) atmosphere, Length r) { - return clamp(r, atmosphere.bottom_radius, atmosphere.top_radius); -} - -Length SafeSqrt(Area a) { - return sqrt(max(a, 0.0)); -} - -Length DistanceToTopAtmosphereBoundary(IN(AtmosphereParameters) atmosphere, - Length r, Number mu) { - assert(r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - Area discriminant = r * r * (mu * mu - 1.0) + - atmosphere.top_radius * atmosphere.top_radius; - return ClampDistance(-r * mu + SafeSqrt(discriminant)); -} - -Length DistanceToBottomAtmosphereBoundary(IN(AtmosphereParameters) atmosphere, - Length r, Number mu) { - assert(r >= atmosphere.bottom_radius); - assert(mu >= -1.0 && mu <= 1.0); - Area discriminant = r * r * (mu * mu - 1.0) + - atmosphere.bottom_radius * atmosphere.bottom_radius; - return ClampDistance(-r * mu - SafeSqrt(discriminant)); -} - -bool RayIntersectsGround(IN(AtmosphereParameters) atmosphere, - Length r, Number mu, OUT(Length) d_1, OUT(Length) d_2) { - assert(r >= atmosphere.bottom_radius); - assert(mu >= -1.0 && mu <= 1.0); - d_1 = 0.0; - d_2 = 0.0; - float discriminant = 4 * r * r * (mu * mu - 1.0) + - 4 * atmosphere.bottom_radius * atmosphere.bottom_radius; - if (discriminant >= 0.0f) { - float sqDis = sqrt(discriminant); - d_1 = (-2.0f * r * mu - sqDis) / 2.0f; - d_2 = (-2.0f * r * mu + sqDis) / 2.0f; - } - return mu < 0.0 && discriminant >= 0.0; -} - -bool RayIntersectsGround(IN(AtmosphereParameters) atmosphere, - Length r, Number mu) { - assert(r >= atmosphere.bottom_radius); - assert(mu >= -1.0 && mu <= 1.0); - return mu < 0.0 && r * r * (mu * mu - 1.0) + - atmosphere.bottom_radius * atmosphere.bottom_radius >= 0.0; -} - -Number GetTextureCoordFromUnitRange(Number x, int texture_size) { - return 0.5 / Number(texture_size) + x * (1.0 - 1.0 / Number(texture_size)); -} - -Number GetUnitRangeFromTextureCoord(Number u, int texture_size) { - return (u - 0.5 / Number(texture_size)) / (1.0 - 1.0 / Number(texture_size)); -} - -Number GetScaleHeight(Length altitude, Length scale_height) { - return exp(-altitude / scale_height); -} - -vec2 GetScaleHeight(Length altitude, vec2 scale_height_rayleigh_mie) { - return exp(-vec2(altitude, altitude) / scale_height_rayleigh_mie); -} - -Length DistanceToNearestAtmosphereBoundary(IN(AtmosphereParameters) atmosphere, - Length r, Number mu, bool ray_r_mu_intersects_ground) { - if (ray_r_mu_intersects_ground) { - return DistanceToBottomAtmosphereBoundary(atmosphere, r, mu); - } - else { - return DistanceToTopAtmosphereBoundary(atmosphere, r, mu); - } -} - -Number GetNuFromMuMus(float mu, float mu_s) { - return /*cos(a-b), where cos(a) == mu, cos(b) == mu_s*/ mu * mu_s + (1 - mu * mu) * (1 - mu_s * mu_s); -} - -/* -Pass in variables. -*/ -float atmosphere_top_radius; -float atmosphere_bot_radius; -float atmosphere_sun_angular_radius; -float3 rayleigh_scattering; -float rayleigh_scale_height; -float mie_scattering; -float mie_extinction; -float mie_scale_height; -float mie_phase_function_g; -float3 absorption_extinction; -float absorption_extinction_scale_height; - -AtmosphereParameters GetAtmParameters() { - return GetAtmosphereStruct( - atmosphere_top_radius, - atmosphere_bot_radius, - atmosphere_sun_angular_radius, - rayleigh_scattering, - rayleigh_scale_height, - mie_scattering, - mie_extinction, - mie_scale_height, - mie_phase_function_g, - absorption_extinction, - absorption_extinction_scale_height - ); -} - -InverseSolidAngle RayleighPhaseFunction(Number nu) { - InverseSolidAngle k = 3.0 / (16.0 * PI * sr); - return k * (1.0 + nu * nu); - //return 0.8f * (1.4f + 0.5f * nu) / (4.0 * PI); -} - -InverseSolidAngle AdhocRayleighPhaseFunction(Number nu) { - return 0.8f * (1.4f + 0.5f * nu) / (4.0 * PI * sr); -} - -InverseSolidAngle MiePhaseFunction(Number g, Number nu) { - InverseSolidAngle k = 3.0 / (8.0 * PI * sr) * (1.0 - g * g) / (2.0 + g * g); - return k * (1.0 + nu * nu) / pow(abs(1.0 + g * g - 2.0 * g * nu), 1.5); -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc.meta b/Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc.meta deleted file mode 100644 index 77e404105..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 498005b870bb3d74e8dafc015b3de52d -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc b/Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc deleted file mode 100644 index 1d10d57ec..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef __GROUND_HELPER__ -#define __GROUND_HELPER__ - -#include "Common.cginc" -#include "TransmittanceHelper.cginc" -#include "MultipleScatteringHelper.cginc" - -IrradianceSpectrum ComputeDirectIrradiance( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - Length r, Number mu_s) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu_s >= -1.0 && mu_s <= 1.0); - - Number alpha_s = atmosphere.sun_angular_radius / rad; - // Approximate average of the cosine factor mu_s over the visible fraction of - // the Sun disc. - Number average_cosine_factor = - mu_s < -alpha_s ? 0.0 : (mu_s > alpha_s ? mu_s : - (mu_s + alpha_s) * (mu_s + alpha_s) / (4.0 * alpha_s)); - - return atmosphere.solar_irradiance * - GetTransmittanceToTopAtmosphereBoundary( - atmosphere, transmittance_texture, transmittance_size, r, mu_s) * average_cosine_factor; -} - -IrradianceSpectrum ComputeIndirectIrradiance( - IN(AtmosphereParameters) atmosphere, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 scattering_size, - Length r, Number mu_s, int scattering_order) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu_s >= -1.0 && mu_s <= 1.0); - assert(scattering_order >= 1); - - const int SAMPLE_COUNT = 32; - const Angle dphi = pi / Number(SAMPLE_COUNT); - const Angle dtheta = pi / Number(SAMPLE_COUNT); - - IrradianceSpectrum result = - IrradianceSpectrum(0.0, 0.0, 0.0); - vec3 omega_s = vec3(sqrt(1.0 - mu_s * mu_s), 0.0, mu_s); - for (int j = 0; j < SAMPLE_COUNT / 2; ++j) { - Angle theta = (Number(j) + 0.5) * dtheta; - for (int i = 0; i < 2 * SAMPLE_COUNT; ++i) { - Angle phi = (Number(i) + 0.5) * dphi; - vec3 omega = - vec3(cos(phi) * sin(theta), sin(phi) * sin(theta), cos(theta)); - SolidAngle domega = (dtheta / rad) * (dphi / rad) * sin(theta) ; - - Number nu = dot(omega, omega_s); - result += GetScattering(atmosphere, single_rayleigh_scattering_texture, - single_mie_scattering_texture, multiple_scattering_texture, scattering_size, - r, omega.z, mu_s, nu, false /* ray_r_theta_intersects_ground */, - scattering_order) * - omega.z * domega; - } - } - return result; -} - -vec2 GetIrradianceTextureUvFromRMuS(IN(AtmosphereParameters) atmosphere, - Length r, Number mu_s, uint2 irradiance_size) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu_s >= -1.0 && mu_s <= 1.0); - Number x_r = (r - atmosphere.bottom_radius) / - (atmosphere.top_radius - atmosphere.bottom_radius); - Number x_mu_s = mu_s * 0.5 + 0.5; - return vec2(GetTextureCoordFromUnitRange(x_mu_s, irradiance_size.x), - GetTextureCoordFromUnitRange(x_r, irradiance_size.y)); -} - -void GetRMuSFromIrradianceTextureUv(IN(AtmosphereParameters) atmosphere, - IN(vec2) uv, OUT(Length) r, OUT(Number) mu_s, uint2 irradiance_size) { - assert(uv.x >= 0.0 && uv.x <= 1.0); - assert(uv.y >= 0.0 && uv.y <= 1.0); - Number x_mu_s = GetUnitRangeFromTextureCoord(uv.x, irradiance_size.x); - Number x_r = GetUnitRangeFromTextureCoord(uv.y, irradiance_size.y); - r = atmosphere.bottom_radius + - x_r * (atmosphere.top_radius - atmosphere.bottom_radius); - mu_s = ClampCosine(2.0 * x_mu_s - 1.0); -} - -IrradianceSpectrum GetIrradiance( - IN(AtmosphereParameters) atmosphere, - IN(IrradianceTexture) irradiance_texture, - uint2 irradiance_size, - Length r, Number mu_s) { - vec2 uv = GetIrradianceTextureUvFromRMuS(atmosphere, r, mu_s, irradiance_size); - return IrradianceSpectrum(tex2Dlod(irradiance_texture, float4(uv,0.0, 0.0)).rgb); -} - - -IrradianceSpectrum ComputeDirectIrradianceTexture( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(vec2) uv, - uint2 irrdiance_size) { - Length r; - Number mu_s; - GetRMuSFromIrradianceTextureUv( - atmosphere, uv, r, mu_s, irrdiance_size); - return ComputeDirectIrradiance(atmosphere, transmittance_texture, transmittance_size, r, mu_s); -} - -IrradianceSpectrum ComputeIndirectIrradianceTexture( - IN(AtmosphereParameters) atmosphere, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 scattering_size, - IN(vec2) uv, int scattering_order, uint2 irrdiance_size) { - Length r; - Number mu_s; - GetRMuSFromIrradianceTextureUv( - atmosphere, uv, r, mu_s, irrdiance_size); - return ComputeIndirectIrradiance(atmosphere, - single_rayleigh_scattering_texture, single_mie_scattering_texture, - multiple_scattering_texture, scattering_size, r, mu_s, scattering_order); -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc.meta b/Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc.meta deleted file mode 100644 index 1c358e2ab..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: edb2696599cfe204d9a12cfa587afc0f -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc b/Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc deleted file mode 100644 index 054731102..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc +++ /dev/null @@ -1,209 +0,0 @@ -#ifndef __MULTIPLE_SCATTERING_HELPER__ -#define __MULTIPLE_SCATTERING_HELPER__ - -#include "Common.cginc" -#include "TransmittanceHelper.cginc" -#include "SingleScatteringHelper.cginc" - -IrradianceSpectrum GetIrradiance( - IN(AtmosphereParameters) atmosphere, - IN(IrradianceTexture) irradiance_texture, uint2 irradiance_size, - Length r, Number mu_s); - -RadianceDensitySpectrum ComputeScatteringDensity( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 scattering_size, - IN(IrradianceTexture) irradiance_texture, - uint2 irradiance_size, - Length r, Number mu, Number mu_s, Number nu, int scattering_order) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - assert(mu_s >= -1.0 && mu_s <= 1.0); - assert(scattering_order >= 2); - - - // Compute unit direction vectors for the zenith, the view direction omega and - // and the sun direction omega_s, such that the cosine of the view-zenith - // angle is mu, the cosine of the sun-zenith angle is mu_s, and the cosine of - // the view-sun angle is nu. The goal is to simplify computations below. - vec3 zenith_direction = vec3(0.0, 0.0, 1.0); - vec3 omega = vec3(sqrt(1.0 - mu * mu), 0.0, mu); - Number sun_dir_x = omega.x == 0.0 ? 0.0 : (nu - mu * mu_s) / omega.x; - Number sun_dir_y = sqrt(max(1.0 - sun_dir_x * sun_dir_x - mu_s * mu_s, 0.0)); - vec3 omega_s = vec3(sun_dir_x, sun_dir_y, mu_s); - - const int SAMPLE_COUNT = 16; - const Angle dphi = pi / Number(SAMPLE_COUNT); - const Angle dtheta = pi / Number(SAMPLE_COUNT); - RadianceDensitySpectrum rayleigh_mie = - RadianceDensitySpectrum(0.0, 0.0, 0.0); - - // Nested loops for the integral over all the incident directions omega_i. - for (int l = 0; l < SAMPLE_COUNT; ++l) { - Angle theta = (Number(l) + 0.5) * dtheta; - Number cos_theta = cos(theta); - Number sin_theta = sin(theta); - bool ray_r_theta_intersects_ground = - RayIntersectsGround(atmosphere, r, cos_theta); - - // The distance and transmittance to the ground only depend on theta, so we - // can compute them in the outer loop for efficiency. - Length distance_to_ground = 0.0 * m; - DimensionlessSpectrum transmittance_to_ground = DimensionlessSpectrum(0.0, 0.0, 0.0); - DimensionlessSpectrum ground_albedo = DimensionlessSpectrum(0.0, 0.0, 0.0); - if (ray_r_theta_intersects_ground) { - distance_to_ground = - DistanceToBottomAtmosphereBoundary(atmosphere, r, cos_theta); - transmittance_to_ground = - GetTransmittance(atmosphere, transmittance_texture, transmittance_size, r, cos_theta, - distance_to_ground, true /* ray_intersects_ground */); - ground_albedo = atmosphere.ground_albedo; - } - - for (int m = 0; m < 2 * SAMPLE_COUNT; ++m) { - Angle phi = (Number(m) + 0.5) * dphi; - vec3 omega_i = - vec3(cos(phi) * sin_theta, sin(phi) * sin_theta, cos_theta); - SolidAngle domega_i = (dtheta / rad) * (dphi / rad) * sin(theta) * sr; - - // The radiance L_i arriving from direction omega_i after n-1 bounces is - // the sum of a term given by the precomputed scattering texture for the - // (n-1)-th order: - Number nu1 = dot(omega_s, omega_i); - RadianceSpectrum incident_radiance = GetScattering(atmosphere, - single_rayleigh_scattering_texture, single_mie_scattering_texture, - multiple_scattering_texture, scattering_size, r, omega_i.z, mu_s, nu1, - ray_r_theta_intersects_ground, scattering_order - 1); - - // and of the contribution from the light paths with n-1 bounces and whose - // last bounce is on the ground. This contribution is the product of the - // transmittance to the ground, the ground albedo, the ground BRDF, and - // the irradiance received on the ground after n-2 bounces. - vec3 ground_normal = - normalize(zenith_direction * r + omega_i * distance_to_ground); - IrradianceSpectrum ground_irradiance = GetIrradiance( - atmosphere, irradiance_texture, irradiance_size, atmosphere.bottom_radius, - dot(ground_normal, omega_s)); - incident_radiance += transmittance_to_ground * - ground_albedo * (1.0 / (PI * sr)) * ground_irradiance; - - // The radiance finally scattered from direction omega_i towards direction - // -omega is the product of the incident radiance, the scattering - // coefficient, and the phase function for directions omega and omega_i - // (all this summed over all particle types, i.e. Rayleigh and Mie). - Number nu2 = dot(omega, omega_i); - Number rayleigh_density = GetScaleHeight( - r - atmosphere.bottom_radius, atmosphere.rayleigh_scale_height); - Number mie_density = GetScaleHeight( - r - atmosphere.bottom_radius, atmosphere.mie_scale_height); - - rayleigh_mie += incident_radiance * ( - atmosphere.rayleigh_scattering * rayleigh_density * - RayleighPhaseFunction(nu2) + - atmosphere.mie_scattering * mie_density * - MiePhaseFunction(atmosphere.mie_phase_function_g, nu2)) * - domega_i; - } - } - return rayleigh_mie; -} - -RadianceSpectrum ComputeMultipleScattering( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(ScatteringDensityTexture) scattering_density_texture, - uint3 scattering_size, - Length r, Number mu, Number mu_s, Number nu, - bool ray_r_mu_intersects_ground) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - assert(mu_s >= -1.0 && mu_s <= 1.0); - - // Number of intervals for the numerical integration. - const int SAMPLE_COUNT = 50; - // The integration step, i.e. the length of each integration interval. - Length dx = - DistanceToNearestAtmosphereBoundary( - atmosphere, r, mu, ray_r_mu_intersects_ground) / - Number(SAMPLE_COUNT); - // Integration loop. - RadianceSpectrum rayleigh_mie_sum = - RadianceSpectrum(0.0, 0.0, 0.0); - for (int i = 0; i <= SAMPLE_COUNT; ++i) { - Length d_i = Number(i) * dx; - - // The r, mu and mu_s parameters at the current integration point (see the - // single scattering section for a detailed explanation). - Length r_i = - ClampRadius(atmosphere, sqrt(d_i * d_i + 2.0 * r * mu * d_i + r * r)); - Number mu_i = ClampCosine((r * mu + d_i) / r_i); - Number mu_s_i = ClampCosine((r * mu_s + d_i * nu) / r_i); - - // The Rayleigh and Mie multiple scattering at the current sample point. - RadianceSpectrum rayleigh_mie_i = - SampleScattering( - atmosphere, scattering_density_texture, scattering_size, r_i, mu_i, mu_s_i, - ray_r_mu_intersects_ground) * - GetTransmittance( - atmosphere, transmittance_texture, transmittance_size, r, mu, d_i, - ray_r_mu_intersects_ground) * - dx; - // Sample weight (from the trapezoidal rule). - Number weight_i = (i == 0 || i == SAMPLE_COUNT) ? 0.5 : 1.0; - rayleigh_mie_sum += rayleigh_mie_i * weight_i; - } - return rayleigh_mie_sum; -} - -RadianceDensitySpectrum ComputeScatteringDensityTexture( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 scattering_size, - IN(IrradianceTexture) irradiance_texture, - uint2 irradiance_size, - IN(vec3) frag_coord, int scattering_order) { - Length r; - Number mu; - Number mu_s; - Number nu; - - bool ray_r_mu_intersects_ground; - GetRMuMuSNuFromScatteringTextureUvwz(atmosphere, frag_coord, - r, mu, mu_s, ray_r_mu_intersects_ground, scattering_size); - nu = GetNuFromMuMus(mu, mu_s); - return ComputeScatteringDensity(atmosphere, transmittance_texture, transmittance_size, - single_rayleigh_scattering_texture, single_mie_scattering_texture, - multiple_scattering_texture, scattering_size, irradiance_texture, irradiance_size, r, mu, mu_s, nu, - scattering_order); -} - -RadianceSpectrum ComputeMultipleScatteringTexture( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(ScatteringDensityTexture) scattering_density_texture, - uint3 scattering_size, - IN(vec3) frag_coord) { - Length r; - Number mu; - Number mu_s; - Number nu; - bool ray_r_mu_intersects_ground; - GetRMuMuSNuFromScatteringTextureUvwz(atmosphere, frag_coord, - r, mu, mu_s, ray_r_mu_intersects_ground, scattering_size); - nu = GetNuFromMuMus(mu, mu_s); - return ComputeMultipleScattering(atmosphere, transmittance_texture, transmittance_size, - scattering_density_texture, scattering_size, r, mu, mu_s, nu, - ray_r_mu_intersects_ground); -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc.meta b/Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc.meta deleted file mode 100644 index 602d9b7e1..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1d94410a36635724f887c5648062ed59 -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc b/Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc deleted file mode 100644 index 4c4dde2d2..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc +++ /dev/null @@ -1,245 +0,0 @@ -#ifndef __SINGLE_SCATTERING_HELPER__ -#define __SINGLE_SCATTERING_HELPER__ - -#include "Common.cginc" -#include "TransmittanceHelper.cginc" - -void ComputeSingleScatteringIntegrand( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu, Number mu_s, Number nu, Length d, - bool ray_r_mu_intersects_ground, - OUT(DimensionlessSpectrum) rayleigh, OUT(DimensionlessSpectrum) mie) { - - Length r_d = ClampRadius(atmosphere, sqrt(d * d + 2.0 * r * mu * d + r * r)); - Number mu_s_d = ClampCosine((r * mu_s + d * nu) / r_d); - DimensionlessSpectrum transmittance = - GetTransmittance( - atmosphere, transmittance_texture, texture_size, r, mu, d, - ray_r_mu_intersects_ground) * - GetTransmittanceToSun( - atmosphere, transmittance_texture, texture_size, r_d, mu_s_d); - rayleigh = transmittance * GetScaleHeight(r_d - atmosphere.bottom_radius, atmosphere.rayleigh_scale_height); - mie = transmittance * GetScaleHeight(r_d - atmosphere.bottom_radius, atmosphere.rayleigh_scale_height); -} - -void ComputeSingleScattering( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu, Number mu_s, Number nu, - bool ray_r_mu_intersects_ground, - OUT(IrradianceSpectrum) rayleigh, OUT(IrradianceSpectrum) mie) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - assert(mu_s >= -1.0 && mu_s <= 1.0); - - - // Number of intervals for the numerical integration. - const int SAMPLE_COUNT = 50; - // The integration step, i.e. the length of each integration interval. - Length dx = - DistanceToNearestAtmosphereBoundary(atmosphere, r, mu, - ray_r_mu_intersects_ground) / Number(SAMPLE_COUNT); - // Integration loop. - DimensionlessSpectrum rayleigh_sum = DimensionlessSpectrum(0.0, 0.0, 0.0); - DimensionlessSpectrum mie_sum = DimensionlessSpectrum(0.0, 0.0, 0.0); - for (int i = 0; i <= SAMPLE_COUNT; ++i) { - Length d_i = Number(i) * dx; - // The Rayleigh and Mie single scattering at the current sample point. - DimensionlessSpectrum rayleigh_i; - DimensionlessSpectrum mie_i; - ComputeSingleScatteringIntegrand(atmosphere, transmittance_texture, texture_size, - r, mu, mu_s, nu, d_i, ray_r_mu_intersects_ground, rayleigh_i, mie_i); - // Sample weight (from the trapezoidal rule). - Number weight_i = (i == 0 || i == SAMPLE_COUNT) ? 0.5 : 1.0; - rayleigh_sum += rayleigh_i * weight_i; - mie_sum += mie_i * weight_i; - } - //Phase function terms are not added yet. See GetScattering.(And also, we need to store rayleigh and mie seprately, since they use different phase functions.) - rayleigh = rayleigh_sum * dx * atmosphere.solar_irradiance * atmosphere.rayleigh_scattering; - mie = mie_sum * dx * atmosphere.solar_irradiance * atmosphere.mie_scattering; -} - -vec3 GetScatteringTextureUvwzFromRMuMuSNu(IN(AtmosphereParameters) atmosphere, - Length r, Number mu, Number mu_s, uint3 texture_size, - bool ray_r_mu_intersects_ground) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - assert(mu_s >= -1.0 && mu_s <= 1.0); - - // Distance to top atmosphere boundary for a horizontal ray at ground level. - Length H = sqrt(atmosphere.top_radius * atmosphere.top_radius - - atmosphere.bottom_radius * atmosphere.bottom_radius); - // Distance to the horizon. - Length rho = - SafeSqrt(r * r - atmosphere.bottom_radius * atmosphere.bottom_radius); - Number u_r = GetTextureCoordFromUnitRange(rho / H, texture_size.z); - - // Discriminant of the quadratic equation for the intersections of the ray - // (r,mu) with the ground (see RayIntersectsGround). - Length r_mu = r * mu; - Area discriminant = - r_mu * r_mu - r * r + atmosphere.bottom_radius * atmosphere.bottom_radius; - Number u_mu; - if (ray_r_mu_intersects_ground) { - // Distance to the ground for the ray (r,mu), and its minimum and maximum - // values over all mu - obtained for (r,-1) and (r,mu_horizon). - Length d = -r_mu - SafeSqrt(discriminant); - Length d_min = r - atmosphere.bottom_radius; - Length d_max = rho; - u_mu = 0.5 - 0.5 * GetTextureCoordFromUnitRange(d_max == d_min ? 0.0 : - (d - d_min) / (d_max - d_min), texture_size.y / 2); - } - else { - // Distance to the top atmosphere boundary for the ray (r,mu), and its - // minimum and maximum values over all mu - obtained for (r,1) and - // (r,mu_horizon). - Length d = -r_mu + SafeSqrt(discriminant + H * H); - Length d_min = atmosphere.top_radius - r; - Length d_max = rho + H; - u_mu = 0.5 + 0.5 * GetTextureCoordFromUnitRange( - (d - d_min) / (d_max - d_min), texture_size.y / 2); - } - - Length d = DistanceToTopAtmosphereBoundary( - atmosphere, atmosphere.bottom_radius, mu_s); - Length d_min = atmosphere.top_radius - atmosphere.bottom_radius; - Length d_max = H; - Number a = (d - d_min) / (d_max - d_min); - Number A = - -2.0 * atmosphere.mu_s_min * atmosphere.bottom_radius / (d_max - d_min); - Number u_mu_s = GetTextureCoordFromUnitRange( - max(1.0 - a / A, 0.0) / (1.0 + a), texture_size.x); - - return vec3(u_mu_s, u_mu, u_r); -} - -void GetRMuMuSNuFromScatteringTextureUvwz(IN(AtmosphereParameters) atmosphere, - IN(vec3) uvwz, OUT(Length) r, OUT(Number) mu, OUT(Number) mu_s, OUT(bool) ray_r_mu_intersects_ground, - uint3 scattering_size -) { - assert(uvwz.x >= 0.0 && uvwz.x <= 1.0); - assert(uvwz.y >= 0.0 && uvwz.y <= 1.0); - assert(uvwz.z >= 0.0 && uvwz.z <= 1.0); - - // Distance to top atmosphere boundary for a horizontal ray at ground level. - Length H = sqrt(atmosphere.top_radius * atmosphere.top_radius - - atmosphere.bottom_radius * atmosphere.bottom_radius); - // Distance to the horizon. - Length rho = - H * GetUnitRangeFromTextureCoord(uvwz.z, scattering_size.z); - r = sqrt(rho * rho + atmosphere.bottom_radius * atmosphere.bottom_radius); - - if (uvwz.y < 0.5) { - // Distance to the ground for the ray (r,mu), and its minimum and maximum - // values over all mu - obtained for (r,-1) and (r,mu_horizon) - from which - // we can recover mu: - Length d_min = r - atmosphere.bottom_radius; - Length d_max = rho; - Length d = d_min + (d_max - d_min) * GetUnitRangeFromTextureCoord( - 1.0 - 2.0 * uvwz.y, scattering_size.y / 2); - mu = d == 0.0 * m ? Number(-1.0) : - ClampCosine(-(rho * rho + d * d) / (2.0 * r * d)); - ray_r_mu_intersects_ground = true; - } - else { - // Distance to the top atmosphere boundary for the ray (r,mu), and its - // minimum and maximum values over all mu - obtained for (r,1) and - // (r,mu_horizon) - from which we can recover mu: - Length d_min = atmosphere.top_radius - r; - Length d_max = rho + H; - Length d = d_min + (d_max - d_min) * GetUnitRangeFromTextureCoord( - 2.0 * uvwz.y - 1.0, scattering_size.y / 2); - mu = d == 0.0 * m ? Number(1.0) : - ClampCosine((H * H - rho * rho - d * d) / (2.0 * r * d)); - ray_r_mu_intersects_ground = false; - } - - Number x_mu_s = - GetUnitRangeFromTextureCoord(uvwz.x, scattering_size.x); - Length d_min = atmosphere.top_radius - atmosphere.bottom_radius; - Length d_max = H; - Number A = - -2.0 * atmosphere.mu_s_min * atmosphere.bottom_radius / (d_max - d_min); - Number a = (A - x_mu_s * A) / (1.0 + x_mu_s * A); - Length d = d_min + min(a, A) * (d_max - d_min); - mu_s = d == 0.0 * m ? Number(1.0) : - ClampCosine((H * H - d * d) / (2.0 * atmosphere.bottom_radius * d)); -} - -void ComputeSingleScatteringTexture(IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 transmittance_size, - IN(vec3) gl_frag_coord, - uint3 scattering_size, - OUT(IrradianceSpectrum) rayleigh, - OUT(IrradianceSpectrum) mie) { - - Length r; - Number mu; - Number mu_s; - bool ray_r_mu_intersects_ground; - GetRMuMuSNuFromScatteringTextureUvwz(atmosphere, gl_frag_coord, - r, mu, mu_s, ray_r_mu_intersects_ground, scattering_size); - Number nu = GetNuFromMuMus(mu, mu_s); - ComputeSingleScattering(atmosphere, transmittance_texture, transmittance_size, - r, mu, mu_s, nu, ray_r_mu_intersects_ground, rayleigh, mie); -} - -RadianceSpectrum SampleScattering( - IN(AtmosphereParameters) atmosphere, - IN(ScatteringTexture) scattering_texture, - uint3 texture_size, - Length r, Number mu, Number mu_s, bool ray_r_mu_intersects_ground - -) { - vec3 uvwz = GetScatteringTextureUvwzFromRMuMuSNu( - atmosphere, r, mu, mu_s, texture_size, ray_r_mu_intersects_ground); - return tex3Dlod(scattering_texture, float4(uvwz, 0.0)).rgb; -} - -RadianceSpectrum SampleScatteringLerped( - IN(AtmosphereParameters) atmosphere, - IN(ScatteringTexture) scattering_texture, - IN(ScatteringTexture) scattering_texture_2, - float lerpValue, - uint3 texture_size, - Length r, Number mu, Number mu_s, bool ray_r_mu_intersects_ground - -) { - vec3 uvwz = GetScatteringTextureUvwzFromRMuMuSNu( - atmosphere, r, mu, mu_s, texture_size, ray_r_mu_intersects_ground); - return lerp(tex3Dlod(scattering_texture, float4(uvwz, 0.0)).rgb, tex3Dlod(scattering_texture_2, float4(uvwz, 0.0)).rgb, lerpValue); -} - -RadianceSpectrum GetScattering( - IN(AtmosphereParameters) atmosphere, - IN(ReducedScatteringTexture) single_rayleigh_scattering_texture, - IN(ReducedScatteringTexture) single_mie_scattering_texture, - IN(ScatteringTexture) multiple_scattering_texture, - uint3 texture_size, - Length r, Number mu, Number mu_s, Number nu, - bool ray_r_mu_intersects_ground, - int scattering_order - ) { - - if (scattering_order == 1) { - IrradianceSpectrum rayleigh = SampleScattering( - atmosphere, single_rayleigh_scattering_texture, texture_size, r, mu, mu_s, - ray_r_mu_intersects_ground); - IrradianceSpectrum mie = SampleScattering( - atmosphere, single_mie_scattering_texture, texture_size, r, mu, mu_s, - ray_r_mu_intersects_ground); - return rayleigh * RayleighPhaseFunction(nu) + - mie * MiePhaseFunction(atmosphere.mie_phase_function_g, nu); - } - else { - return SampleScattering( - atmosphere, multiple_scattering_texture, texture_size, r, mu, mu_s, - ray_r_mu_intersects_ground); - } -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc.meta b/Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc.meta deleted file mode 100644 index 49fa16a8d..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2ef315dd659e48f49ab150ef0aed889b -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader b/Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader deleted file mode 100644 index 3078ec50b..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader +++ /dev/null @@ -1,108 +0,0 @@ -// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' - -Shader "Skybox/AtmosphereScatteringPrecomputed" -{ - Properties - { - } - SubShader - { - // No culling or depth - Cull Off - ZWrite Off - Tags{ - "PreviewType" = "Skybox" - } - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - #include "UnityCG.cginc" - #include "Lighting.cginc" - #include "MultipleScatteringHelper.cginc" - #include "AerialPerspectiveHelper.cginc" - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - float4 vertex : SV_POSITION; - float4 worldPos : TEXCOORD1; - }; - - v2f vert (appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = v.uv; - o.worldPos = mul(unity_ObjectToWorld, v.vertex); - return o; - } - - float _LightScale; - - RadianceSpectrum GetScattering( - IN(AtmosphereParameters) atmosphere, - IN(ScatteringTexture) scattering_texture, - uint3 texture_size, - Length r, Number mu, Number mu_s, bool ray_r_mu_intersects_ground - ); - - void ComputeSingleScattering( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu, Number mu_s, Number nu, - bool ray_r_mu_intersects_ground, - OUT(IrradianceSpectrum) rayleigh, OUT(IrradianceSpectrum) mie); - - half4 frag (v2f i) : SV_Target - { - i.worldPos /= i.worldPos.w; - float3 view_ray = normalize(i.worldPos.xyz - _WorldSpaceCameraPos); - float3 sun_direction = normalize(_WorldSpaceLightPos0.xyz); - AtmosphereParameters atm = GetAtmParameters(); - float3 camera = _WorldSpaceCameraPos + float3(0, atm.bottom_radius, 0); - float r = length(camera); - r = max(r, atm.bottom_radius + 1.0f); //r below bottom_radius causes glitch. - Length rmu = dot(camera, view_ray); - - Length distance_to_top_atmosphere_boundary = -rmu - - sqrt(rmu * rmu - r * r + atm.top_radius * atm.top_radius); - - if (distance_to_top_atmosphere_boundary > 0.0 ) { - camera = camera + view_ray * distance_to_top_atmosphere_boundary; - r = atm.top_radius; - rmu += distance_to_top_atmosphere_boundary; - } - else if (r > atm.top_radius) { - // If the view ray does not intersect the atmosphere, simply return 0. - return 0.0f; - } - - // Compute the r, mu, mu_s and nu parameters needed for the texture lookups. - Number mu = rmu / r; - Number mu_s = dot(camera, sun_direction) / r; - Number nu = dot(view_ray, sun_direction); - bool ray_r_mu_intersects_ground = RayIntersectsGround(atm, r, mu); - - float3 transmittance = GetTransmittanceToTopAtmosphereBoundaryLerped(r, mu) * (ray_r_mu_intersects_ground ? 0.0f : 1.0f); - - float3 direct_sun_strength = 0.0f; - if (!ray_r_mu_intersects_ground) - { - direct_sun_strength = EvaluateSunDiskRadianceOfUnitRadiance(atm, r, mu, nu) * transmittance; - } - return half4((direct_sun_strength + GetTotalScatteringLerped(r, mu, mu_s, nu, ray_r_mu_intersects_ground)), 0.0f); - } - ENDCG - } - } -} diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader.meta b/Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader.meta deleted file mode 100644 index 417a8b063..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/SkyboxRendering.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e2088dd19a71d1244976cd0de1ff68a7 -timeCreated: 1531897513 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc b/Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc deleted file mode 100644 index 4625646ac..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc +++ /dev/null @@ -1,144 +0,0 @@ -#ifndef __TRANSMITTANCE_HELPER__ -#define __TRANSMITTANCE_HELPER__ - -#include "Common.cginc" - -vec2 GetTransmittanceTextureUvFromRMu(IN(AtmosphereParameters) atmosphere, - Length r, Number mu, uint2 texture_size) { - // Distance to top atmosphere boundary for a horizontal ray at ground level. - Length H = sqrt(atmosphere.top_radius * atmosphere.top_radius - - atmosphere.bottom_radius * atmosphere.bottom_radius); - // Distance to the horizon. - Length rho = - SafeSqrt(r * r - atmosphere.bottom_radius * atmosphere.bottom_radius); - // Distance to the top atmosphere boundary for the ray (r,mu), and its minimum - // and maximum values over all mu - obtained for (r,1) and (r,mu_horizon). - Length d = DistanceToTopAtmosphereBoundary(atmosphere, r, mu); - Length d_min = atmosphere.top_radius - r; - Length d_max = rho + H; - Number x_mu = (d - d_min) / (d_max - d_min); - Number x_r = rho / H; - return vec2(GetTextureCoordFromUnitRange(x_mu, texture_size.x), - GetTextureCoordFromUnitRange(x_r, texture_size.y)); -} - -void GetRMuFromTransmittanceTextureUv(IN(AtmosphereParameters) atmosphere, - IN(vec2) uv, OUT(Length) r, OUT(Number) mu, int TRANSMITTANCE_TEXTURE_WIDTH, int TRANSMITTANCE_TEXTURE_HEIGHT) { - assert(uv.x >= 0.0 && uv.x <= 1.0); - assert(uv.y >= 0.0 && uv.y <= 1.0); - Number x_mu = GetUnitRangeFromTextureCoord(uv.x, TRANSMITTANCE_TEXTURE_WIDTH); - Number x_r = GetUnitRangeFromTextureCoord(uv.y, TRANSMITTANCE_TEXTURE_HEIGHT); - // Distance to top atmosphere boundary for a horizontal ray at ground level. - Length H = sqrt(atmosphere.top_radius * atmosphere.top_radius - - atmosphere.bottom_radius * atmosphere.bottom_radius); - // Distance to the horizon, from which we can compute r: - Length rho = H * x_r; - r = sqrt(rho * rho + atmosphere.bottom_radius * atmosphere.bottom_radius); - // Distance to the top atmosphere boundary for the ray (r,mu), and its minimum - // and maximum values over all mu - obtained for (r,1) and (r,mu_horizon) - - // from which we can recover mu: - Length d_min = atmosphere.top_radius - r; - Length d_max = rho + H; - Length d = d_min + x_mu * (d_max - d_min); - mu = d == 0.0 ? Number(1.0) : (H * H - rho * rho - d * d) / (2.0 * r * d); - mu = ClampCosine(mu); -} - -DimensionlessSpectrum GetTransmittanceToTopAtmosphereBoundary( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - - vec2 uv = GetTransmittanceTextureUvFromRMu(atmosphere, r, mu, texture_size); - return DimensionlessSpectrum(tex2Dlod(transmittance_texture, float4(uv, 0, 0)).rgb); -} - -DimensionlessSpectrum GetTransmittanceToSun( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu_s) { - Number sin_theta_h = atmosphere.bottom_radius / r; - Number cos_theta_h = -sqrt(max(1.0 - sin_theta_h * sin_theta_h, 0.0)); - return GetTransmittanceToTopAtmosphereBoundary( - atmosphere, transmittance_texture, texture_size, r, mu_s) * - smoothstep(-sin_theta_h * atmosphere.sun_angular_radius / rad, - sin_theta_h * atmosphere.sun_angular_radius / rad, - mu_s - cos_theta_h); -} - -Length ComputeOpticalLengthToTopAtmosphereBoundary( - IN(AtmosphereParameters) atmosphere, Length r, Number mu, Length scale_height) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - // Number of intervals for the numerical integration. - const int SAMPLE_COUNT = 500; - // The integration step, i.e. the length of each integration interval. - Length dx = - DistanceToTopAtmosphereBoundary(atmosphere, r, mu) / Number(SAMPLE_COUNT); - // Integration loop. - Length result = 0.0; - for (int i = 0; i <= SAMPLE_COUNT; ++i) { - Length d_i = Number(i) * dx; - // Distance between the current sample point and the planet center. - Length r_i = sqrt(d_i * d_i + 2.0 * r * mu * d_i + r * r); - // Number density at the current sample point (divided by the number density - // at the bottom of the atmosphere, yielding a dimensionless number). - Number y_i = GetScaleHeight(r_i - atmosphere.bottom_radius, scale_height); - // Sample weight (from the trapezoidal rule). - Number weight_i = i == 0 || i == SAMPLE_COUNT ? 0.5 : 1.0; - result += y_i * weight_i * dx; - } - return result; -} - -DimensionlessSpectrum ComputeTransmittanceToTopAtmosphereBoundary( - IN(AtmosphereParameters) atmosphere, Length r, Number mu) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - return exp(-( - atmosphere.rayleigh_scattering * - ComputeOpticalLengthToTopAtmosphereBoundary( - atmosphere, r, mu, atmosphere.rayleigh_scale_height) + - atmosphere.mie_extinction * - ComputeOpticalLengthToTopAtmosphereBoundary( - atmosphere, r, mu, atmosphere.mie_scale_height) + - atmosphere.absorption_extinction * - ComputeOpticalLengthToTopAtmosphereBoundary( - atmosphere, r, mu, atmosphere.absorption_extinction_scale_height) - ) - ); -} - -DimensionlessSpectrum GetTransmittance( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu, Length d, bool ray_r_mu_intersects_ground) { - assert(r >= atmosphere.bottom_radius && r <= atmosphere.top_radius); - assert(mu >= -1.0 && mu <= 1.0); - assert(d >= 0.0 * m); - - Length r_d = ClampRadius(atmosphere, sqrt(d * d + 2.0 * r * mu * d + r * r)); - Number mu_d = ClampCosine((r * mu + d) / r_d); - - if (ray_r_mu_intersects_ground) { - return min( - GetTransmittanceToTopAtmosphereBoundary( - atmosphere, transmittance_texture, texture_size, r_d, -mu_d) / - GetTransmittanceToTopAtmosphereBoundary( - atmosphere, transmittance_texture, texture_size, r, -mu), - DimensionlessSpectrum(1.0, 1.0, 1.0)); - } - else { - return min( - GetTransmittanceToTopAtmosphereBoundary( - atmosphere, transmittance_texture, texture_size, r, mu) / - GetTransmittanceToTopAtmosphereBoundary( - atmosphere, transmittance_texture, texture_size, r_d, mu_d), - DimensionlessSpectrum(1.0, 1.0, 1.0)); - } -} -#endif \ No newline at end of file diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc.meta b/Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc.meta deleted file mode 100644 index 5d9418e02..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c7015e6cfed6e2e46992e2af76282301 -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader b/Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader deleted file mode 100644 index 5b9f8b665..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader +++ /dev/null @@ -1,58 +0,0 @@ -Shader "Unlit/VolumeTexturePreview" -{ - Properties - { - _MainTex ("Texture", 3D) = "white" {} - } - SubShader - { - Tags { "RenderType"="Opaque" } - LOD 100 - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - // make fog work - #pragma multi_compile_fog - - #include "UnityCG.cginc" - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - UNITY_FOG_COORDS(1) - float4 vertex : SV_POSITION; - float4 worldPos : TEXCOORD1; - }; - - sampler3D _MainTex; - float4 _MainTex_ST; - - v2f vert (appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = TRANSFORM_TEX(v.uv, _MainTex); - o.worldPos = mul(unity_ObjectToWorld, v.vertex); - UNITY_TRANSFER_FOG(o,o.vertex); - return o; - } - - fixed4 frag (v2f i) : SV_Target - { - // sample the texture - fixed4 col = tex3D(_MainTex, i.worldPos / i.worldPos.w); - return col; - } - ENDCG - } - } -} diff --git a/Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader.meta b/Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader.meta deleted file mode 100644 index b92f7b6b9..000000000 --- a/Assets/Plugins/AtmosphereScattering/Shaders/VolumeTexturePreview.shader.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e6e68121d3504774dbf546d1f331c83a -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Transparent.meta b/Assets/Plugins/AtmosphereScattering/Transparent.meta deleted file mode 100644 index d11a74147..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 37b0cb2f245dc7b4cb3dda322844678e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity b/Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity deleted file mode 100644 index d68b1a917..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity +++ /dev/null @@ -1,526 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.17984006, g: 0.22517684, b: 0.3066335, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 0 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &7102893 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 7102896} - - component: {fileID: 7102895} - - component: {fileID: 7102894} - - component: {fileID: 7102898} - - component: {fileID: 7102897} - - component: {fileID: 7102899} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &7102894 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 ---- !u!20 &7102895 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 10000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &7102896 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -172.5} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &7102897 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3} - m_Name: - m_EditorClassIdentifier: - profile: {fileID: 11400000, guid: 16ee1eaff8bdab6429f048d7a5b1d15f, type: 2} ---- !u!114 &7102898 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 45d85419f2e23c540999c1a1fee6ed90, type: 3} - m_Name: - m_EditorClassIdentifier: - distance: 10 - center: {x: 0, y: 0, z: 0} - scale: 1 - distanceSpeed: 0.1 - rotationSpeed: 0.1 ---- !u!114 &7102899 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 7102893} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b535dacf702e20c4b9ef528e42081835, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTexSize: {x: 128, y: 128, z: 32} ---- !u!1 &74323546 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 74323548} - - component: {fileID: 74323547} - - component: {fileID: 74323549} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &74323547 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 74323546} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &74323548 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 74323546} - m_LocalRotation: {x: 0.43573615, y: -0, z: -0, w: 0.9000745} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 51.664, y: 0, z: 0} ---- !u!114 &74323549 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 74323546} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 325c269146dc2ac49b190f730a961573, type: 3} - m_Name: - m_EditorClassIdentifier: - basePosition: {x: 0, y: 50, z: 0} ---- !u!1 &297555710 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 297555712} - - component: {fileID: 297555711} - m_Layer: 0 - m_Name: LutManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &297555711 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 297555710} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e16dd2ddbdfa7ea4f87a3cfb032ffd0f, type: 3} - m_Name: - m_EditorClassIdentifier: - computeShader: {fileID: 7200000, guid: 2d4396a54b390d742b84d4bb4a122e54, type: 3} - outputDebug: 0 - lutConfig: - transmittanceSize: {x: 256, y: 128} - scatteringSize: {x: 32, y: 128, z: 32} - irradianceSize: {x: 64, y: 32} - cameraVolumeSize: {x: 128, y: 128, z: 32} - atmosphereConfig: {fileID: 11400000, guid: 8e73e89daf00b8447b2410427953df25, type: 2} - skyboxMaterial: {fileID: 0} ---- !u!4 &297555712 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 297555710} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2.736024, y: 2.8123064, z: -0.70711327} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &563571916 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 563571920} - - component: {fileID: 563571919} - - component: {fileID: 563571918} - - component: {fileID: 563571917} - m_Layer: 0 - m_Name: Opaque - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &563571917 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 563571916} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 2100000, guid: 222fb78855dcd5c42b991cd095da28fa, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!65 &563571918 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 563571916} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &563571919 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 563571916} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &563571920 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 563571916} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2484, y: 1, z: -4.01} - m_LocalScale: {x: 1655.8981, y: 82.79491, z: 1655.8981} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1764631964 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1764631968} - - component: {fileID: 1764631967} - - component: {fileID: 1764631966} - - component: {fileID: 1764631965} - m_Layer: 0 - m_Name: Transparent - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!23 &1764631965 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_Materials: - - {fileID: 2100000, guid: b928a4c54f20eaa458c853f105a16f9a, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!65 &1764631966 -BoxCollider: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Size: {x: 1, y: 1, z: 1} - m_Center: {x: 0, y: 0, z: 0} ---- !u!33 &1764631967 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1764631968 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1764631964} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -4.01} - m_LocalScale: {x: 1655.8981, y: 82.79491, z: 1655.8981} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity.meta b/Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity.meta deleted file mode 100644 index 61e259a1a..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/CompareScene.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 694a3c0c25cb46646891cc9878b1ee07 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat b/Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat deleted file mode 100644 index d576c0dde..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Opaque - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _BumpScale: 1 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 1 - m_Colors: - - _Color: {r: 0, g: 0, b: 0, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat.meta b/Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat.meta deleted file mode 100644 index 86611eec7..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/Opaque.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 222fb78855dcd5c42b991cd095da28fa -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat b/Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat deleted file mode 100644 index 1c84e4bdf..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Transparent-Ap - m_Shader: {fileID: 4800000, guid: 7060206adfb8023499f89d502c3431fa, type: 3} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _BumpScale: 1 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _GlossMapScale: 1 - - _Glossiness: 0 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 1 - m_Colors: - - _Color: {r: 0, g: 0, b: 0, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat.meta b/Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat.meta deleted file mode 100644 index 17f70019a..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/Transparent-Ap.mat.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b928a4c54f20eaa458c853f105a16f9a -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2100000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader b/Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader deleted file mode 100644 index ade6e8ce5..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader +++ /dev/null @@ -1,100 +0,0 @@ -Shader "Ap/TransparentExample" { - Properties { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _Metallic ("Metallic", Range(0,1)) = 0.0 - } - SubShader { - Tags { - "RenderType"="Transparent" - "Queue" = "Transparent" - } - LOD 200 - - CGPROGRAM - //We enable alpha to use transparent - //Use finalcolor modifier to add ap to final result. - //And we need custom vs to calculate ap info on every vertex. - #pragma surface surf Standard fullforwardshadows alpha finalcolor:aerialPerspective vertex:vert - - // Use shader model 3.0 target, to get nicer looking lighting - #pragma target 3.0 - - - //Declare these values to use later. - float3 _SunIrradianceOnAtm; - sampler3D _CameraVolumeTransmittance; - sampler3D _CameraVolumeScattering; - - float3 GetTransmittanceWithCameraVolume(float3 uvw) { - return tex3Dlod(_CameraVolumeTransmittance, float4(uvw, 0.0f)).rgb; - } - - float3 GetScatteringWithCameraVolume(float3 uvw) { - return tex3Dlod(_CameraVolumeScattering, float4(uvw, 0.0f)).rgb; - } - - struct Input { - float2 uv_MainTex; - - //Add these two to interpolate. Sample them from 3d volume in vertex shader. - float3 ap_transmittance; - float3 ap_scattering; - }; - - void vert(inout appdata_full v, out Input o) { - UNITY_INITIALIZE_OUTPUT(Input, o); - - //Get uv using clip pos. - float4 hpos = UnityObjectToClipPos(v.vertex); - float3 ap_volume_uvw = float3(hpos.xy / hpos.w, 0.0f); - ap_volume_uvw.xy = (ap_volume_uvw + 1.0f) / 2.0f; - - //Get w using view pos. - float3 view_pos = UnityObjectToViewPos(v.vertex); - view_pos.z *= -1; - ap_volume_uvw.z = (view_pos.z - _ProjectionParams.y) / (_ProjectionParams.z - _ProjectionParams.y); - - //Set them to output. - o.ap_transmittance = GetTransmittanceWithCameraVolume(ap_volume_uvw); - o.ap_scattering = GetScatteringWithCameraVolume(ap_volume_uvw); - } - - void aerialPerspective(Input IN, SurfaceOutputStandard o, inout fixed4 color) - { - //Edit final color using following formular. - color.xyz = color.xyz * IN.ap_transmittance + color.a * IN.ap_scattering * _SunIrradianceOnAtm; - - //I'm not pretty familiar with how Unity deal with Transparent and alpha, but it seems to be correct to mult scattering with color.a - } - - //======================================================================== - //Following are default standard shader setup. Nothing changed. - //======================================================================== - - sampler2D _MainTex; - half _Glossiness; - half _Metallic; - fixed4 _Color; - - // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. - // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. - // #pragma instancing_options assumeuniformscaling - UNITY_INSTANCING_BUFFER_START(Props) - // put more per-instance properties here - UNITY_INSTANCING_BUFFER_END(Props) - - void surf (Input IN, inout SurfaceOutputStandard o) { - // Albedo comes from a texture tinted by color - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - // Metallic and smoothness come from slider variables - o.Metallic = _Metallic; - o.Smoothness = _Glossiness; - o.Alpha = c.a; - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader.meta b/Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader.meta deleted file mode 100644 index f839a87af..000000000 --- a/Assets/Plugins/AtmosphereScattering/Transparent/TransparentExample.shader.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7060206adfb8023499f89d502c3431fa -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead.meta b/Assets/Plugins/Playdead.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead.meta rename to Assets/Plugins/Playdead.meta diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead/EffectBase.cs b/Assets/Plugins/Playdead/EffectBase.cs similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead/EffectBase.cs rename to Assets/Plugins/Playdead/EffectBase.cs diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead/EffectBase.cs.meta b/Assets/Plugins/Playdead/EffectBase.cs.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead/EffectBase.cs.meta rename to Assets/Plugins/Playdead/EffectBase.cs.meta diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead/Extensions.cs b/Assets/Plugins/Playdead/Extensions.cs similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead/Extensions.cs rename to Assets/Plugins/Playdead/Extensions.cs diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead/Extensions.cs.meta b/Assets/Plugins/Playdead/Extensions.cs.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead/Extensions.cs.meta rename to Assets/Plugins/Playdead/Extensions.cs.meta diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead/LICENSE.txt b/Assets/Plugins/Playdead/LICENSE.txt similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead/LICENSE.txt rename to Assets/Plugins/Playdead/LICENSE.txt diff --git a/Assets/Plugins/VolumeCloud/Scripts/Playdead/LICENSE.txt.meta b/Assets/Plugins/Playdead/LICENSE.txt.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/Playdead/LICENSE.txt.meta rename to Assets/Plugins/Playdead/LICENSE.txt.meta diff --git a/Assets/Plugins/VolumeCloud.meta b/Assets/Plugins/VolumeCloud.meta deleted file mode 100644 index 9e9e09198..000000000 --- a/Assets/Plugins/VolumeCloud.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f7a5905754299444c8c54e4e59668749 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Editor.meta b/Assets/Plugins/VolumeCloud/Editor.meta deleted file mode 100644 index 46913273e..000000000 --- a/Assets/Plugins/VolumeCloud/Editor.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a5355ed4c7ace6e4194bb0c52fd10fc3 -folderAsset: yes -timeCreated: 1521966588 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Editor/Config.asset b/Assets/Plugins/VolumeCloud/Editor/Config.asset deleted file mode 100644 index aae7dfb82..000000000 --- a/Assets/Plugins/VolumeCloud/Editor/Config.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88a78d9cc6f38c024b26166c8b4f881c95629890e93a2d96309e9990c7bf3871 -size 955 diff --git a/Assets/Plugins/VolumeCloud/Editor/Config.asset.meta b/Assets/Plugins/VolumeCloud/Editor/Config.asset.meta deleted file mode 100644 index d75398280..000000000 --- a/Assets/Plugins/VolumeCloud/Editor/Config.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: ff23f3c539d9073408464e0039314ed5 -timeCreated: 1521972532 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs b/Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs deleted file mode 100644 index cb441030f..000000000 --- a/Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using System; - -namespace Yangrc.VolumeCloud { - public class VolumeCloudWindowEditor : EditorWindow { - private VolumeCloudWindowConfigurations config { - get { - if (_config == null) { - _config = AssetDatabase.LoadAssetAtPath("Assets/VolumeCloud/Editor/Config.asset"); - if (_config == null) { - var newConfig = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(newConfig, "Assets/VolumeCloud/Editor/Config.asset"); - // AssetDatabase.IsValidFolder( - this._config = newConfig; - } - } - return _config; - } - } - private VolumeCloudWindowConfigurations _config; - private SerializedObject configSO { - get { - return _configSO ?? (_configSO = new SerializedObject(config)); - } - } - private SerializedObject _configSO; - - - private Texture2D testTexPreview; - private Texture2D firstTexPreview; - private Texture2D secondTexPreview; - - private Vector2 scrollPos; - - // Add menu named "My Window" to the Window menu - [MenuItem("Window/VolumeCloud")] - static void Init() { - // Get existing open window or if none, make a new one: - VolumeCloudWindowEditor window = (VolumeCloudWindowEditor)EditorWindow.GetWindow(typeof(VolumeCloudWindowEditor)); - window.Show(); - } - - private void OnGUI() { - - EditorGUI.BeginChangeCheck(); - scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.Width(position.width), GUILayout.Height(position.height)); - //Test only. - EditorGUILayout.BeginHorizontal();//Second 3d tex. - { - EditorGUILayout.BeginVertical(); - { //Config area. - EditorGUILayout.PropertyField(configSO.FindProperty("testGenerator"), true); - if (GUILayout.Button("Save tex")) { - var texture = Utils.GetTex(config.testGenerator, 128, TextureFormat.RGB24); - AssetDatabase.CreateAsset(texture, "Assets/VolumeCloud/" + "TestTex" + ".asset"); - AssetDatabase.SaveAssets(); - } - } - EditorGUILayout.EndVertical(); - if (configSO.FindProperty("testGenerator").isExpanded) { - EditorGUILayout.BeginVertical(GUILayout.Width(256.0f)); //Preview Area - { - if (GUILayout.Button("Preview")) { - testTexPreview = Utils.GetPreviewTex(config.testGenerator, 128, TextureFormat.RGFloat); - } - if (GUILayout.Button("Save preview")) { - AssetDatabase.CreateAsset(testTexPreview, "Assets/VolumeCloud/" + "curlNoise" + ".asset"); - AssetDatabase.SaveAssets(); - } - if (testTexPreview != null) { - GUI.DrawTexture(EditorGUILayout.GetControlRect(false, GUILayout.Width(256.0f), GUILayout.Height(256.0f)), testTexPreview); - } - } - EditorGUILayout.EndVertical(); - } - } - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.BeginHorizontal();// First 3d texture. - { - EditorGUILayout.BeginVertical(); - { //Config area. - EditorGUILayout.PropertyField(configSO.FindProperty("first3DTexGenerator"), true); - if (configSO.FindProperty("first3DTexGenerator").isExpanded) { - EditorGUILayout.PropertyField(configSO.FindProperty("first3DTexSaveName")); - if (GUILayout.Button("Save tex")) { - var texture = Utils.GetTex(config.first3DTexGenerator, config.first3DTexGenerator.texResolution); - AssetDatabase.CreateAsset(texture, "Assets/VolumeCloud/" + config.first3DTexSaveName + ".asset"); - AssetDatabase.SaveAssets(); - } - } - } - EditorGUILayout.EndVertical(); - EditorGUILayout.BeginVertical(GUILayout.Width(256.0f)); ; - { - if (GUILayout.Button("Preview")) - firstTexPreview = Utils.GetPreviewTex(config.first3DTexGenerator, config.first3DTexGenerator.texResolution); - if (firstTexPreview != null) - GUI.DrawTexture(EditorGUILayout.GetControlRect(false, GUILayout.Width(256.0f), GUILayout.Height(256.0f)), firstTexPreview); - } - EditorGUILayout.EndVertical(); - } - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.BeginHorizontal();//Second 3d tex. - { - EditorGUILayout.BeginVertical(); - { //Config area. - EditorGUILayout.PropertyField(configSO.FindProperty("second3DTexGenerator"), true); - if (configSO.FindProperty("second3DTexGenerator").isExpanded) { - EditorGUILayout.PropertyField(configSO.FindProperty("second3DTexSaveName")); - if (GUILayout.Button("Save tex")) { - var texture = Utils.GetTex(config.second3DTexGenerator, config.second3DTexGenerator.texResolution, TextureFormat.RGB24); - AssetDatabase.CreateAsset(texture, "Assets/VolumeCloud/" + config.second3DTexSaveName + ".asset"); - AssetDatabase.SaveAssets(); - } - } - } - EditorGUILayout.EndVertical(); - EditorGUILayout.BeginVertical(GUILayout.Width(256.0f)); //Preview Area - { - if (GUILayout.Button("Preview")) { - secondTexPreview = Utils.GetPreviewTex(config.second3DTexGenerator, config.second3DTexGenerator.texResolution); - } - if (secondTexPreview != null) { - GUI.DrawTexture(EditorGUILayout.GetControlRect(false, GUILayout.Width(256.0f), GUILayout.Height(256.0f)), secondTexPreview); - } - } - EditorGUILayout.EndVertical(); - } - EditorGUILayout.EndHorizontal(); - EditorGUILayout.EndScrollView(); - if (EditorGUI.EndChangeCheck()) { - configSO.ApplyModifiedProperties(); - } - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs.meta b/Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs.meta deleted file mode 100644 index 7f820225a..000000000 --- a/Assets/Plugins/VolumeCloud/Editor/VolumeCloudWindowEditor.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 7adc29af50ded2b4a90b86b7df94be23 -timeCreated: 1521969753 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example.meta b/Assets/Plugins/VolumeCloud/Example.meta deleted file mode 100644 index e6e028e89..000000000 --- a/Assets/Plugins/VolumeCloud/Example.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2cc7484e5816b124a98120309af6a4e7 -folderAsset: yes -timeCreated: 1530938310 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot1.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot1.meta deleted file mode 100644 index 60dd61c8e..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot1.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4aad6993da61d5549913dd868a11e328 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity b/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity deleted file mode 100644 index 0cd11e8d3..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity +++ /dev/null @@ -1,594 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 1432092516} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 49040651} - m_IndirectSpecularColor: {r: 0.019927999, g: 0.037775546, b: 0.06939693, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &49040650 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 49040652} - - component: {fileID: 49040651} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &49040651 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 0.95686275, g: 0.6813293, b: 0.3865726, a: 1} - m_Intensity: 2.02 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &49040652 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_LocalRotation: {x: -0.9797308, y: -0.13232979, z: 0.05140217, w: -0.1413304} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 523.11, y: -716.206, z: -14.820984} ---- !u!1 &636899334 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 636899336} - - component: {fileID: 636899335} - - component: {fileID: 636899337} - m_Layer: 8 - m_Name: AtmManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &636899335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 636899334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e16dd2ddbdfa7ea4f87a3cfb032ffd0f, type: 3} - m_Name: - m_EditorClassIdentifier: - progressiveUpdate: 0 - computeShader: {fileID: 7200000, guid: 2d4396a54b390d742b84d4bb4a122e54, type: 3} - outputDebug: 0 - lutConfig: - transmittanceSize: {x: 512, y: 512} - scatteringSize: {x: 32, y: 32, z: 128} - irradianceSize: {x: 32, y: 32} - cameraVolumeSize: {x: 128, y: 128, z: 32} - atmosphereConfig: {fileID: 11400000, guid: 8e73e89daf00b8447b2410427953df25, type: 2} ---- !u!4 &636899336 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 636899334} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &636899337 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 636899334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} - m_Name: - m_EditorClassIdentifier: - sharedProfile: {fileID: 11400000, guid: fb5c6f5333d1578418cdc5074b1c900e, type: 2} - isGlobal: 1 - blendDistance: 0 - weight: 1 - priority: 0 ---- !u!21 &1432092516 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Skybox/AtmosphereScatteringPrecomputed - m_Shader: {fileID: 4800000, guid: e2088dd19a71d1244976cd0de1ff68a7, type: 3} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: [] - m_Floats: [] - m_Colors: [] ---- !u!1 &1662884154 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1662884158} - - component: {fileID: 1662884157} - - component: {fileID: 1662884156} - - component: {fileID: 1662884155} - m_Layer: 0 - m_Name: Sphere - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!135 &1662884155 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1662884154} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0, z: 0} ---- !u!23 &1662884156 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1662884154} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1662884157 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1662884154} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1662884158 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1662884154} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -11124, y: -397, z: 5874} - m_LocalScale: {x: 7556.414, y: 7556.414, z: 7556.414} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1748146228 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1748146232} - - component: {fileID: 1748146231} - - component: {fileID: 1748146229} - - component: {fileID: 1748146234} - - component: {fileID: 1748146230} - - component: {fileID: 1748146236} - - component: {fileID: 1748146235} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1748146229 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 ---- !u!114 &1748146230 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTrigger: {fileID: 1748146232} - volumeLayer: - serializedVersion: 2 - m_Bits: 256 - stopNaNPropagation: 1 - finalBlitToCameraTarget: 0 - antialiasingMode: 3 - temporalAntialiasing: - jitterSpread: 0.75 - sharpness: 0.25 - stationaryBlending: 0.95 - motionBlending: 0.85 - subpixelMorphologicalAntialiasing: - quality: 2 - fastApproximateAntialiasing: - fastMode: 0 - keepAlpha: 0 - fog: - enabled: 1 - excludeSkybox: 1 - debugLayer: - lightMeter: - width: 512 - height: 256 - showCurves: 1 - histogram: - width: 512 - height: 256 - channel: 3 - waveform: - exposure: 0.12 - height: 256 - vectorscope: - size: 256 - exposure: 0.12 - overlaySettings: - linearDepth: 0 - motionColorIntensity: 4 - motionGridSize: 64 - colorBlindnessType: 0 - colorBlindnessStrength: 1 - m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} - m_ShowToolkit: 0 - m_ShowCustomSorter: 0 - breakBeforeColorGrading: 0 - m_BeforeTransparentBundles: [] - m_BeforeStackBundles: [] - m_AfterStackBundles: [] ---- !u!20 &1748146231 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 100 - far clip plane: 10000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1748146232 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_LocalRotation: {x: 0.14780942, y: 0, z: 0, w: 0.9890159} - m_LocalPosition: {x: -10082, y: 4927.1, z: -2027} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 17, y: 0, z: 0} ---- !u!114 &1748146234 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9f1db61281524fb40bc9a1f6acce6baf, type: 3} - m_Name: - m_EditorClassIdentifier: - configuration: {fileID: 11400000, guid: a15886e93ac3e7847861da392782f13d, type: 2} - downSample: 0 - quality: 2 - allowCloudFrontObject: 1 - useApSystem: 0 - useHierarchicalHeightMap: 1 - cloudShader: {fileID: 4800000, guid: 84e97169589c5e94e8521fe4deb2e3f8, type: 3} - heightPreprocessShader: {fileID: 7200000, guid: 40276bd53f35a694e8d4e025ca310775, - type: 3} - cloudHeightProcessShader: {fileID: 4800000, guid: b80bf04ca56d3d642a6b925cff3f5ddf, - type: 3} ---- !u!114 &1748146235 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0a9c4d2e823dfc247b2f6850f76ca2b6, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1748146236 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b535dacf702e20c4b9ef528e42081835, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTexSize: {x: 128, y: 128, z: 32} diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity.meta deleted file mode 100644 index 2a00a5ee3..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: e4a8c6ec9e196d241854a4ff221a28fd -timeCreated: 1521964013 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles.meta deleted file mode 100644 index 671b08b6f..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fc2731fc466427a429629ea6bd19ebd5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset b/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset deleted file mode 100644 index bcd6d0589..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e36ca5c919b382bc3322f3ca57b64a793c0a79be732a6b028ea5346170a181d -size 21225 diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset.meta deleted file mode 100644 index 5af588894..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot1/Screenshot1_Profiles/AtmManager Profile.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fb5c6f5333d1578418cdc5074b1c900e -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot2.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot2.meta deleted file mode 100644 index d0c10d0e6..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot2.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d8eb8b025c1be6d409d9e1745b9214dc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset b/Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset deleted file mode 100644 index 80b46e2af..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d958fdae3931ce00f074450d7a86e73a394b22dcc1b267aec565b51dd49ebfdd -size 1401 diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset.meta deleted file mode 100644 index 6aeb36ae0..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Config.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e9b06b77cd78e5e4b95a6ca30e5f61e7 -timeCreated: 1524043690 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity b/Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity deleted file mode 100644 index a5914c05d..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity +++ /dev/null @@ -1,329 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 49040651} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &49040650 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 49040652} - - component: {fileID: 49040651} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &49040651 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.96572006, b: 0.9044118, a: 1} - m_Intensity: 1.2 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &49040652 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_LocalRotation: {x: -0.52715605, y: 0.67356503, z: -0.4896874, w: -0.16918293} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 56.934002, y: 148.093, z: -93.717} ---- !u!1 &466916245 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 466916246} - m_Layer: 0 - m_Name: GameObject - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &466916246 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 466916245} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -317.8709, y: 20000, z: -159.77051} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1748146228 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1748146232} - - component: {fileID: 1748146231} - - component: {fileID: 1748146229} - - component: {fileID: 1748146234} - - component: {fileID: 1748146233} - - component: {fileID: 1748146235} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1748146229 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 ---- !u!20 &1748146231 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 2000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1748146232 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_LocalRotation: {x: -0.46222746, y: -0, z: -0, w: 0.8867614} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -55.062004, y: 0, z: 0} ---- !u!114 &1748146233 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3} - m_Name: - m_EditorClassIdentifier: - profile: {fileID: 11400000, guid: cdea7d3b49937774abb1b5ac066885fd, type: 2} ---- !u!114 &1748146234 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9f1db61281524fb40bc9a1f6acce6baf, type: 3} - m_Name: - m_EditorClassIdentifier: - configuration: {fileID: 11400000, guid: e9b06b77cd78e5e4b95a6ca30e5f61e7, type: 2} - downSample: 1 - quality: 0 - allowCloudFrontObject: 0 - useApSystem: 0 - useHierarchicalHeightMap: 1 - cloudShader: {fileID: 4800000, guid: 84e97169589c5e94e8521fe4deb2e3f8, type: 3} - heightPreprocessShader: {fileID: 7200000, guid: 40276bd53f35a694e8d4e025ca310775, - type: 3} - cloudHeightProcessShader: {fileID: 4800000, guid: b80bf04ca56d3d642a6b925cff3f5ddf, - type: 3} ---- !u!114 &1748146235 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0a9c4d2e823dfc247b2f6850f76ca2b6, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity.meta deleted file mode 100644 index 389ea8c3d..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot2/Screenshot2.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 205c2599ca8ee4044b11f8dc389561bb -timeCreated: 1521964013 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot3.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot3.meta deleted file mode 100644 index 3b3994d29..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot3.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bdd062e9efb56944aafb26f002f99adc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset b/Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset deleted file mode 100644 index dd07ed44d..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3bf46a329c3a9af14ea5a19e71ff97718afa618cff0dab2e9e2c82e52d6e06d4 -size 1401 diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset.meta deleted file mode 100644 index c4ccd24a9..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Config.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 5482a95b5c1b69341ba5938fccd5a25d -timeCreated: 1524043690 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity b/Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity deleted file mode 100644 index 186710a28..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity +++ /dev/null @@ -1,303 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 49040651} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &49040650 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 49040652} - - component: {fileID: 49040651} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &49040651 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 1, g: 0.96572006, b: 0.9044118, a: 1} - m_Intensity: 1.2 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &49040652 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_LocalRotation: {x: -0.1651658, y: -0.7798415, z: 0.17655866, w: -0.5774034} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 512.218, y: -792.172, z: -176.519} ---- !u!1 &1748146228 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1748146232} - - component: {fileID: 1748146231} - - component: {fileID: 1748146229} - - component: {fileID: 1748146234} - - component: {fileID: 1748146233} - - component: {fileID: 1748146235} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1748146229 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 ---- !u!20 &1748146231 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 2000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1748146232 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_LocalRotation: {x: 0.22376823, y: 0.09239381, z: 0.021313809, w: -0.970019} - m_LocalPosition: {x: 1417, y: 0, z: -426} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: -25.980001, y: -370.882, z: 0} ---- !u!114 &1748146233 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3} - m_Name: - m_EditorClassIdentifier: - profile: {fileID: 11400000, guid: cdea7d3b49937774abb1b5ac066885fd, type: 2} ---- !u!114 &1748146234 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9f1db61281524fb40bc9a1f6acce6baf, type: 3} - m_Name: - m_EditorClassIdentifier: - cloudShader: {fileID: 4800000, guid: 84e97169589c5e94e8521fe4deb2e3f8, type: 3} - configuration: {fileID: 11400000, guid: 5482a95b5c1b69341ba5938fccd5a25d, type: 2} - downSample: 1 - quality: 0 - allowCloudFrontObject: 1 - useApSystem: 0 - heightPreprocessShader: {fileID: 7200000, guid: 40276bd53f35a694e8d4e025ca310775, - type: 3} - cloudHeightProcessShader: {fileID: 4800000, guid: b80bf04ca56d3d642a6b925cff3f5ddf, - type: 3} - useHierarchicalHeightMap: 1 - hiHeightLevelRange: {x: 0, y: 9} - heightLutTextureSize: {x: 512, y: 512} ---- !u!114 &1748146235 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0a9c4d2e823dfc247b2f6850f76ca2b6, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity.meta deleted file mode 100644 index ec03b8fe9..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot3/Screenshot3.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1096e391cf3fec74483d0a8036513046 -timeCreated: 1521964013 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot4.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot4.meta deleted file mode 100644 index 182053bcf..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot4.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 014e650c7b694d6429dd42607d6e8fab -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity b/Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity deleted file mode 100644 index ad910b5ac..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity +++ /dev/null @@ -1,383 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 8 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 1953658193} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 49040651} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_TemporalCoherenceThreshold: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 1 - m_LightmapEditorSettings: - serializedVersion: 9 - m_Resolution: 2 - m_BakeResolution: 40 - m_TextureWidth: 1024 - m_TextureHeight: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVRFilteringMode: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ShowResolutionOverlay: 1 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &49040650 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 49040652} - - component: {fileID: 49040651} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &49040651 -Light: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_Enabled: 1 - serializedVersion: 8 - m_Type: 1 - m_Color: {r: 0.9558824, g: 0.6199663, b: 0.26005626, a: 1} - m_Intensity: 1.91 - m_Range: 10 - m_SpotAngle: 30 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_Lightmapping: 4 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &49040652 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 49040650} - m_LocalRotation: {x: -0.99103653, y: -0.12916742, z: 0.03387993, w: -0.0038055014} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 539.066, y: -716.206, z: -14.820984} ---- !u!1 &636899334 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 636899336} - - component: {fileID: 636899335} - m_Layer: 0 - m_Name: AtmManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &636899335 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 636899334} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: e16dd2ddbdfa7ea4f87a3cfb032ffd0f, type: 3} - m_Name: - m_EditorClassIdentifier: - progressiveUpdate: 0 - computeShader: {fileID: 7200000, guid: 2d4396a54b390d742b84d4bb4a122e54, type: 3} - outputDebug: 0 - lutConfig: - transmittanceSize: {x: 512, y: 512} - scatteringSize: {x: 32, y: 32, z: 128} - irradianceSize: {x: 32, y: 32} - cameraVolumeSize: {x: 128, y: 128, z: 32} - atmosphereConfig: {fileID: 11400000, guid: 8e73e89daf00b8447b2410427953df25, type: 2} ---- !u!4 &636899336 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 636899334} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1748146228 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1748146232} - - component: {fileID: 1748146231} - - component: {fileID: 1748146229} - - component: {fileID: 1748146234} - - component: {fileID: 1748146236} - - component: {fileID: 1748146233} - - component: {fileID: 1748146235} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1748146229 -AudioListener: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 ---- !u!20 &1748146231 -Camera: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 2000 - field of view: 75 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1748146232 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_LocalRotation: {x: 0.2475641, y: -0, z: -0, w: 0.9688715} - m_LocalPosition: {x: 0, y: 20000, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 28.667002, y: 0, z: 0} ---- !u!114 &1748146233 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3} - m_Name: - m_EditorClassIdentifier: - profile: {fileID: 11400000, guid: cdea7d3b49937774abb1b5ac066885fd, type: 2} ---- !u!114 &1748146234 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9f1db61281524fb40bc9a1f6acce6baf, type: 3} - m_Name: - m_EditorClassIdentifier: - configuration: {fileID: 11400000, guid: a15886e93ac3e7847861da392782f13d, type: 2} - downSample: 1 - quality: 0 - allowCloudFrontObject: 0 - useApSystem: 0 - useHierarchicalHeightMap: 1 - cloudShader: {fileID: 4800000, guid: 84e97169589c5e94e8521fe4deb2e3f8, type: 3} - heightPreprocessShader: {fileID: 7200000, guid: 40276bd53f35a694e8d4e025ca310775, - type: 3} - cloudHeightProcessShader: {fileID: 4800000, guid: b80bf04ca56d3d642a6b925cff3f5ddf, - type: 3} ---- !u!114 &1748146235 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0a9c4d2e823dfc247b2f6850f76ca2b6, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!114 &1748146236 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1748146228} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b535dacf702e20c4b9ef528e42081835, type: 3} - m_Name: - m_EditorClassIdentifier: - volumeTexSize: {x: 128, y: 128, z: 32} ---- !u!21 &1953658193 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_Name: Skybox/AtmosphereScatteringPrecomputed - m_Shader: {fileID: 4800000, guid: e2088dd19a71d1244976cd0de1ff68a7, type: 3} - m_ShaderKeywords: - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: [] - m_Floats: [] - m_Colors: [] diff --git a/Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity.meta b/Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity.meta deleted file mode 100644 index eb0d3e22a..000000000 --- a/Assets/Plugins/VolumeCloud/Example/Screenshot4/Screenshot4.unity.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 3c9b872431f71ab41b8b345a38554f92 -timeCreated: 1521964013 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts.meta b/Assets/Plugins/VolumeCloud/Scripts.meta deleted file mode 100644 index 1b4825471..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: d6ade06d74955e2478975558493d6d54 -folderAsset: yes -timeCreated: 1522836299 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs b/Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs deleted file mode 100644 index 0732edea0..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud.Sample { - public class MouseMovement: MonoBehaviour { - private void Update() { - float yaw = Input.GetAxis("Mouse X"); - float pitch = -Input.GetAxis("Mouse Y"); - var currAngle = transform.rotation.eulerAngles; - currAngle.x += pitch; - currAngle.y += yaw; - transform.rotation = Quaternion.Euler(currAngle); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs.meta deleted file mode 100644 index dbd8e0572..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/MouseMovement.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 0a9c4d2e823dfc247b2f6850f76ca2b6 -timeCreated: 1530937970 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator.meta deleted file mode 100644 index a0cba0ded..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 44271309eab254245a7f8e6479ee5fad -folderAsset: yes -timeCreated: 1523161001 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs deleted file mode 100644 index 325ecee14..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - public abstract class BaseNoiseGenerator : INoiseGenerator { - public int period = 16; - public abstract float Noise(Vector3 pos); - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs.meta deleted file mode 100644 index c84c130c0..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/BaseNoiseGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 374ff9f8fc4c1114b897fc5a6213d9ff -timeCreated: 1522028198 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs deleted file mode 100644 index 1bf271d31..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - [System.Serializable] - public class CurlNoiseGenerator : ITextureGenerator { - public Texture2D perlinNoise; - public float brightness = 10.0f; - public float scale = 10.0f; - public PerlinNoiseGenerator perlin; - private float noise(float x, float y) { - return perlin.Noise(new Vector3(x, y)); - } - public Color Sample(float x, float y) { - float eps = 1.0f / 128.0f; - float n1, n2, a, b; - - n1 = noise(x, y + eps); - n2 = noise(x, y - eps); - a = (n1 - n2) / (2); - n1 = noise(x + eps, y); - n2 = noise(x - eps, y); - b = (n1 - n2) / (2); - - Vector2 curl = new Vector2(a, -b); - return new Color(curl.x, curl.y, 0); - } - - public Color Sample(Vector3 pos) { - return Sample(pos.x, pos.y); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs.meta deleted file mode 100644 index 76e389241..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CurlNoiseGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f5c2ff57fc70e4346aa2667d13cce209 -timeCreated: 1522740335 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs deleted file mode 100644 index 738494fb6..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - [System.Serializable] - public class CustomTexGenerator : INoiseGenerator { - public float channel1WorleyPercent = 0.5f; - public int channel1WorleyPeriod = 4; - public int channel1PerlinPeriod = 4; - public int worleyOcataves = 4; - public int perlinOctaves = 4; - - public float Noise(Vector3 pos) { - return channel1WorleyPercent * WorleyNoiseGenerator.OctaveNoise(pos, channel1WorleyPeriod, worleyOcataves) - + (1 - channel1WorleyPercent) * PerlinNoiseGenerator.OctaveNoise(pos, channel1PerlinPeriod, perlinOctaves); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs.meta deleted file mode 100644 index 1330833b0..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/CustomTexGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: ca47c3192075ced48b6f40850f6268ea -timeCreated: 1522037646 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs deleted file mode 100644 index 895d954eb..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - [System.Serializable] - public class First3DTexGenerator : ITextureGenerator { - public int texResolution = 32; - public int perlinOctaves = 4; - public int channel1PerlinPeriod = 16; - public int channel2WorleyPeriod = 16; - public int channel3WorleyPeriod = 32; - public int channel4WorleyPeriod = 64; - - public Color Sample(Vector3 pos) { - Color res = new Color(); - res.r = PerlinNoiseGenerator.OctaveNoise(pos, channel1PerlinPeriod, perlinOctaves); - res.g = WorleyNoiseGenerator.OctaveNoise(pos, channel2WorleyPeriod, 3); - res.b = WorleyNoiseGenerator.OctaveNoise(pos, channel3WorleyPeriod, 3); - res.a = WorleyNoiseGenerator.OctaveNoise(pos, channel4WorleyPeriod, 3); - return res; - } - } - - [System.Serializable] - public class Second3DTexGenerator : ITextureGenerator { - public int texResolution = 32; - public int channel1WorleyFreq = 16; - public int channel2WorleyFreq = 32; - public int channel3WorleyFreq = 64; - public Color Noise(Vector3 pos) { - Color res = new Color(); - res.r = WorleyNoiseGenerator.OctaveNoise(pos, channel1WorleyFreq, 3); - res.g = WorleyNoiseGenerator.OctaveNoise(pos, channel2WorleyFreq, 3); - res.b = WorleyNoiseGenerator.OctaveNoise(pos, channel3WorleyFreq, 3); - res.a = 1.0f; - return res; - } - - public Color Sample(Vector3 pos) { - return Noise(pos); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs.meta deleted file mode 100644 index d3b6f4518..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/First3DTexGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: ddef2f45efe7ed54c98ca379a97cc280 -timeCreated: 1522028698 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs deleted file mode 100644 index 9345bba75..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - public class NoiseTextureAdapter : ITextureGenerator { - private INoiseGenerator noiseGen; - public NoiseTextureAdapter(INoiseGenerator noiseGen) { - this.noiseGen = noiseGen; - } - - public Color Sample(Vector3 pos) { - return noiseGen.Noise(pos) * Color.white; - } - } - - public interface ITextureGenerator { - Color Sample(Vector3 pos); - } - - public interface INoiseGenerator { - float Noise(Vector3 pos); - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs.meta deleted file mode 100644 index 58d431743..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/IBaseNoiseGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 36639cbbe3e718444b2f731daafe2ec5 -timeCreated: 1522029916 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs deleted file mode 100644 index 73b286a82..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -/* - * code from https://github.com/keijiro/PerlinNoise - * changed to make the noise tilable. - */ - -namespace Yangrc.VolumeCloud { - [System.Serializable] - public class PerlinNoiseGenerator : BaseNoiseGenerator { - public int octaves = 4; - public override float Noise(Vector3 pos) { - return OctaveNoise(pos, period, octaves); - } - - static float Fade(float t) { - return t * t * t * (t * (t * 6 - 15) + 10); - } - - static float Lerp(float t, float a, float b) { - return a + t * (b - a); - } - - static float Grad(int hash, float x, float y, float z) { - var h = hash & 15; - var u = h < 8 ? x : y; - var v = h < 4 ? y : (h == 12 || h == 14 ? x : z); - return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v); - } - - static int[] perm = { - 151,160,137,91,90,15, - 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, - 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, - 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, - 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, - 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, - 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, - 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, - 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, - 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, - 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, - 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, - 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180, - 151 - }; - private static int wrap(int n, int period) { - n++; - return period > 0 ? n % period : n; - } - - public static float Noise(Vector3 pos, int period) { - pos *= period; - var x = pos.x; - var y = pos.y; - var z = pos.z; - var X = Mathf.FloorToInt(x) & 0xff; - var Y = Mathf.FloorToInt(y) & 0xff; - var Z = Mathf.FloorToInt(z) & 0xff; - x -= Mathf.Floor(x); - y -= Mathf.Floor(y); - z -= Mathf.Floor(z); - var u = Fade(x); - var v = Fade(y); - var w = Fade(z); - var A = (perm[wrap(X, period)] + Y) & 0xff; - var B = (perm[wrap(X + 1, period)] + Y) & 0xff; - var AA = (perm[wrap(A, period)] + Z) & 0xff; - var BA = (perm[wrap(B, period)] + Z) & 0xff; - var AB = (perm[wrap(A + 1, period)] + Z) & 0xff; - var BB = (perm[wrap(B + 1, period)] + Z) & 0xff; - var result = Lerp(w, Lerp(v, Lerp(u, Grad(perm[AA], x, y, z), Grad(perm[BA], x - 1, y, z)), - Lerp(u, Grad(perm[AB], x, y - 1, z), Grad(perm[BB], x - 1, y - 1, z))), - Lerp(v, Lerp(u, Grad(perm[AA + 1], x, y, z - 1), Grad(perm[BA + 1], x - 1, y, z - 1)), - Lerp(u, Grad(perm[AB + 1], x, y - 1, z - 1), Grad(perm[BB + 1], x - 1, y - 1, z - 1)))); - return (result + 1.0f) / 2.0f; - } - - public static float OctaveNoise(Vector3 pos, int period, int octaves, float persistence = 0.5f) { - float total = 0.0f; - float result = 0.0f; - float amp = .5f; - float freq = 1.0f; - for (int i = 0; i < octaves; i++) { - total += amp; - result += (Noise(pos, Mathf.RoundToInt(freq * period)) * 2.0f - 1.0f) * amp; - amp *= persistence; - freq *= 2.0f; - } - if (octaves == 0) - return 0.0f; - return (result / total + 1.0f) / 2.0f; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs.meta deleted file mode 100644 index df0002b1c..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/PerlinNoiseGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 73833a3529798be4ba6baa1db73dc2aa -timeCreated: 1521990941 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs deleted file mode 100644 index 0b943911a..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - public class Utils { - public static Texture3D GetTex(ITextureGenerator texGen, int textureResolution, TextureFormat format = TextureFormat.RGBA32) { - Texture3D result = new Texture3D(textureResolution, textureResolution, textureResolution, format, true); - Color[] colors = new Color[textureResolution * textureResolution * textureResolution]; - for (int x = 0; x < textureResolution; x++) { - for (int y = 0; y < textureResolution; y++) { - for (int z = 0; z < textureResolution; z++) { - colors[x * textureResolution * textureResolution + y * textureResolution + z] - = texGen.Sample(new Vector3(x, y, z) / textureResolution); - } - } - } - result.SetPixels(colors); - result.wrapMode = TextureWrapMode.Repeat; - result.Apply(); - return result; - } - - public static Texture2D GetPreviewTex(ITextureGenerator texGen, int textureResolution, TextureFormat format = TextureFormat.RGBA32) { - Texture2D result = new Texture2D(textureResolution, textureResolution, format, true); - Color[] colors = new Color[textureResolution * textureResolution]; - for (int x = 0; x < textureResolution; x++) { - for (int y = 0; y < textureResolution; y++) { - colors[x * textureResolution + y] - = texGen.Sample(new Vector3(x, y, 0) / textureResolution); - } - } - result.SetPixels(colors); - result.wrapMode = TextureWrapMode.Repeat; - result.Apply(); - return result; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs.meta deleted file mode 100644 index 775418727..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/Utils.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 7830b1199edb76145b042d63acddae71 -timeCreated: 1522029782 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs deleted file mode 100644 index 4f7ced282..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - [System.Serializable] - public class WorleyNoiseGenerator : BaseNoiseGenerator { - public float brightness = 1.0f; - public float contrast = 1.0f; - public int octaves = 4; - - public override float Noise(Vector3 pos) { - return Mathf.Clamp01(((OctaveNoise(pos, period, octaves)) + (brightness - 1.0f)) * contrast); - } - - private static int wrap(int n, int period) { - return n >= 0 ? n % period : period + n; - } - - public static float Noise(Vector3 pos, int period) { - pos *= period; - var x = Mathf.FloorToInt(pos.x); - var y = Mathf.FloorToInt(pos.y); - var z = Mathf.FloorToInt(pos.z); - Vector3Int boxPos = new Vector3Int(x, y, z); - float minDistance = float.MaxValue; - - for (int xoffset = -1; xoffset <= 1; xoffset++) { - for (int yoffset = -1; yoffset <= 1; yoffset++) { - for (int zoffset = -1; zoffset <= 1; zoffset++) { - var newboxPos = boxPos + new Vector3Int(xoffset, yoffset, zoffset); - var hashValue = (wrap(newboxPos.x, period) + wrap(newboxPos.y, period) * 131 + wrap(newboxPos.z, period) * 17161) % int.MaxValue; - UnityEngine.Random.InitState(hashValue); - var featurePoint = new Vector3(UnityEngine.Random.value + newboxPos.x, UnityEngine.Random.value + newboxPos.y, UnityEngine.Random.value + newboxPos.z); - minDistance = Mathf.Min(minDistance, Vector3.Distance(pos, featurePoint)); - } - } - } - return 1.0f - minDistance; - } - - public static float OctaveNoise(Vector3 pos, int period, int octaves, float persistence = 0.5f) { - float result = 0.0f; - float amp = .5f; - float freq = 1.0f; - float totalAmp = 0.0f; - for (int i = 0; i < octaves; i++) { - totalAmp += amp; - result += Noise(pos, Mathf.RoundToInt(freq * period)) * amp; - amp *= persistence; - freq /= persistence; - } - if (octaves == 0) - return 0.0f; - return result / totalAmp; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs.meta deleted file mode 100644 index 1531b4cd7..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/NoiseGenerator/WorleyNoiseGenerator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 185d43ae86d668448bb0a6d33b1dce7e -timeCreated: 1521970890 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs b/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs deleted file mode 100644 index 2c29e2a1d..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - [CreateAssetMenu] - public class VolumeCloudConfiguration : ScriptableObject { - - [Header("Weather map")] - [Tooltip("R for coverage, G for density, B for cloud type")] - public Texture2D weatherTex; - public float weatherTexSize = 40000; - - [Header("Shape")] - public Vector2 cloudHeightRange = new Vector2(1500.0f, 9000.0f); - public Texture3D baseTexture; - [Range(0, 5)] - public float baseTile = 2.0f; - public Texture2D heightDensityMap; - public float overallSize = 50000; - public float topOffset = 0.0f; - - [Header("Shape - Detail")] - public Texture3D detailTexture; - [Range(0, 80)] - public float detailTile = 36.0f; - [Range(.01f, .5f)] - public float detailStrength = 0.2f; - - [Header("Shape - Curl")] - public Texture2D curlNoise; - [Range(0.001f, 1.0f)] - public float curlTile = 0.01f; - public float curlStrength = 5.0f; - - [Header("Shape - Modifiers")] - [Range(0, 1)] - public float overallDensity = 1.0f; - [Range(0, 1)] - public float cloudTypeModifier = 1.0f; - [Range(0, 1)] - public float cloudCoverageModifier = 1.0f; - - [Header("Shape - Wind")] - public Vector2 windDirection; - public float windSpeed; - - [Header("Lighting")] - public Color ambientColor = new Color(214, 37, 154); - public const float COEFFICIENT_SCALE = 1e-2f; - [Range(0.1f, 2.0f)] - public float scatteringCoefficient = .5f; - [Range(0.1f, 2.0f)] - public float extinctionCoefficient = .52f; - - [Header("Lighting - Multi Scattering Approximation")] - [Range(0.01f, 1)] - [Tooltip("Value used in multi-scattering approximation, higher causes more light be scattered. Must be lower than multiScatteringExtinction.")] - public float multiScatteringScattering = .5f; - [Range(0.01f, 1)] - [Tooltip("Value used in multi-scattering approximation, higher causes more light be extincted. Must be higher than multiScatteringScattering.")] - public float multiScatteringExtinction = .5f; - [Range(0.01f, 1)] - [Tooltip("Value used in multi-scattering approximation, phase function is p(g * pow(multiScatteringEC, octave), theta)")] - public float multiScatteringEC = .5f; - - [Header("Lighting - Silver")] - public float silverSpread = 0.1f; - - [Header("Lighting - Atmosphere")] - public float atmosphereSaturateDistance = 100000.0f; - - private class PropertyHash { - public static int cloudStartHeight = Shader.PropertyToID("_CloudStartHeight"); - public static int cloudEndHeight = Shader.PropertyToID("_CloudEndHeight"); - - public static int baseTex = Shader.PropertyToID("_BaseTex"); - public static int baseTile = Shader.PropertyToID("_BaseTile"); - - public static int detailTex = Shader.PropertyToID("_DetailTex"); - public static int detailTile = Shader.PropertyToID("_DetailTile"); - public static int detailStrength = Shader.PropertyToID("_DetailStrength"); - - public static int curlNoise = Shader.PropertyToID("_CurlNoise"); - public static int curlTile = Shader.PropertyToID("_CurlTile"); - public static int curlStrength = Shader.PropertyToID("_CurlStrength"); - - public static int heightDensity = Shader.PropertyToID("_HeightDensity"); - - public static int topOffset = Shader.PropertyToID("_CloudTopOffset"); - public static int cloudSize = Shader.PropertyToID("_CloudSize"); - - public static int cloudOverallDensity = Shader.PropertyToID("_CloudOverallDensity"); - public static int cloudTypeModifier = Shader.PropertyToID("_CloudTypeModifier"); - public static int cloudCoverageModifier = Shader.PropertyToID("_CloudCoverageModifier"); - - public static int windDirection = Shader.PropertyToID("_WindDirection"); - public static int weatherTex = Shader.PropertyToID("_WeatherTex"); - public static int weatherTexSize = Shader.PropertyToID("_WeatherTexSize"); - public static int scatteringCoefficient = Shader.PropertyToID("_ScatteringCoefficient"); - public static int extinctionCoefficient = Shader.PropertyToID("_ExtinctionCoefficient"); - public static int multiScatteringA = Shader.PropertyToID("_MultiScatteringA"); - public static int multiScatteringB = Shader.PropertyToID("_MultiScatteringB"); - public static int multiScatteringC = Shader.PropertyToID("_MultiScatteringC"); - public static int silverSpread = Shader.PropertyToID("_SilverSpread"); - - public static int atmosphereColorSaturateDistance = Shader.PropertyToID("_AtmosphereColorSaturateDistance"); - public static int ambientColor = Shader.PropertyToID("_AmbientColor"); - } - - public void ApplyToMaterial(Material mat) { - mat.SetFloat(PropertyHash.cloudStartHeight, cloudHeightRange.x); - mat.SetFloat(PropertyHash.cloudEndHeight, cloudHeightRange.y); - - mat.SetTexture(PropertyHash.baseTex, baseTexture); - mat.SetTexture(PropertyHash.detailTex, detailTexture); - mat.SetTexture(PropertyHash.curlNoise, curlNoise); - - mat.SetFloat(PropertyHash.baseTile, baseTile); - mat.SetTexture(PropertyHash.heightDensity, heightDensityMap); - mat.SetFloat(PropertyHash.detailTile, detailTile); - - mat.SetFloat(PropertyHash.detailStrength, detailStrength); - mat.SetFloat(PropertyHash.curlTile, curlTile); - mat.SetFloat(PropertyHash.curlStrength, curlStrength); - mat.SetFloat(PropertyHash.topOffset, topOffset); - mat.SetFloat(PropertyHash.cloudSize, overallSize); - mat.SetFloat(PropertyHash.cloudOverallDensity, overallDensity); - mat.SetFloat(PropertyHash.cloudTypeModifier, cloudTypeModifier); - mat.SetFloat(PropertyHash.cloudCoverageModifier, cloudCoverageModifier); - - mat.SetVector(PropertyHash.windDirection, new Vector4(windDirection.x, windDirection.y, windSpeed, -windSpeed)); - mat.SetTexture(PropertyHash.weatherTex, weatherTex); - mat.SetFloat(PropertyHash.weatherTexSize, weatherTexSize); - mat.SetFloat(PropertyHash.scatteringCoefficient, scatteringCoefficient * COEFFICIENT_SCALE); - mat.SetFloat(PropertyHash.extinctionCoefficient, extinctionCoefficient * COEFFICIENT_SCALE); - mat.SetFloat(PropertyHash.multiScatteringA, multiScatteringScattering ); - mat.SetFloat(PropertyHash.multiScatteringB, multiScatteringExtinction ); - mat.SetFloat(PropertyHash.multiScatteringC, multiScatteringEC ); - mat.SetFloat(PropertyHash.silverSpread, silverSpread); - - mat.SetFloat(PropertyHash.atmosphereColorSaturateDistance, atmosphereSaturateDistance); - mat.SetColor(PropertyHash.ambientColor, ambientColor); - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs.meta deleted file mode 100644 index fe9df2cce..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudConfiguration.cs.meta +++ /dev/null @@ -1,16 +0,0 @@ -fileFormatVersion: 2 -guid: edad34612c85d2e4da1745df6c135220 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: - - baseTexture: {fileID: 11700000, guid: 3ed67598438ec1e4dba28385e35a557b, type: 2} - - heightDensityMap: {fileID: 2800000, guid: a27c79a96e56b794a9bcb99b3b2df92b, type: 3} - - detailTexture: {fileID: 11700000, guid: c978a1d1fdb99d54eb7910eb562fcbd7, type: 2} - - curlNoise: {fileID: 2800000, guid: 864afbdb4b1b36c42be5cac8f2556237, type: 2} - - weatherTex: {fileID: 2800000, guid: c73be893af46a1e4db152d42aacae768, type: 3} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudRenderer.cs b/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudRenderer.cs deleted file mode 100644 index 06c0d8a19..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudRenderer.cs +++ /dev/null @@ -1,241 +0,0 @@ -using System; -using System.Linq; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Rendering; - -namespace Yangrc.VolumeCloud { - - /// - /// Generate halton sequence. - /// code from unity post-processing stack. - /// - public class HaltonSequence { - public int radix = 3; - private int storedIndex = 0; - public float Get() { - float result = 0f; - float fraction = 1f / (float)radix; - int index = storedIndex; - while (index > 0) { - result += (float)(index % radix) * fraction; - - index /= radix; - fraction /= (float)radix; - } - storedIndex++; - return result; - } - } - - public enum Quality { - Low, - Normal, //Low sample count - High, //High sample count and high shadow sample count. - } - - /// - /// Cloud renderer post processing. - /// - [ImageEffectAllowedInSceneView] - [ExecuteInEditMode,RequireComponent(typeof(Camera))] - [ImageEffectOpaque] - public class VolumeCloudRenderer : EffectBase { - [Header("Config")] - public VolumeCloudConfiguration configuration; - [Header("Render Settings")] - [Range(0, 2)] - public int downSample = 1; - public Quality quality; - public bool allowCloudFrontObject; - [SerializeField] - [Tooltip("Enable ap calculation using ap system. Do not enable if ap system is not present")] - private bool useApSystem; - - private Material mat; - private Material heightDownsampleMat; - private RenderTexture[] fullBuffer; - private int fullBufferIndex; - private RenderTexture undersampleBuffer; - private Matrix4x4 prevV; - private Camera mcam; - private HaltonSequence sequence = new HaltonSequence() { radix = 3 }; - // The index of 4x4 pixels. - private int frameIndex = 0; - private float bayerOffsetIndex = 0; - private bool firstFrame = true; - - [Header("Hi-Height")] - [SerializeField] - private bool useHierarchicalHeightMap; - private Vector2Int hiHeightLevelRange = new Vector2Int(0, 9); - private Vector2Int heightLutTextureSize = new Vector2Int(512, 512); - private RenderTexture heightLutTexture; - private RenderTexture hiHeightTexture; - private RenderTexture[] hiHeightTempTextures; - - [Header("Shader references(DONT EDIT)")] - [SerializeField] - private Shader cloudShader; - [SerializeField] - private ComputeShader heightPreprocessShader; - [SerializeField] - private Shader cloudHeightProcessShader; - - void EnsureMaterial(bool force = false) { - if (mat == null || force) { - mat = new Material(cloudShader); - } - if (heightDownsampleMat == null || force){ - heightDownsampleMat = new Material(cloudHeightProcessShader); - } - } - - private void OnDestroy() { - if (this.fullBuffer != null) { - for (int i = 0; i < fullBuffer.Length; i++) { - fullBuffer[i].Release(); - fullBuffer[i] = null; - } - } - if (this.undersampleBuffer != null) { - this.undersampleBuffer.Release(); - this.undersampleBuffer = null; - } - if (hiHeightTexture != null) { - hiHeightTexture.Release(); - hiHeightTexture = null; - } - if (heightLutTexture != null) { - heightLutTexture.Release(); - heightLutTexture = null; - } - } - - private void Start() { - this.EnsureMaterial(true); - } - - private void GenerateHierarchicalHeightMap() { - RenderTexture defaultTarget = RenderTexture.active; - - if (this.configuration.weatherTex.width != 512 || this.configuration.weatherTex.height != 512) { - throw new UnityException("Hierarchical height map mode only supports weather tex of size 512*512!"); - } - - if (EnsureRenderTarget(ref heightLutTexture, heightLutTextureSize.x, heightLutTextureSize.y, RenderTextureFormat.RFloat, FilterMode.Point, randomWrite: true)) { - var kernal = heightPreprocessShader.FindKernel("CSMain"); - heightPreprocessShader.SetTexture(kernal, "heightDensityMap", configuration.heightDensityMap); - heightPreprocessShader.SetTexture(kernal, "heightLutResult", this.heightLutTexture); - heightPreprocessShader.Dispatch(kernal, heightLutTextureSize.x / 32, heightLutTextureSize.y / 32, 1); - } - - EnsureRenderTarget(ref hiHeightTexture, 512, 512, RenderTextureFormat.RFloat, configuration.weatherTex.filterMode, wrapMode: configuration.weatherTex.wrapMode, randomWrite: true, useMipmap:true); - - EnsureArray(ref hiHeightTempTextures, 10); - for (int i = 0; i <= 9; i++) { - EnsureRenderTarget(ref hiHeightTempTextures[i], 512 >> i, 512 >> i, RenderTextureFormat.RFloat, FilterMode.Point); - } - - //RenderTexture previousLevel = null;//Previous level hi-height map. - //EnsureRenderTarget(ref previousLevel, 512, 512, RenderTextureFormat.RFloat, FilterMode.Point, randomWrite: true); //The first level is same size as weather tex. - this.heightDownsampleMat.SetTexture("_WeatherTex", this.configuration.weatherTex); - this.heightDownsampleMat.SetTexture("_HeightLut", this.heightLutTexture); - Graphics.Blit(null, hiHeightTempTextures[0], this.heightDownsampleMat, 0); //The first pass convert weather tex into height map. - Graphics.CopyTexture(hiHeightTempTextures[0], 0, 0, hiHeightTexture, 0, 0); //Copy first level into target texture. - - for (int i = 1; i <= Mathf.Min(9, hiHeightLevelRange.y); i++) { - Graphics.Blit(hiHeightTempTextures[i - 1], hiHeightTempTextures[i], this.heightDownsampleMat, 1); - Graphics.CopyTexture(hiHeightTempTextures[i], 0, 0, hiHeightTexture, 0, i); - } - RenderTexture.active = defaultTarget; - } - - [ImageEffectOpaque] - private void OnRenderImage(RenderTexture source, RenderTexture destination) { - if (this.configuration == null || cloudShader == null) { - Graphics.Blit(source, destination); - return; - } - - mcam = GetComponent(); - var width = mcam.pixelWidth >> downSample; - var height = mcam.pixelHeight >> downSample; - - this.EnsureMaterial(); - this.configuration.ApplyToMaterial(this.mat); - - EnsureArray(ref fullBuffer, 2); - firstFrame |= EnsureRenderTarget(ref fullBuffer[0], width, height, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); - firstFrame |= EnsureRenderTarget(ref fullBuffer[1], width, height, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); - firstFrame |= EnsureRenderTarget(ref undersampleBuffer, width , height, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); - - frameIndex = (frameIndex + 1)% 16; - fullBufferIndex = (fullBufferIndex + 1) % 2; - - if (useHierarchicalHeightMap) { - GenerateHierarchicalHeightMap(); - mat.EnableKeyword("USE_HI_HEIGHT"); - mat.SetTexture("_HiHeightMap", this.hiHeightTexture); - mat.SetInt("_HeightMapSize", this.hiHeightTexture.width); - mat.SetInt("_HiHeightMinLevel", this.hiHeightLevelRange.x); - mat.SetInt("_HiHeightMaxLevel", this.hiHeightLevelRange.y); - } else { - mat.DisableKeyword("USE_HI_HEIGHT"); - } - - /* Some code is from playdead TAA. */ - - //1. Pass1, Render a undersampled buffer. The buffer is dithered using bayer matrix(every 3x3 pixel) and halton sequence. - //If it's first frame, force a high quality sample to make the initial history buffer good enough. - if (firstFrame || quality == Quality.High) { - mat.EnableKeyword("HIGH_QUALITY"); - mat.DisableKeyword("MEDIUM_QUALITY"); - mat.DisableKeyword("LOW_QUALITY"); - } else if (quality == Quality.Normal) { - mat.DisableKeyword("HIGH_QUALITY"); - mat.EnableKeyword("MEDIUM_QUALITY"); - mat.DisableKeyword("LOW_QUALITY"); - } else if (quality == Quality.Low) { - mat.DisableKeyword("HIGH_QUALITY"); - mat.DisableKeyword("MEDIUM_QUALITY"); - mat.EnableKeyword("LOW_QUALITY"); - } - if (useApSystem) { - mat.EnableKeyword("USE_YANGRC_AP"); - } else { - mat.DisableKeyword("USE_YANGRC_AP"); - } - if (allowCloudFrontObject) { - mat.EnableKeyword("ALLOW_CLOUD_FRONT_OBJECT"); - } else { - mat.DisableKeyword("ALLOW_CLOUD_FRONT_OBJECT"); - } - - mat.SetVector("_ProjectionExtents", mcam.GetProjectionExtents()); - mat.SetFloat("_RaymarchOffset", sequence.Get()); - mat.SetVector("_TexelSize", undersampleBuffer.texelSize); - - Graphics.Blit(null, undersampleBuffer, mat, 0); - - //2. Pass 2, blend undersampled image with history buffer to new buffer. - mat.SetTexture("_UndersampleCloudTex", undersampleBuffer); - mat.SetMatrix("_PrevVP", GL.GetGPUProjectionMatrix(mcam.projectionMatrix,false) * prevV); - mat.SetVector("_ProjectionExtents", mcam.GetProjectionExtents()); - - if (firstFrame) { //Wait, is this the first frame? If it is, the history buffer is empty yet. It will cause glitch if we use it directly. Fill it using the undersample buffer. - Graphics.Blit(undersampleBuffer, fullBuffer[fullBufferIndex]); - } - Graphics.Blit(fullBuffer[fullBufferIndex], fullBuffer[fullBufferIndex ^ 1], mat, 1); - - //3. Pass3, Calculate lighting, blend final cloud image with final image. - mat.SetTexture("_CloudTex", fullBuffer[fullBufferIndex ^ 1]); - Graphics.Blit(source, destination, mat, 2); - - //4. Cleanup - prevV = mcam.worldToCameraMatrix; - firstFrame = false; - } - } -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs b/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs deleted file mode 100644 index 8de0de5d2..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace Yangrc.VolumeCloud { - - public class VolumeCloudWindowConfigurations : ScriptableObject { - public CurlNoiseGenerator testGenerator; - - public First3DTexGenerator first3DTexGenerator; - public string first3DTexSaveName = "First3DTex"; - public Second3DTexGenerator second3DTexGenerator; - public string second3DTexSaveName = "Second3DTex"; - } -} diff --git a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs.meta b/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs.meta deleted file mode 100644 index 68be95b7e..000000000 --- a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudWindowConfigurations.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 165f864f325ab6a48beaeff3cfed3c43 -timeCreated: 1521969835 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Shaders.meta b/Assets/Plugins/VolumeCloud/Shaders.meta deleted file mode 100644 index bac1fdcf2..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: aa6dcb5583411a749b2e70488bd2e1d4 -folderAsset: yes -timeCreated: 1523160836 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc b/Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc deleted file mode 100644 index 265d6180f..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc +++ /dev/null @@ -1,147 +0,0 @@ -#ifndef __AERIAL_PERSPECTIVE_HELPER__ -#define __AERIAL_PERSPECTIVE_HELPER__ - -#include "Assets/Plugins/AtmosphereScattering/Shaders/Common.cginc" -#include "Assets/Plugins/AtmosphereScattering/Shaders/TransmittanceHelper.cginc" -#include "Assets/Plugins/AtmosphereScattering/Shaders/GroundHelper.cginc" -#include "Assets/Plugins/AtmosphereScattering/Shaders/MultipleScatteringHelper.cginc" -#include "Assets/Plugins/AtmosphereScattering/Shaders/SingleScatteringHelper.cginc" - -#define LERP_TEXTURE(dim, name) \ -sampler ## dim ## D name ## _1; \ -sampler ## dim ## D name ## _2; - -LERP_TEXTURE(2, _Transmittance) -LERP_TEXTURE(2, _GroundIrradiance) -LERP_TEXTURE(3, _SingleRayleigh) -LERP_TEXTURE(3, _SingleMie) -LERP_TEXTURE(3, _MultipleScattering) - -float2 _TransmittanceSize; -float3 _ScatteringSize; -float2 _GroundIrradianceSize; - -float _LerpValue; - -float3 GetTransmittanceLerped(float r, float mu, float d, bool intersect_ground) { - AtmosphereParameters atm = GetAtmParameters(); - float3 lerp1 = GetTransmittance( - atm, _Transmittance_1, _TransmittanceSize, r, mu, d, intersect_ground); - float3 lerp2 = GetTransmittance( - atm, _Transmittance_2, _TransmittanceSize, r, mu, d, intersect_ground); - - return lerp(lerp1, lerp2, _LerpValue); -} - -float3 GetTransmittanceToTopAtmosphereBoundaryLerped(float r, float mu) { - AtmosphereParameters atm = GetAtmParameters(); - float3 lerp1 = GetTransmittanceToTopAtmosphereBoundary( - atm, _Transmittance_1, _TransmittanceSize, r, mu); - float3 lerp2 = GetTransmittanceToTopAtmosphereBoundary( - atm, _Transmittance_2, _TransmittanceSize, r, mu); - - return lerp(lerp1, lerp2, _LerpValue); -} - -void CalculateRMuMusFromPosViewdir(AtmosphereParameters atm, float3 pos, float3 view_ray, float3 sun_direction, OUT(float) r, OUT(float) mu, OUT(float) mu_s, OUT(float) nu) { - float3 camera = pos + float3(0, atm.bottom_radius, 0); - r = max(atm.bottom_radius + 0.5f, length(camera)); - float rmu = dot(camera, view_ray); - mu = rmu / r; - mu_s = dot(camera, sun_direction) / r; - nu = dot(view_ray, sun_direction); -} - -void CalculateRMuMusForDistancePoint(AtmosphereParameters atm, Length r, Number mu, Number mu_s, float nu, Number d, OUT(Length) r_d, OUT(Number) mu_d, OUT(Number) mu_s_d) { - - r_d = ClampRadius(atm, sqrt(d * d + 2.0 * r * mu * d + r * r)); - r_d = max(atm.bottom_radius + 0.5f, r_d); - mu_d = ClampCosine((r * mu + d) / r_d); - mu_s_d = ClampCosine((r * mu_s + d * nu) / r_d); -} - -float3 InternalGetRayleighLerped(AtmosphereParameters atm, float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - - return SampleScatteringLerped(atm, - _SingleRayleigh_1, - _SingleRayleigh_2, - _LerpValue, - _ScatteringSize, - r, mu, mu_s, - ray_r_mu_intersects_ground) * - RayleighPhaseFunction(nu); -} - -float3 InternalGetMieLerped(AtmosphereParameters atm, float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - return SampleScatteringLerped(atm, - _SingleMie_1, - _SingleMie_2, - _LerpValue, - _ScatteringSize, - r, mu, mu_s, - ray_r_mu_intersects_ground) * - MiePhaseFunction(atm.mie_phase_function_g, nu); -} - -float3 InternalGetLerpedGroundIrradiance(AtmosphereParameters atm, float r, float mu, float mu_s) { - return lerp(GetIrradiance(atm, _GroundIrradiance_1, _GroundIrradianceSize, r, mu_s), GetIrradiance(atm, _GroundIrradiance_2, _GroundIrradianceSize, r, mu_s), _LerpValue); -} - -float3 InternalGetMultipleLerped(AtmosphereParameters atm, float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - return - SampleScatteringLerped(atm, - _MultipleScattering_1, - _MultipleScattering_2, - _LerpValue, - _ScatteringSize, - r, mu, mu_s, - ray_r_mu_intersects_ground); -} - -void ComputeSingleScattering( - IN(AtmosphereParameters) atmosphere, - IN(TransmittanceTexture) transmittance_texture, - uint2 texture_size, - Length r, Number mu, Number mu_s, Number nu, - bool ray_r_mu_intersects_ground, - OUT(IrradianceSpectrum) rayleigh, OUT(IrradianceSpectrum) mie); - -float3 GetTotalScatteringLerped(float r, float mu, float mu_s, float nu, bool ray_r_mu_intersects_ground) { - AtmosphereParameters atm = GetAtmParameters(); - return - InternalGetRayleighLerped(atm, r, mu, mu_s, nu, ray_r_mu_intersects_ground) - + InternalGetMieLerped(atm, r, mu, mu_s, nu, ray_r_mu_intersects_ground) - + InternalGetMultipleLerped(atm, r, mu, mu_s, nu, ray_r_mu_intersects_ground); -} - -float3 GetTotalScatteringLerped(float r, float mu, float mu_s, float nu) { - AtmosphereParameters atm = GetAtmParameters(); - bool ray_r_mu_intersects_ground = RayIntersectsGround(atm, r, mu); - return GetTotalScatteringLerped(r, mu, mu_s, nu, ray_r_mu_intersects_ground); -} - -float3 EvaluateSunDiskRadianceOfUnitRadiance(AtmosphereParameters atm, float r, float mu, float nu) { - //Evaluate sun's solid angle by formula omega = 2 * PI * ( 1 - cos(sun_angular_radius)) (https://en.wikipedia.org/wiki/Solid_angle) - float cos_sun_angular_radius = cos(atm.sun_angular_radius); - float radianceTransmitted = max(0.0f, (nu - cos_sun_angular_radius) / (1.0f - cos_sun_angular_radius)); - return radianceTransmitted; -} - - -/* -=============================== -Camera volume stuff. -=============================== -*/ -sampler3D _CameraVolumeTransmittance; -sampler3D _CameraVolumeScattering; - -float3 GetTransmittanceWithCameraVolume(float3 uvw) { - return tex3Dlod(_CameraVolumeTransmittance, float4(uvw, 0.0f)).rgb; -} - -float3 GetScatteringWithCameraVolume(float3 uvw) { - return tex3Dlod(_CameraVolumeScattering, float4(uvw, 0.0f)).rgb; -} - -#endif \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc.meta b/Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc.meta deleted file mode 100644 index 202d8c62b..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/AerialPerspectiveHelper.cginc.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 86cacca165dab84489f106276557c5c3 -timeCreated: 1531897786 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader b/Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader deleted file mode 100644 index c8ae9009f..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader +++ /dev/null @@ -1,526 +0,0 @@ -// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' - -// Copyright(c) 2016, Michal Skalsky -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// 3. Neither the name of the copyright holder nor the names of its contributors -// may be used to endorse or promote products derived from this software without -// specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT -// SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -// OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -// TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -Shader "Hidden/BilateralBlur" -{ - Properties - { - _MainTex("Texture", any) = "" {} - } - SubShader - { - // No culling or depth - Cull Off ZWrite Off ZTest Always - - CGINCLUDE - - //-------------------------------------------------------------------------------------------- - // Downsample, bilateral blur and upsample config - //-------------------------------------------------------------------------------------------- - // method used to downsample depth buffer: 0 = min; 1 = max; 2 = min/max in chessboard pattern - #define DOWNSAMPLE_DEPTH_MODE 2 - #define UPSAMPLE_DEPTH_THRESHOLD 1.5f - #define BLUR_DEPTH_FACTOR 0.5 - #define GAUSS_BLUR_DEVIATION 1.5 - #define FULL_RES_BLUR_KERNEL_SIZE 7 - #define HALF_RES_BLUR_KERNEL_SIZE 5 - #define QUARTER_RES_BLUR_KERNEL_SIZE 6 - //-------------------------------------------------------------------------------------------- - - #define PI 3.1415927f - -#include "UnityCG.cginc" - - UNITY_DECLARE_TEX2D(_CameraDepthTexture); - UNITY_DECLARE_TEX2D(_HalfResDepthBuffer); - UNITY_DECLARE_TEX2D(_QuarterResDepthBuffer); - UNITY_DECLARE_TEX2D(_HalfResColor); - UNITY_DECLARE_TEX2D(_QuarterResColor); - UNITY_DECLARE_TEX2D(_MainTex); - - float4 _CameraDepthTexture_TexelSize; - float4 _HalfResDepthBuffer_TexelSize; - float4 _QuarterResDepthBuffer_TexelSize; - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct v2f - { - float2 uv : TEXCOORD0; - float4 vertex : SV_POSITION; - }; - - struct v2fDownsample - { -#if SHADER_TARGET > 40 - float2 uv : TEXCOORD0; -#else - float2 uv00 : TEXCOORD0; - float2 uv01 : TEXCOORD1; - float2 uv10 : TEXCOORD2; - float2 uv11 : TEXCOORD3; -#endif - float4 vertex : SV_POSITION; - }; - - struct v2fUpsample - { - float2 uv : TEXCOORD0; - float2 uv00 : TEXCOORD1; - float2 uv01 : TEXCOORD2; - float2 uv10 : TEXCOORD3; - float2 uv11 : TEXCOORD4; - float4 vertex : SV_POSITION; - }; - - v2f vert(appdata v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = v.uv; - return o; - } - - //----------------------------------------------------------------------------------------- - // vertDownsampleDepth - //----------------------------------------------------------------------------------------- - v2fDownsample vertDownsampleDepth(appdata v, float2 texelSize) - { - v2fDownsample o; - o.vertex = UnityObjectToClipPos(v.vertex); -#if SHADER_TARGET > 40 - o.uv = v.uv; -#else - o.uv00 = v.uv - 0.5 * texelSize.xy; - o.uv10 = o.uv00 + float2(texelSize.x, 0); - o.uv01 = o.uv00 + float2(0, texelSize.y); - o.uv11 = o.uv00 + texelSize.xy; -#endif - return o; - } - - //----------------------------------------------------------------------------------------- - // vertUpsample - //----------------------------------------------------------------------------------------- - v2fUpsample vertUpsample(appdata v, float2 texelSize) - { - v2fUpsample o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = v.uv; - - o.uv00 = v.uv - 0.5 * texelSize.xy; - o.uv10 = o.uv00 + float2(texelSize.x, 0); - o.uv01 = o.uv00 + float2(0, texelSize.y); - o.uv11 = o.uv00 + texelSize.xy; - return o; - } - - //----------------------------------------------------------------------------------------- - // BilateralUpsample - //----------------------------------------------------------------------------------------- - float4 BilateralUpsample(v2fUpsample input, Texture2D hiDepth, Texture2D loDepth, Texture2D loColor, SamplerState linearSampler, SamplerState pointSampler) - { - const float threshold = UPSAMPLE_DEPTH_THRESHOLD; - float4 highResDepth = LinearEyeDepth(hiDepth.Sample(pointSampler, input.uv)).xxxx; - float4 lowResDepth; - - lowResDepth[0] = LinearEyeDepth(loDepth.Sample(pointSampler, input.uv00)); - lowResDepth[1] = LinearEyeDepth(loDepth.Sample(pointSampler, input.uv10)); - lowResDepth[2] = LinearEyeDepth(loDepth.Sample(pointSampler, input.uv01)); - lowResDepth[3] = LinearEyeDepth(loDepth.Sample(pointSampler, input.uv11)); - - float4 depthDiff = abs(lowResDepth - highResDepth); - - float accumDiff = dot(depthDiff, float4(1, 1, 1, 1)); - - [branch] - if (accumDiff < threshold) // small error, not an edge -> use bilinear filter - { - return loColor.Sample(linearSampler, input.uv); - } - - // find nearest sample - float minDepthDiff = depthDiff[0]; - float2 nearestUv = input.uv00; - - if (depthDiff[1] < minDepthDiff) - { - nearestUv = input.uv10; - minDepthDiff = depthDiff[1]; - } - - if (depthDiff[2] < minDepthDiff) - { - nearestUv = input.uv01; - minDepthDiff = depthDiff[2]; - } - - if (depthDiff[3] < minDepthDiff) - { - nearestUv = input.uv11; - minDepthDiff = depthDiff[3]; - } - - return loColor.Sample(pointSampler, nearestUv); - } - - //----------------------------------------------------------------------------------------- - // DownsampleDepth - //----------------------------------------------------------------------------------------- - float DownsampleDepth(v2fDownsample input, Texture2D depthTexture, SamplerState depthSampler) - { -#if SHADER_TARGET > 40 - float4 depth = depthTexture.Gather(depthSampler, input.uv); -#else - float4 depth; - depth.x = depthTexture.Sample(depthSampler, input.uv00).x; - depth.y = depthTexture.Sample(depthSampler, input.uv01).x; - depth.z = depthTexture.Sample(depthSampler, input.uv10).x; - depth.w = depthTexture.Sample(depthSampler, input.uv11).x; - -#endif - -#if DOWNSAMPLE_DEPTH_MODE == 0 // min depth - return min(min(depth.x, depth.y), min(depth.z, depth.w)); -#elif DOWNSAMPLE_DEPTH_MODE == 1 // max depth - return max(max(depth.x, depth.y), max(depth.z, depth.w)); -#elif DOWNSAMPLE_DEPTH_MODE == 2 // min/max depth in chessboard pattern - - float minDepth = min(min(depth.x, depth.y), min(depth.z, depth.w)); - float maxDepth = max(max(depth.x, depth.y), max(depth.z, depth.w)); - - // chessboard pattern - int2 position = input.vertex.xy % 2; - int index = position.x + position.y; - return index == 1 ? minDepth : maxDepth; -#endif - } - - //----------------------------------------------------------------------------------------- - // GaussianWeight - //----------------------------------------------------------------------------------------- - float GaussianWeight(float offset, float deviation) - { - float weight = 1.0f / sqrt(2.0f * PI * deviation * deviation); - weight *= exp(-(offset * offset) / (2.0f * deviation * deviation)); - return weight; - } - - //----------------------------------------------------------------------------------------- - // BilateralBlur - //----------------------------------------------------------------------------------------- - float4 BilateralBlur(v2f input, int2 direction, Texture2D depth, SamplerState depthSampler, const int kernelRadius, float2 pixelSize) - { - //const float deviation = kernelRadius / 2.5; - const float deviation = kernelRadius / GAUSS_BLUR_DEVIATION; // make it really strong - - float2 uv = input.uv; - float4 centerColor = _MainTex.Sample(sampler_MainTex, uv); - float3 color = centerColor.xyz; - //return float4(color, 1); - float centerDepth = (LinearEyeDepth(depth.Sample(depthSampler, uv))); - - float weightSum = 0; - - // gaussian weight is computed from constants only -> will be computed in compile time - float weight = GaussianWeight(0, deviation); - color *= weight; - weightSum += weight; - - [unroll] for (int i = -kernelRadius; i < 0; i += 1) - { - float2 offset = (direction * i); - float3 sampleColor = _MainTex.Sample(sampler_MainTex, input.uv, offset); - float sampleDepth = (LinearEyeDepth(depth.Sample(depthSampler, input.uv, offset))); - - float depthDiff = abs(centerDepth - sampleDepth); - float dFactor = depthDiff * BLUR_DEPTH_FACTOR; - float w = exp(-(dFactor * dFactor)); - - // gaussian weight is computed from constants only -> will be computed in compile time - weight = GaussianWeight(i, deviation) * w; - - color += weight * sampleColor; - weightSum += weight; - } - - [unroll] for (i = 1; i <= kernelRadius; i += 1) - { - float2 offset = (direction * i); - float3 sampleColor = _MainTex.Sample(sampler_MainTex, input.uv, offset); - float sampleDepth = (LinearEyeDepth(depth.Sample(depthSampler, input.uv, offset))); - - float depthDiff = abs(centerDepth - sampleDepth); - float dFactor = depthDiff * BLUR_DEPTH_FACTOR; - float w = exp(-(dFactor * dFactor)); - - // gaussian weight is computed from constants only -> will be computed in compile time - weight = GaussianWeight(i, deviation) * w; - - color += weight * sampleColor; - weightSum += weight; - } - - color /= weightSum; - return float4(color, centerColor.w); - } - - ENDCG - - // pass 0 - horizontal blur (hires) - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment horizontalFrag - #pragma target 4.0 - - fixed4 horizontalFrag(v2f input) : SV_Target - { - return BilateralBlur(input, int2(1, 0), _CameraDepthTexture, sampler_CameraDepthTexture, FULL_RES_BLUR_KERNEL_SIZE, _CameraDepthTexture_TexelSize.xy); - } - - ENDCG - } - - // pass 1 - vertical blur (hires) - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment verticalFrag - #pragma target 4.0 - - fixed4 verticalFrag(v2f input) : SV_Target - { - return BilateralBlur(input, int2(0, 1), _CameraDepthTexture, sampler_CameraDepthTexture, FULL_RES_BLUR_KERNEL_SIZE, _CameraDepthTexture_TexelSize.xy); - } - - ENDCG - } - - // pass 2 - horizontal blur (lores) - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment horizontalFrag - #pragma target 4.0 - - fixed4 horizontalFrag(v2f input) : SV_Target - { - return BilateralBlur(input, int2(1, 0), _HalfResDepthBuffer, sampler_HalfResDepthBuffer, HALF_RES_BLUR_KERNEL_SIZE, _HalfResDepthBuffer_TexelSize.xy); - } - - ENDCG - } - - // pass 3 - vertical blur (lores) - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment verticalFrag - #pragma target 4.0 - - fixed4 verticalFrag(v2f input) : SV_Target - { - return BilateralBlur(input, int2(0, 1), _HalfResDepthBuffer, sampler_HalfResDepthBuffer, HALF_RES_BLUR_KERNEL_SIZE, _HalfResDepthBuffer_TexelSize.xy); - } - - ENDCG - } - - // pass 4 - downsample depth to half - Pass - { - CGPROGRAM - #pragma vertex vertHalfDepth - #pragma fragment frag - #pragma target gl4.1 - - v2fDownsample vertHalfDepth(appdata v) - { - return vertDownsampleDepth(v, _CameraDepthTexture_TexelSize); - } - - float frag(v2fDownsample input) : SV_Target - { - return DownsampleDepth(input, _CameraDepthTexture, sampler_CameraDepthTexture); - } - - ENDCG - } - - // pass 5 - bilateral upsample - Pass - { - Blend One Zero - - CGPROGRAM - #pragma vertex vertUpsampleToFull - #pragma fragment frag - #pragma target 4.0 - - v2fUpsample vertUpsampleToFull(appdata v) - { - return vertUpsample(v, _HalfResDepthBuffer_TexelSize); - } - float4 frag(v2fUpsample input) : SV_Target - { - return BilateralUpsample(input, _CameraDepthTexture, _HalfResDepthBuffer, _HalfResColor, sampler_HalfResColor, sampler_HalfResDepthBuffer); - } - - ENDCG - } - - // pass 6 - downsample depth to quarter - Pass - { - CGPROGRAM - #pragma vertex vertQuarterDepth - #pragma fragment frag - #pragma target gl4.1 - - v2fDownsample vertQuarterDepth(appdata v) - { - return vertDownsampleDepth(v, _HalfResDepthBuffer_TexelSize); - } - - float frag(v2fDownsample input) : SV_Target - { - return DownsampleDepth(input, _HalfResDepthBuffer, sampler_HalfResDepthBuffer); - } - - ENDCG - } - - // pass 7 - bilateral upsample quarter to full - Pass - { - Blend One Zero - - CGPROGRAM - #pragma vertex vertUpsampleToFull - #pragma fragment frag - #pragma target 4.0 - - v2fUpsample vertUpsampleToFull(appdata v) - { - return vertUpsample(v, _QuarterResDepthBuffer_TexelSize); - } - float4 frag(v2fUpsample input) : SV_Target - { - return BilateralUpsample(input, _CameraDepthTexture, _QuarterResDepthBuffer, _QuarterResColor, sampler_QuarterResColor, sampler_QuarterResDepthBuffer); - } - - ENDCG - } - - // pass 8 - horizontal blur (quarter res) - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment horizontalFrag - #pragma target 4.0 - - fixed4 horizontalFrag(v2f input) : SV_Target - { - return BilateralBlur(input, int2(1, 0), _QuarterResDepthBuffer, sampler_QuarterResDepthBuffer, QUARTER_RES_BLUR_KERNEL_SIZE, _QuarterResDepthBuffer_TexelSize.xy); - } - - ENDCG - } - - // pass 9 - vertical blur (quarter res) - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment verticalFrag - #pragma target 4.0 - - fixed4 verticalFrag(v2f input) : SV_Target - { - return BilateralBlur(input, int2(0, 1), _QuarterResDepthBuffer, sampler_QuarterResDepthBuffer, QUARTER_RES_BLUR_KERNEL_SIZE, _QuarterResDepthBuffer_TexelSize.xy); - } - - ENDCG - } - - // pass 10 - downsample depth to half (fallback for DX10) - Pass - { - CGPROGRAM - #pragma vertex vertHalfDepth - #pragma fragment frag - #pragma target 4.0 - - v2fDownsample vertHalfDepth(appdata v) - { - return vertDownsampleDepth(v, _CameraDepthTexture_TexelSize); - } - - float frag(v2fDownsample input) : SV_Target - { - return DownsampleDepth(input, _CameraDepthTexture, sampler_CameraDepthTexture); - } - - ENDCG - } - - // pass 11 - downsample depth to quarter (fallback for DX10) - Pass - { - CGPROGRAM - #pragma vertex vertQuarterDepth - #pragma fragment frag - #pragma target 4.0 - - v2fDownsample vertQuarterDepth(appdata v) - { - return vertDownsampleDepth(v, _HalfResDepthBuffer_TexelSize); - } - - float frag(v2fDownsample input) : SV_Target - { - return DownsampleDepth(input, _HalfResDepthBuffer, sampler_HalfResDepthBuffer); - } - - ENDCG - } - } -} diff --git a/Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader.meta b/Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader.meta deleted file mode 100644 index 0ef47a134..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/BilateralBlur.shader.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3a318313363986c4fa6458d8183df3f6 -timeCreated: 1522493409 -licenseType: Free -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute b/Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute deleted file mode 100644 index 81a64a2ae..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute +++ /dev/null @@ -1,30 +0,0 @@ -// Each #kernel tells which function to compile; you can have many kernels -#pragma kernel CSMain - -/* -======================================== -Calculate height lookup table through height-density map. -======================================== -*/ -sampler2D heightDensityMap; -RWTexture2D heightLutResult; -#include "CloudShaderHelper.cginc" -[numthreads(32, 32, 1)] -void CSMain (uint3 id : SV_DispatchThreadID) -{ - uint w, h; - heightLutResult.GetDimensions(w, h); - - float coverage, cloudType; - coverage = (0.5f + id.x) / w; - cloudType = (0.5f + id.y) / h; - float heightPercent = 1.0f; - for (; heightPercent > 0.0f; heightPercent -= 1.0f / SAMPLE_COUNT) { - float density = tex2Dlod(heightDensityMap, float4(cloudType, heightPercent, 0.0, 0.0)).r; - density = ApplyCoverageToDensity(density, coverage); - if (density > 0.0f) { - break; - } - } - heightLutResult[id.xy] = heightPercent; -} diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute.meta b/Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute.meta deleted file mode 100644 index fd810295a..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudHeightPreprocess.compute.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 40276bd53f35a694e8d4e025ca310775 -ComputeShaderImporter: - externalObjects: {} - currentAPIMask: 4 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc b/Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc deleted file mode 100644 index bf2b7bff7..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc +++ /dev/null @@ -1,116 +0,0 @@ -#include "CloudShaderHelper.cginc" - -sampler2D _HiHeightMap; //Includes hierarchical height map. Every mip level stores max height of sub pixels. -uint _HeightMapSize; - -uint _HiHeightMaxLevel; -uint _HiHeightMinLevel; - -int2 GetCellIndex(float2 pos, uint level) { - float2 uv = pos / _WeatherTexSize; - uint currentLevelSize = _HeightMapSize >> level; - return (int2)floor(uv * (float)currentLevelSize); -} - -float IntersectWithHeightPlane(float3 origin, float3 v, float height) { - //As suggested by https://docs.unity3d.com/Manual/SL-DataTypesAndPrecision.html and IEEE754 - //On most pc gpus, divide by zero gives a INF result. - return (height - origin.y) / v.y; -} - -float IntersectWithCellBoundary(float3 origin, float3 v, uint zlevel, int2 cellIndex) { - //Origin is assumed to be inside cell of cellIndex - - uint currentLevelSize = _HeightMapSize >> zlevel; - float cellSpacing = _WeatherTexSize / currentLevelSize; - - //x-axis plane. - float2 xAxisPlanes = (cellIndex.x + float2(1.0, 0.0)) * cellSpacing; //Same as float2((cellIndex.x + 0.5) * cellSpacing), (cellIndex.x - 0.5) * cellSpacing)) - float2 xAxisIntersectT = (xAxisPlanes - origin.x) / v.x; - - //z-axis planes. - float2 zAxisPlanes = (cellIndex.y + float2(0.0, 1.0)) * cellSpacing; - float2 zAxisIntersectT = (zAxisPlanes - origin.z) / v.z; - - //TODO: Above calculations could be combined into one float4, will that help? - - return min(max(xAxisIntersectT.x, xAxisIntersectT.y), max(zAxisIntersectT.x, zAxisIntersectT.y)); -} - -float HierarchicalRaymarch(float3 startPos, float3 dir, float maxSampleDistance, float raymarchOffset, out float intensity, out float depth, out int iteration_count) { - float sampleStart, sampleEnd; - if (!resolve_ray_start_end(startPos, dir, sampleStart, sampleEnd)) { - intensity = 0.0; - depth = 1e6; - return 0; - } - float3 sampleStartPos = startPos + dir * sampleStart; - if (sampleStartPos.y < -200) { //Below horizon. - intensity = 0.0; - depth = 1e6; - return 0.0; - } - - float sample_step = min((sampleEnd - sampleStart) / SAMPLE_COUNT, 1000); - float3 v = sample_step * dir; - float stepSize = length(v); - float maxStepCount = min(maxSampleDistance, sampleEnd) / stepSize; - - uint currentZLevel = 2; - float currentStep = sampleStart / stepSize + raymarchOffset; - - RaymarchStatus result; - InitRaymarchStatus(result); - - iteration_count = 0; - - [loop] - while(currentStep < maxStepCount && iteration_count++ < SAMPLE_COUNT) { - float3 raypos = startPos + currentStep * v; - float2 uv = (raypos.xz / _WeatherTexSize) + 0.5; - float height = tex2Dlod(_HiHeightMap, float4(uv, 0.0, currentZLevel)) * (_CloudEndHeight - _CloudStartHeight )+ _CloudStartHeight; - int2 oldCellIndex = GetCellIndex(raypos.xz, currentZLevel); - - float rayhitStepSize; - bool intersected = false; - if (raypos.y < height) { - rayhitStepSize = 0.0f; - intersected = true; - } else { - rayhitStepSize = IntersectWithHeightPlane(raypos, v, height); - if (rayhitStepSize > 0.0f) { - //tmpRay is the intersection point of the height plane and ray. - float3 tmpRay = raypos + v * rayhitStepSize; - int2 newCellIndex = GetCellIndex(tmpRay.xz, currentZLevel); - intersected = newCellIndex.x == oldCellIndex.x && newCellIndex.y == oldCellIndex.y; - } else { - intersected = false; - } - } - - if (intersected) { //Current raypos is inside cloud of current level. - //Move raypos to just beyond rayhitStepSize - currentStep += ceil(rayhitStepSize); - if (currentZLevel == _HiHeightMinLevel) { //We can do raymarch now. - IntegrateRaymarch(startPos, raypos, dir, stepSize, result); - if (result.intTransmittance < 0.005f) { //Save gpu, save the world. - break; - } - currentStep += 1.0f; - } else { - currentZLevel -= 1; - } - } else { //Reached bound of current cell. - rayhitStepSize = IntersectWithCellBoundary(raypos, v, currentZLevel, oldCellIndex); - currentStep += ceil(rayhitStepSize + 0.0001 /*Make sure we move into another cell*/); - currentZLevel = min(currentZLevel + 1, _HiHeightMaxLevel); - } - } - - depth = result.depth / result.depthweightsum; - if (depth == 0.0f) { - depth = sampleEnd; - } - intensity = result.intensity; - return (1.0f - result.intTransmittance); -} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc.meta b/Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc.meta deleted file mode 100644 index 68844ba76..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudHierarchicalRaymarch.cginc.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8740176f52adad549ab584e6fc48ac24 -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader b/Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader deleted file mode 100644 index 6d8c3ebdf..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader +++ /dev/null @@ -1,98 +0,0 @@ -// Upgrade NOTE: commented out 'float4x4 _CameraToWorld', a built-in variable -// Upgrade NOTE: replaced '_CameraToWorld' with 'unity_CameraToWorld' - -Shader "Yangrc/HeightMapDownsample" -{ - Properties - { - _MainTex("Main Tex", 2D) = "white" - } - - SubShader - { - - CGINCLUDE - - ENDCG - - Cull Off ZWrite Off ZTest Always - Pass //Pass 1, extract finiest height map from weather tex, using height lut. - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - sampler2D _WeatherTex; - sampler2D _HeightLut; - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct Interpolator { - float4 vertex : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - Interpolator vert (appdata v) - { - Interpolator o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = v.uv; - return o; - } - - float frag (Interpolator i) : SV_Target - { - float3 weatherData = tex2D(_WeatherTex, i.uv); - float height = tex2D(_HeightLut, float2(weatherData.xz)); /*Index using coverage(x) and heightpercent(z)*/ - return height; - } - - ENDCG - } - - Pass //Pass 2, downsample height map using max operator. - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - - sampler2D _MainTex; - float3 _MainTex_TexelSize; - - struct appdata - { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - }; - - struct Interpolator { - float4 vertex : SV_POSITION; - float2 uv : TEXCOORD0; - }; - - Interpolator vert (appdata v) - { - Interpolator o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.uv = v.uv; - return o; - } - - float frag (Interpolator i) : SV_Target - { - float2 offset = _MainTex_TexelSize.xy / 2.0f; - float s1 = tex2D(_MainTex, i.uv - offset); - float s2 = tex2D(_MainTex, i.uv + offset); - offset.y *= -1.0f; - float s3 = tex2D(_MainTex, i.uv - offset); - float s4 = tex2D(_MainTex, i.uv + offset); - return max(s1, max(s2, max(s3, s4))); - } - ENDCG - } - } -} diff --git a/Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader.meta b/Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader.meta deleted file mode 100644 index e29518fad..000000000 --- a/Assets/Plugins/VolumeCloud/Shaders/HeightMapDownsample.shader.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b80bf04ca56d3d642a6b925cff3f5ddf -ShaderImporter: - externalObjects: {} - defaultTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures.meta b/Assets/Plugins/VolumeCloud/Textures.meta deleted file mode 100644 index 8da368229..000000000 --- a/Assets/Plugins/VolumeCloud/Textures.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: dbe1d8dcf77687d47b6bd59312dd5268 -folderAsset: yes -timeCreated: 1522836345 -licenseType: Free -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset b/Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset deleted file mode 100644 index a021898b6..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7beb67bfada576d75227531669a8bd6a2c3e4613ff4aa23ff46a7a8f2ad5b4ae -size 19174643 diff --git a/Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset.meta b/Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset.meta deleted file mode 100644 index 87bf8c8df..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/BaseNoise.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3ed67598438ec1e4dba28385e35a557b -timeCreated: 1535769919 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11700000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/Cloudy.psd b/Assets/Plugins/VolumeCloud/Textures/Cloudy.psd deleted file mode 100644 index c88845609..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/Cloudy.psd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9123af52bd92d933d290f7acc31e8b1c6173dac923232205c472ada52d38ed0 -size 869334 diff --git a/Assets/Plugins/VolumeCloud/Textures/Cloudy.psd.meta b/Assets/Plugins/VolumeCloud/Textures/Cloudy.psd.meta deleted file mode 100644 index a62962ad5..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/Cloudy.psd.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: c73be893af46a1e4db152d42aacae768 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: -1 - mipBias: -1 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset b/Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset deleted file mode 100644 index 057e8544e..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:03bea44207ce6c07c3e4f50529134b0e30ccb44388e6124197d86ddb4b3b3cbe -size 350314 diff --git a/Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset.meta b/Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset.meta deleted file mode 100644 index 62f2551cf..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/CurlNoise.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 864afbdb4b1b36c42be5cac8f2556237 -timeCreated: 1522742502 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 2800000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset b/Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset deleted file mode 100644 index a1582c364..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:413ccfebbf04dc2a3f8c9dc3243a4ca6de11d12e90c5e62d80d874de04d5e00e -size 225374 diff --git a/Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset.meta b/Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset.meta deleted file mode 100644 index fd2030180..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/DetailNoise.asset.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c978a1d1fdb99d54eb7910eb562fcbd7 -timeCreated: 1535770018 -licenseType: Free -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11700000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png b/Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png deleted file mode 100644 index fb8b3f0e2..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb4d1d66f94771bdf6cb0b5daa34fb168205d3724ee73bd8315d7d3dcaca3cf2 -size 11705 diff --git a/Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png.meta b/Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png.meta deleted file mode 100644 index 2d95e4899..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/HeightDensityMap.png.meta +++ /dev/null @@ -1,86 +0,0 @@ -fileFormatVersion: 2 -guid: a27c79a96e56b794a9bcb99b3b2df92b -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd b/Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd deleted file mode 100644 index 23f2b0fd7..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d931eb1bb68bc8fffaf7dee472e6376a2ca23fd577304d6fd4e7310eab69610 -size 6486050 diff --git a/Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd.meta b/Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd.meta deleted file mode 100644 index 688066ecf..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/Screenshot1.psd.meta +++ /dev/null @@ -1,86 +0,0 @@ -fileFormatVersion: 2 -guid: 4f3f3112dcf000b47ac790c3b15cf3ec -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 512 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd b/Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd deleted file mode 100644 index 30c1a255a..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d06055b3dcdca6dc788448ccfb90cb8012a6f85d7bfd52ace20d74365b182f91 -size 1229905 diff --git a/Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd.meta b/Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd.meta deleted file mode 100644 index 722277e8e..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/SingleHugeCloud.psd.meta +++ /dev/null @@ -1,76 +0,0 @@ -fileFormatVersion: 2 -guid: d9c1df7019059ba408ab9e1ce569088c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -1 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/VolumeCloud/Textures/Test.psd b/Assets/Plugins/VolumeCloud/Textures/Test.psd deleted file mode 100644 index 35205809a..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/Test.psd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:376d362311adab9e23a3e8a59b4eb3fe413702ca1eccab7988b21226900a6020 -size 1704946 diff --git a/Assets/Plugins/VolumeCloud/Textures/Test.psd.meta b/Assets/Plugins/VolumeCloud/Textures/Test.psd.meta deleted file mode 100644 index f95476992..000000000 --- a/Assets/Plugins/VolumeCloud/Textures/Test.psd.meta +++ /dev/null @@ -1,96 +0,0 @@ -fileFormatVersion: 2 -guid: 419de397c006f894d8e0d1b6777bc0ad -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: -1 - mipBias: -1 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Resources/Settings.asset b/Assets/Resources/Settings.asset index 50818f74d..e07ce34a8 100644 --- a/Assets/Resources/Settings.asset +++ b/Assets/Resources/Settings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9e4306defe954208e5c67e9e7981b914c419177f360bf36ee0c21c0fc16fe87 -size 13098 +oid sha256:9f15b6804416e1a856fef22d3a54c70f6e4c0062f706ad733cf5fa42464f2602 +size 13121 diff --git a/Assets/Scenes/ARPG.unity b/Assets/Scenes/ARPG.unity index 28259edc5..0ae96d9c2 100644 --- a/Assets/Scenes/ARPG.unity +++ b/Assets/Scenes/ARPG.unity @@ -16184,11 +16184,11 @@ MonoBehaviour: Span: 256 Speed: -0.5 MinimumSize: 0 - MaximumSize: 0.5 + MaximumSize: 0.75 Spacing: 6 Ceiling: -250 Floor: -25 - HeightExponent: 100000 + HeightExponent: 1000000 NebulaSurfaceHeight: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2} NebulaPatchHeight: {fileID: 8400000, guid: c618a6b20b3c7394590c59a9fa467e86, type: 2} NebulaPatch: {fileID: 8400000, guid: 06ec5ef8a5830fc44b1ac1a6e123add5, type: 2} @@ -30713,17 +30713,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9f1db61281524fb40bc9a1f6acce6baf, type: 3} m_Name: m_EditorClassIdentifier: - configuration: {fileID: 11400000, guid: a15886e93ac3e7847861da392782f13d, type: 2} downSample: 0 - quality: 2 - allowCloudFrontObject: 1 - useApSystem: 0 - useHierarchicalHeightMap: 0 + quality: 1 cloudShader: {fileID: 4800000, guid: 84e97169589c5e94e8521fe4deb2e3f8, type: 3} - heightPreprocessShader: {fileID: 7200000, guid: 40276bd53f35a694e8d4e025ca310775, - type: 3} - cloudHeightProcessShader: {fileID: 4800000, guid: b80bf04ca56d3d642a6b925cff3f5ddf, - type: 3} --- !u!20 &2115559089 Camera: m_ObjectHideFlags: 0 @@ -30756,7 +30748,7 @@ Camera: m_CullingMask: serializedVersion: 2 m_Bits: 2097185 - m_RenderingPath: 3 + m_RenderingPath: 1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 @@ -30889,7 +30881,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8c03374f22d0a3d4882018de66894a84, type: 3} m_Name: m_EditorClassIdentifier: - VolMaterial: {fileID: 2100000, guid: 2ff39f5d101241043ba1dcde19d92f77, type: 2} GridTransform: {fileID: 0} Settings: {fileID: 11400000, guid: cd2344e2001a37544aab0960c164d4ff, type: 2} NebulaSurfaceHeight: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2} diff --git a/Assets/Scenes/Main Menu.unity b/Assets/Scenes/Main Menu.unity index 1516cbcdc..1c836d8f4 100644 --- a/Assets/Scenes/Main Menu.unity +++ b/Assets/Scenes/Main Menu.unity @@ -1234,7 +1234,7 @@ Camera: m_CullingMask: serializedVersion: 2 m_Bits: 1 - m_RenderingPath: -1 + m_RenderingPath: 1 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_TargetEye: 3 diff --git a/Assets/Scripts/ServerShared/Environment.cs b/Assets/Scripts/ServerShared/Environment.cs index 11fd0a7a4..646d93a23 100644 --- a/Assets/Scripts/ServerShared/Environment.cs +++ b/Assets/Scripts/ServerShared/Environment.cs @@ -27,6 +27,7 @@ public class NebulaSettings [JsonProperty("fogBlend"), Key(5)] public float FloorBlend; [JsonProperty("cloudBlend"), Key(6)] public float PatchBlend; [JsonProperty("luminance"), Key(7)] public float Luminance; + [JsonProperty("extinction"), Key(13)] public float Extinction; [JsonProperty("tintExponent"), Key(8)] public float TintExponent; [JsonProperty("tintLodExponent"), Key(9)] public float TintLodExponent; [JsonProperty("safetyDistance"), Key(10)] public float SafetyDistance; diff --git a/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs b/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs new file mode 100644 index 000000000..2cc5127a5 --- /dev/null +++ b/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs @@ -0,0 +1,159 @@ +using System; +using System.Linq; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; + +/// +/// Based on github.com/yangrc1234/VolumeCloud +/// Generate halton sequence. +/// code from unity post-processing stack. +/// +public class HaltonSequence { + public int radix = 3; + private int storedIndex = 0; + public float Get() { + float result = 0f; + float fraction = 1f / (float)radix; + int index = storedIndex; + while (index > 0) { + result += (float)(index % radix) * fraction; + + index /= radix; + fraction /= (float)radix; + } + storedIndex++; + return result; + } +} + +public enum Quality { + Low, + Normal, //Low sample count + High, //High sample count and high shadow sample count. + Ultra +} + +/// +/// Cloud renderer post processing. +/// +[ImageEffectAllowedInSceneView] +[ExecuteInEditMode,RequireComponent(typeof(Camera))] +[ImageEffectOpaque] + public class VolumeCloudRenderer : EffectBase { + [Header("Render Settings")] + [Range(0, 2)] + public int downSample = 1; + public Quality quality; + + private Material mat; + private RenderTexture[] fullBuffer; + private int fullBufferIndex; + private RenderTexture undersampleBuffer; + private Matrix4x4 prevV; + private Camera mcam; + private HaltonSequence sequence = new HaltonSequence() { radix = 3 }; + // The index of 4x4 pixels. + private int frameIndex = 0; + private float bayerOffsetIndex = 0; + private bool firstFrame = true; + + [SerializeField] + private Shader cloudShader; + + void EnsureMaterial(bool force = false) { + if (mat == null || force) { + mat = new Material(cloudShader); + } + } + + private void OnDestroy() { + if (this.fullBuffer != null) { + for (int i = 0; i < fullBuffer.Length; i++) { + fullBuffer[i].Release(); + fullBuffer[i] = null; + } + } + if (this.undersampleBuffer != null) { + this.undersampleBuffer.Release(); + this.undersampleBuffer = null; + } + } + + private void Start() { + this.EnsureMaterial(true); + } + + [ImageEffectOpaque] + private void OnRenderImage(RenderTexture source, RenderTexture destination) { + if (cloudShader == null) { + Graphics.Blit(source, destination); + return; + } + + mcam = GetComponent(); + var width = mcam.pixelWidth >> downSample; + var height = mcam.pixelHeight >> downSample; + + this.EnsureMaterial(); + + EnsureArray(ref fullBuffer, 2); + firstFrame |= EnsureRenderTarget(ref fullBuffer[0], width, height, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); + firstFrame |= EnsureRenderTarget(ref fullBuffer[1], width, height, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); + firstFrame |= EnsureRenderTarget(ref undersampleBuffer, width , height, RenderTextureFormat.ARGBFloat, FilterMode.Bilinear); + + frameIndex = (frameIndex + 1)% 16; + fullBufferIndex = (fullBufferIndex + 1) % 2; + + /* Some code is from playdead TAA. */ + + //1. Pass1, Render a undersampled buffer. The buffer is dithered using bayer matrix(every 3x3 pixel) and halton sequence. + //If it's first frame, force a high quality sample to make the initial history buffer good enough. + if (firstFrame || quality == Quality.Ultra) { + mat.EnableKeyword("ULTRA_QUALITY"); + mat.DisableKeyword("HIGH_QUALITY"); + mat.DisableKeyword("MEDIUM_QUALITY"); + mat.DisableKeyword("LOW_QUALITY"); + } else if (quality == Quality.High) { + mat.DisableKeyword("ULTRA_QUALITY"); + mat.EnableKeyword("HIGH_QUALITY"); + mat.DisableKeyword("MEDIUM_QUALITY"); + mat.DisableKeyword("LOW_QUALITY"); + } else if (quality == Quality.Normal) { + mat.DisableKeyword("ULTRA_QUALITY"); + mat.DisableKeyword("HIGH_QUALITY"); + mat.EnableKeyword("MEDIUM_QUALITY"); + mat.DisableKeyword("LOW_QUALITY"); + } else if (quality == Quality.Low) { + mat.DisableKeyword("ULTRA_QUALITY"); + mat.DisableKeyword("HIGH_QUALITY"); + mat.DisableKeyword("MEDIUM_QUALITY"); + mat.EnableKeyword("LOW_QUALITY"); + } + + mat.SetVector("_ProjectionExtents", mcam.GetProjectionExtents()); + mat.SetFloat("_RaymarchOffset", sequence.Get()); + mat.SetVector("_TexelSize", undersampleBuffer.texelSize); + + Graphics.Blit(null, undersampleBuffer, mat, 0); + + //2. Pass 2, blend undersampled image with history buffer to new buffer. + mat.SetTexture("_UndersampleCloudTex", undersampleBuffer); + mat.SetMatrix("_PrevVP", GL.GetGPUProjectionMatrix(mcam.projectionMatrix,false) * prevV); + mat.SetVector("_ProjectionExtents", mcam.GetProjectionExtents()); + + if (firstFrame) { //Wait, is this the first frame? If it is, the history buffer is empty yet. It will cause glitch if we use it directly. Fill it using the undersample buffer. + Graphics.Blit(undersampleBuffer, fullBuffer[fullBufferIndex]); + } + Graphics.Blit(fullBuffer[fullBufferIndex], fullBuffer[fullBufferIndex ^ 1], mat, 1); + + //3. Pass3, Calculate lighting, blend final cloud image with final image. + mat.SetTexture("_CloudTex", fullBuffer[fullBufferIndex ^ 1]); + Graphics.Blit(source, destination, mat, 2); + + //4. Cleanup + prevV = mcam.worldToCameraMatrix; + firstFrame = false; + } +} \ No newline at end of file diff --git a/Assets/Plugins/VolumeCloud/Scripts/VolumeCloudRenderer.cs.meta b/Assets/Scripts/Zone Display/VolumeCloudRenderer.cs.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Scripts/VolumeCloudRenderer.cs.meta rename to Assets/Scripts/Zone Display/VolumeCloudRenderer.cs.meta diff --git a/Assets/Scripts/Zone Display/VolumeSampling.cs b/Assets/Scripts/Zone Display/VolumeSampling.cs index 6f0ddc5b5..cb0d55c04 100644 --- a/Assets/Scripts/Zone Display/VolumeSampling.cs +++ b/Assets/Scripts/Zone Display/VolumeSampling.cs @@ -17,12 +17,12 @@ using static Unity.Mathematics.noise; [RequireComponent( typeof( Camera ) )] public class VolumeSampling : MonoBehaviour { - public Material VolMaterial; + //public Material VolMaterial; public Transform GridTransform; public GameSettings Settings; //public int DownsampleBlurMask = 2; - private Camera _camera; - private RenderBuffer[] _mrt; + // private Camera _camera; + // private RenderBuffer[] _mrt; private Texture2D _blurMask; private Texture2D _disabledBlurMask; private float _flowScroll; @@ -38,17 +38,13 @@ public class VolumeSampling : MonoBehaviour private void Start() { //Debug.Log($"Supported MRT count: {SystemInfo.supportedRenderTargetCount}"); - _camera = GetComponent(); - _mrt = new RenderBuffer[2]; + // _camera = GetComponent(); + // _mrt = new RenderBuffer[2]; //_blurMask = new RenderTexture(Screen.width, Screen.height, 0, GraphicsFormat.R8_UNorm); _blurMask = Color.white.ToTexture(); _disabledBlurMask = Color.black.ToTexture(); } - private void OnPreRender() - { - } - //[ImageEffectOpaque] void Update() { @@ -97,6 +93,7 @@ public class VolumeSampling : MonoBehaviour Shader.SetGlobalFloat("_NebulaFloorBlend", Settings.DefaultEnvironment.Nebula.FloorBlend); Shader.SetGlobalFloat("_NebulaPatchBlend", Settings.DefaultEnvironment.Nebula.PatchBlend); Shader.SetGlobalFloat("_NebulaLuminance", Settings.DefaultEnvironment.Nebula.Luminance); + Shader.SetGlobalFloat("_ExtinctionCoefficient", Settings.DefaultEnvironment.Nebula.Extinction); Shader.SetGlobalFloat("_TintExponent", Settings.DefaultEnvironment.Nebula.TintExponent); Shader.SetGlobalFloat("_TintLodExponent", Settings.DefaultEnvironment.Nebula.TintLodExponent); Shader.SetGlobalFloat("_SafetyDistance", Settings.DefaultEnvironment.Nebula.SafetyDistance); diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudNormalRaymarch.cginc b/Assets/Shaders/Raymarching/CloudNormalRaymarch.cginc similarity index 100% rename from Assets/Plugins/VolumeCloud/Shaders/CloudNormalRaymarch.cginc rename to Assets/Shaders/Raymarching/CloudNormalRaymarch.cginc diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudNormalRaymarch.cginc.meta b/Assets/Shaders/Raymarching/CloudNormalRaymarch.cginc.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Shaders/CloudNormalRaymarch.cginc.meta rename to Assets/Shaders/Raymarching/CloudNormalRaymarch.cginc.meta diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader b/Assets/Shaders/Raymarching/CloudShader.shader similarity index 73% rename from Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader rename to Assets/Shaders/Raymarching/CloudShader.shader index 9ae3b1baf..05807e6f6 100644 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader +++ b/Assets/Shaders/Raymarching/CloudShader.shader @@ -1,62 +1,14 @@ -// Upgrade NOTE: commented out 'float4x4 _CameraToWorld', a built-in variable -// Upgrade NOTE: replaced '_CameraToWorld' with 'unity_CameraToWorld' +// Based on github.com/yangrc1234/VolumeCloud -Shader "Yangrc/CloudShader" +Shader "Aetheria/CloudShader" { Properties { _MainTex("MainTex",2D) = "white"{} - _HeightDensity("HeightDensity", 2D) = "white"{} - _BaseTex("BaseTex", 3D) = "white" {} - _BaseTile("BaseTile", float) = 3.0 - _DetailTex("Detail", 3D) = "white" {} - _DetailTile("DetailTile", float) = 10.0 - _DetailStrength("DetailStrength", float) = 0.2 - _CurlNoise("CurlNoise", 2D) = "white"{} - _CurlTile("CurlTile", float) = .2 - _CurlStrength("CurlStrength", float) = 1 - _CloudTopOffset("TopOffset",float) = 100 - _CloudSize("CloudSize", float) = 50000 - - _CloudStartHeight("CloudStartHeight", float) = 2000 - _CloudEndHeight("CloudEndHeight", float) = 8000 - - _CloudOverallDensity("CloudOverallDensity",float) = .1 - _CloudCoverageModifier("CloudCoverageModifier", float) = 1.0 - _CloudTypeModifier("CloudTypeModifier", float) = 1.0 - - _WeatherTex("WeatherTex", 2D) = "white" {} - _WeatherTexSize("WeatherTexSize", float) = 50000 - _WindDirection("WindDirection",Vector) = (1,1,0,0) - _SilverIntensity("SilverIntensity",float) = .8 - _ScatteringCoefficient("ScatteringCoefficient",float) = .04 - _ExtinctionCoefficient("ExtinctionCoefficient",float) = .04 - _MultiScatteringA("MultiScatteringA",float) = 0.5 - _MultiScatteringB("MultiScatteringB",float) = 0.5 - _MultiScatteringC("MultiScatteringC",float) = 0.5 - _SilverSpread("SilverSpread",float) = .75 - _RaymarchOffset("RaymarchOffset", float) = 0.0 - _AmbientColor("AmbientColor", Color) = (1,1,1,1) - _AtmosphereColor("AtmosphereColor" , Color) = (1,1,1,1) - _AtmosphereColorSaturateDistance("AtmosphereColorSaturateDistance", float) = 80000 } SubShader { - - CGINCLUDE - float GetRaymarchEndFromSceneDepth(float sceneDepth, out float raymarchEnd) { - #if ALLOW_CLOUD_FRONT_OBJECT - raymarchEnd = sceneDepth * _ProjectionParams.z; //raymarch to scene depth. - #else - raymarchEnd = 1e8; //Always raymarch. - //Note: In horizon:zero dawn, they clip some part using lod(use max operator) z-buffer. - //I don't implement here cause that's exactly what hi-z buffer does, and any production rendering pipeline should share a hi-z buffer by their own. - #endif - return sceneDepth<.99; - } - ENDCG - Cull Off ZWrite Off ZTest Always //Pass1, Render a undersampled buffer. The buffer is dithered using bayer matrix(every 3x3 pixel) and halton sequence. //Why does it need a bayer matrix as offset? See technical overview on github page. @@ -64,14 +16,14 @@ Shader "Yangrc/CloudShader" { CGPROGRAM #pragma target 5.0 - #pragma multi_compile _ ALLOW_CLOUD_FRONT_OBJECT //When enabled, raymarch is marched until scene depth. This will bring some artifacts when objects move in front of cloud. - //Or disable, cloud is always behind object, and raymarch is ended if any z is detected. - #pragma multi_compile LOW_QUALITY MEDIUM_QUALITY HIGH_QUALITY //High quality uses more samples. - #pragma multi_compile _ USE_HI_HEIGHT + #pragma multi_compile LOW_QUALITY MEDIUM_QUALITY HIGH_QUALITY ULTRA_QUALITY //High quality uses more samples. #pragma vertex vert #pragma fragment frag +#if defined(ULTRA_QUALITY) + #define SAMPLE_COUNT 256 +#endif #if defined(HIGH_QUALITY) #define SAMPLE_COUNT 128 #endif @@ -82,17 +34,12 @@ Shader "Yangrc/CloudShader" #define SAMPLE_COUNT 32 #endif -#if USE_HI_HEIGHT - #include "./CloudHierarchicalRaymarch.cginc" -#else #include "./CloudNormalRaymarch.cginc" -#endif #include "UnityCG.cginc" #include "Assets/Shaders/PackFloat.cginc" sampler2D _CameraDepthTexture; float _RaymarchOffset; //raymarch offset by halton sequence, [0,1] float4 _ProjectionExtents; - float2 _TexelSize; //Texelsize used to decide offset by bayer matrix. sampler2D _DitheringTex; float4 _DitheringCoords; @@ -117,6 +64,11 @@ Shader "Yangrc/CloudShader" o.vsray = (2.0 * v.uv - 1.0) * _ProjectionExtents.xy + _ProjectionExtents.zw; return o; } + + float GetRaymarchEndFromSceneDepth(float sceneDepth, out float raymarchEnd) { + raymarchEnd = sceneDepth * _ProjectionParams.z; //raymarch to scene depth. + return sceneDepth<.99; + } float4 frag (Interpolator i) : SV_Target { @@ -157,7 +109,6 @@ Shader "Yangrc/CloudShader" #pragma target 5.0 #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ ALLOW_CLOUD_FRONT_OBJECT #pragma multi_compile LOW_QUALITY MEDIUM_QUALITY HIGH_QUALITY #include "./CloudShaderHelper.cginc" @@ -174,7 +125,6 @@ Shader "Yangrc/CloudShader" //These values are needed for doing extra raymarch when out of bound. sampler2D _CameraDepthTexture; float4 _ProjectionExtents; - float2 _TexelSize; struct appdata { @@ -285,20 +235,15 @@ Shader "Yangrc/CloudShader" ENDCG } - //Pass3, Calculate lighting, blend final cloud image with final image. + //Pass3, Blend final cloud image with final image. Pass{ Cull Off ZWrite Off ZTest Always CGPROGRAM #pragma target 5.0 #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ ALLOW_CLOUD_FRONT_OBJECT - #pragma multi_compile _ USE_YANGRC_AP #include "UnityCG.cginc" - #include "Lighting.cginc" - #include "Assets/Shaders/PackFloat.cginc" - #include "Assets/Shaders/Volumetric.cginc" sampler2D _MainTex; //Final image without cloud. sampler2D _CloudTex; //The full resolution cloud tex we generated. @@ -328,12 +273,6 @@ Shader "Yangrc/CloudShader" o.vsray = (2.0 * v.uv - 1.0) * _ProjectionExtents.xy + _ProjectionExtents.zw; return o; } - half3 _AmbientColor; -#ifdef USE_YANGRC_AP //Use value from AP system. - #include "Assets/Plugins/AtmosphereScattering/Shaders/AerialPerspectiveHelper.cginc" -#else - float _AtmosphereColorSaturateDistance; -#endif half4 frag(v2f i) : SV_Target diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader.meta b/Assets/Shaders/Raymarching/CloudShader.shader.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Shaders/CloudShader.shader.meta rename to Assets/Shaders/Raymarching/CloudShader.shader.meta diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudShaderHelper.cginc b/Assets/Shaders/Raymarching/CloudShaderHelper.cginc similarity index 73% rename from Assets/Plugins/VolumeCloud/Shaders/CloudShaderHelper.cginc rename to Assets/Shaders/Raymarching/CloudShaderHelper.cginc index 951242783..3571dc38f 100644 --- a/Assets/Plugins/VolumeCloud/Shaders/CloudShaderHelper.cginc +++ b/Assets/Shaders/Raymarching/CloudShaderHelper.cginc @@ -115,60 +115,6 @@ float ApplyCoverageToDensity(float sampleResult, float coverage){ #include "Assets/Shaders/Volumetric.cginc" -float SampleDensity(float3 worldPos,int lod, bool cheap, out float wetness) { - wetness = 0; - return density(worldPos)*_CloudOverallDensity*10; - // //Store the pos without wind applied. - // float3 unwindWorldPos = worldPos; - // - // //Sample the weather map. - // half4 coverageSampleUV = half4((unwindWorldPos.xz / _WeatherTexSize), 0, 2.5); - // coverageSampleUV.xy = (coverageSampleUV.xy + 0.5); - // float3 weatherData = tex2Dlod(_WeatherTex, coverageSampleUV); - // weatherData *= float3(_CloudCoverageModifier, 1.0, _CloudTypeModifier); - // float cloudCoverage = RemapClamped(weatherData.r, 0.0 ,1.0, 0.3, 1.0); - // float cloudType = weatherData.b; - // wetness = weatherData.g; - // - // //Calculate the normalized height between[0,1] - // float heightPercent = HeightPercent(worldPos); - // if (heightPercent <= 0.0f || heightPercent >= 1.0f) - // return 0.0; - // - // //Sample base noise. - // fixed4 tempResult; - // worldPos = ApplyWind(worldPos); - // tempResult = tex3Dlod(_BaseTex, half4(worldPos / _CloudSize * _BaseTile, lod)).rgba; - // float low_freq_fBm = (tempResult.g * .625) + (tempResult.b * 0.25) + (tempResult.a * 0.125); - // float sampleResult = RemapClamped(tempResult.r, 0.0, .1, .0, 1.0); //perlin-worley - // sampleResult = RemapClamped(low_freq_fBm, -0.5 * sampleResult, 1.0, 0.0, 1.0); - // - // //Sample Height-Density map. - // float2 densityAndErodeness = tex2Dlod(_HeightDensity, float4(cloudType, heightPercent, 0.0, 0.0)).rg; - // - // sampleResult *= densityAndErodeness.x; - // //Clip the result using coverage map. - // sampleResult = ApplyCoverageToDensity(sampleResult, cloudCoverage); - // - // if (!cheap) { - // float2 curl_noise = tex2Dlod(_CurlNoise, float4(unwindWorldPos.xz / _CloudSize * _CurlTile, 0.0, 1.0)).rg; - // worldPos.xz += curl_noise.rg * (1.0 - heightPercent) * _CloudSize * _CurlStrength; - // - // float3 tempResult2; - // tempResult2 = tex3Dlod(_DetailTex, half4(worldPos / _CloudSize * _DetailTile, lod)).rgb; - // float detailsampleResult = (tempResult2.r * 0.625) + (tempResult2.g * 0.25) + (tempResult2.b * 0.125); - // //Detail sample result here is worley-perlin fbm. - // - // //On cloud marked with low erodness, we see cauliflower style, so when doing erodness, we use 1.0f - detail. - // //On cloud marked with high erodness, we see thin line style, so when doing erodness we use detail. - // float detail_modifier = lerp(1.0f - detailsampleResult, detailsampleResult, densityAndErodeness.y); - // sampleResult = RemapClamped(sampleResult, min(0.8, detail_modifier * _DetailStrength), 1.0, 0.0, 1.0); - // } - // - // //sampleResult = pow(sampleResult, 1.2); - // return max(0, sampleResult) * _CloudOverallDensity; -} - float _MultiScatteringA; float _MultiScatteringB; float _MultiScatteringC; diff --git a/Assets/Plugins/VolumeCloud/Shaders/CloudShaderHelper.cginc.meta b/Assets/Shaders/Raymarching/CloudShaderHelper.cginc.meta similarity index 100% rename from Assets/Plugins/VolumeCloud/Shaders/CloudShaderHelper.cginc.meta rename to Assets/Shaders/Raymarching/CloudShaderHelper.cginc.meta diff --git a/GameData/PlayerSettings.msgpack b/GameData/PlayerSettings.msgpack index 0c805bba4..a87fce39e 100644 --- a/GameData/PlayerSettings.msgpack +++ b/GameData/PlayerSettings.msgpack @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f609162c1768d2ba3c1855c361bf3654320aaa56624b9f854f41e1fa137b2ce +oid sha256:43d52e27f11b38826769943bdcb454cdaa399243180c8527ad8a04a0b0312be4 size 6916 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index fb93f74d9..f33a7228f 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:642cf805309acafa4b513535bd41e7af6a774bd8002dd6096c9a774a1c66369d +oid sha256:447234e8c4d8ad0cbbdc75de56e2d314a113b5969f4fe0e37f1012457f829739 size 1687