├── .gitignore ├── CubemapFog ├── .vsconfig ├── Assets │ ├── CubemapFog.meta │ ├── CubemapFog │ │ ├── Editor.meta │ │ ├── Editor │ │ │ ├── GenerateSkyCubemap.cs │ │ │ └── GenerateSkyCubemap.cs.meta │ │ ├── PostProcess.meta │ │ ├── PostProcess │ │ │ ├── CubemapFog.cs │ │ │ ├── CubemapFog.cs.meta │ │ │ ├── CubemapFog.shader │ │ │ └── CubemapFog.shader.meta │ │ ├── SceneObject.meta │ │ └── SceneObject │ │ │ ├── CubemapFog.prefab │ │ │ ├── CubemapFog.prefab.meta │ │ │ ├── SceneCubemapFog.mat │ │ │ ├── SceneCubemapFog.mat.meta │ │ │ ├── SceneCubemapFog.shader │ │ │ └── SceneCubemapFog.shader.meta │ ├── Material.meta │ ├── Material │ │ ├── Sky.mat │ │ └── Sky.mat.meta │ ├── New Terrain.asset │ ├── New Terrain.asset.meta │ ├── Scenes.meta │ └── Scenes │ │ ├── CubemapFog_CUBE.exr │ │ ├── CubemapFog_CUBE.exr.meta │ │ ├── SampleScene.lighting │ │ ├── SampleScene.lighting.meta │ │ ├── SampleScene.meta │ │ ├── SampleScene.unity │ │ ├── SampleScene.unity.meta │ │ ├── SampleScene │ │ ├── LightingData.asset │ │ ├── LightingData.asset.meta │ │ ├── Lightmap-0_comp_dir.png │ │ ├── Lightmap-0_comp_dir.png.meta │ │ ├── Lightmap-0_comp_light.exr │ │ ├── Lightmap-0_comp_light.exr.meta │ │ ├── ReflectionProbe-0.exr │ │ └── ReflectionProbe-0.exr.meta │ │ ├── SampleScene_Profiles.meta │ │ └── SampleScene_Profiles │ │ ├── Post-process Volume Profile.asset │ │ └── Post-process Volume Profile.asset.meta ├── Packages │ ├── manifest.json │ └── packages-lock.json ├── ProjectSettings │ ├── AudioManager.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── PackageManagerSettings.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ ├── VersionControlSettings.asset │ └── XRSettings.asset └── UserSettings │ └── EditorUserSettings.asset ├── GithubContent ├── off1.png ├── on1.png ├── result1.png ├── result2.png ├── result3.jpg └── result4.jpg ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | CubemapFog/[Ll]ibrary/ 6 | CubemapFog/[Tt]emp/ 7 | CubemapFog/[Oo]bj/ 8 | CubemapFog/[Bb]uild/ 9 | CubemapFog/[Bb]uilds/ 10 | CubemapFog/[Ll]ogs/ 11 | CubemapFog/[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !CubemapFog/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | CubemapFog/[Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /CubemapFog/.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01c20fe2e08bec448a8094bccc149351 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e14d022a91798d54ca4ebc6c0c2b5461 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/Editor/GenerateSkyCubemap.cs: -------------------------------------------------------------------------------- 1 | #if UNITY_EDITOR 2 | 3 | using System.IO; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using UnityEngine; 8 | using UnityEditor; 9 | using UnityEditor.SceneManagement; 10 | using UnityEngine.Rendering; 11 | 12 | namespace CubemapFog 13 | { 14 | public class GenerateSkyCubemap : EditorWindow 15 | { 16 | public struct TextureObjectSettings 17 | { 18 | public TextureWrapMode wrapMode; 19 | public FilterMode filterMode; 20 | public int anisoLevel; 21 | } 22 | 23 | public struct TextureObjectCUBE 24 | { 25 | public Texture2D X_Positive; 26 | public Texture2D Y_Positive; 27 | public Texture2D Z_Positive; 28 | public Texture2D X_Negative; 29 | public Texture2D Y_Negative; 30 | public Texture2D Z_Negative; 31 | } 32 | 33 | //GUI related 34 | private GUIStyle titleBar; 35 | private static int guiSectionSpacePixels = 10; 36 | private static Vector2Int windowSize = new Vector2Int(350, 150); 37 | private static TextureFormat assetFormat = TextureFormat.RGBAHalf; 38 | 39 | //options 40 | private string cubemapName = "CubemapFog"; 41 | private int cubemapResolution = 128; 42 | private bool specularConvolution = true; 43 | 44 | //add a menu item at the top of the unity editor toolbar 45 | [MenuItem("Cubemap Fog/Generate Sky Cubemap")] 46 | public static void ShowWindow() 47 | { 48 | //get the window and open it 49 | GetWindow(typeof(GenerateSkyCubemap)); 50 | } 51 | 52 | /// 53 | /// GUI display function for the window 54 | /// 55 | void OnGUI() 56 | { 57 | maxSize = windowSize; 58 | minSize = windowSize; 59 | 60 | if (titleBar == null) 61 | { 62 | titleBar = new GUIStyle(EditorStyles.label); 63 | titleBar.normal.background = Texture2D.grayTexture; 64 | } 65 | 66 | //window title 67 | GUILayout.BeginVertical(titleBar); 68 | GUILayout.Label("Generate Sky Cubemap", EditorStyles.whiteLargeLabel); 69 | GUILayout.EndVertical(); 70 | GUILayout.Space(guiSectionSpacePixels); 71 | 72 | cubemapName = EditorGUILayout.TextField("Cubemap Name", cubemapName); 73 | cubemapResolution = EditorGUILayout.IntField("Cubemap Resolution", cubemapResolution); 74 | specularConvolution = EditorGUILayout.Toggle("Specular Convolution", specularConvolution); 75 | 76 | GUILayout.Space(guiSectionSpacePixels); 77 | 78 | if (GUILayout.Button("Generate")) 79 | { 80 | ConverToUnityStaticSkybox(); 81 | } 82 | } 83 | 84 | public void ConverToUnityStaticSkybox() 85 | { 86 | UnityEngine.SceneManagement.Scene activeScene = EditorSceneManager.GetActiveScene(); 87 | string sceneFolder = Path.GetDirectoryName(activeScene.path); 88 | 89 | //create our camera object and set it up 90 | GameObject cameraCubeGameObject = new GameObject("TEMP_cameraCubeGameObject"); 91 | Camera cameraCube = cameraCubeGameObject.AddComponent(); 92 | 93 | cameraCube.fieldOfView = 90.0f; 94 | cameraCube.nearClipPlane = 0.03f; 95 | cameraCube.farClipPlane = 1.0f; 96 | cameraCube.clearFlags = CameraClearFlags.Skybox; 97 | cameraCube.cullingMask = 0; 98 | cameraCube.allowHDR = true; 99 | 100 | //create a temp RT and assign it to the camera 101 | RenderTexture staticSkyRT = new RenderTexture(cubemapResolution, cubemapResolution, 0, RenderTextureFormat.DefaultHDR); 102 | staticSkyRT.dimension = TextureDimension.Cube; 103 | cameraCube.targetTexture = staticSkyRT; 104 | 105 | //-----------------------------sky----------------------------- 106 | //-----------------------------sky----------------------------- 107 | //-----------------------------sky----------------------------- 108 | 109 | //create our helper object 110 | TextureObjectSettings rtSettings = new TextureObjectSettings() { anisoLevel = 0, filterMode = FilterMode.Bilinear, wrapMode = TextureWrapMode.Clamp }; 111 | 112 | //render each cubemap face 113 | //front (+X) 114 | cameraCube.transform.Rotate(0, 90, 0); 115 | cameraCube.Render(); 116 | SaveCUBE_Face(staticSkyRT, sceneFolder + "/", "X_POS", rtSettings); 117 | 118 | //right (-Z) 119 | cameraCube.transform.Rotate(0, 90, 0); 120 | cameraCube.Render(); 121 | SaveCUBE_Face(staticSkyRT, sceneFolder + "/", "Z_NEG", rtSettings); 122 | 123 | //back (-X) 124 | cameraCube.transform.Rotate(0, 90, 0); 125 | cameraCube.Render(); 126 | SaveCUBE_Face(staticSkyRT, sceneFolder + "/", "X_NEG", rtSettings); 127 | 128 | //left (+Z) 129 | cameraCube.transform.Rotate(0, 90, 0); 130 | cameraCube.Render(); 131 | SaveCUBE_Face(staticSkyRT, sceneFolder + "/", "Z_POS", rtSettings); 132 | 133 | //+Y (up) (left then up) 134 | cameraCube.transform.Rotate(90, 0, 0); 135 | cameraCube.Render(); 136 | SaveCUBE_Face(staticSkyRT, sceneFolder + "/", "Y_POS", rtSettings); 137 | 138 | //-Y (down) (left then down) 139 | cameraCube.transform.Rotate(180, 0, 0); 140 | cameraCube.Render(); 141 | SaveCUBE_Face(staticSkyRT, sceneFolder + "/", "Y_NEG", rtSettings); 142 | 143 | //finally we combine them 144 | TextureObjectCUBE finalSky_faces = new TextureObjectCUBE() 145 | { 146 | X_Positive = AssetDatabase.LoadAssetAtPath(string.Format("{0}/{1}_CUBE_X_POS.exr", sceneFolder, cubemapName)), 147 | Y_Positive = AssetDatabase.LoadAssetAtPath(string.Format("{0}/{1}_CUBE_Y_POS.exr", sceneFolder, cubemapName)), 148 | Z_Positive = AssetDatabase.LoadAssetAtPath(string.Format("{0}/{1}_CUBE_Z_POS.exr", sceneFolder, cubemapName)), 149 | X_Negative = AssetDatabase.LoadAssetAtPath(string.Format("{0}/{1}_CUBE_X_NEG.exr", sceneFolder, cubemapName)), 150 | Y_Negative = AssetDatabase.LoadAssetAtPath(string.Format("{0}/{1}_CUBE_Y_NEG.exr", sceneFolder, cubemapName)), 151 | Z_Negative = AssetDatabase.LoadAssetAtPath(string.Format("{0}/{1}_CUBE_Z_NEG.exr", sceneFolder, cubemapName)) 152 | }; 153 | 154 | CombineCUBE(finalSky_faces, sceneFolder + "/", rtSettings); 155 | 156 | //remove the camera from the scene 157 | DestroyImmediate(cameraCubeGameObject); 158 | } 159 | 160 | public void SaveCUBE_Face(RenderTexture rt, string directory, string faceIndex, TextureObjectSettings settings) 161 | { 162 | //create our texture2D object to store the slice 163 | Texture2D output = new Texture2D(rt.width, rt.height, assetFormat, false); 164 | output.anisoLevel = settings.anisoLevel; 165 | output.wrapMode = settings.wrapMode; 166 | output.filterMode = settings.filterMode; 167 | 168 | //make sure the render texture slice is active so we can read from it 169 | RenderTexture.active = rt; 170 | 171 | //read the texture and store the data in the texture2D object 172 | output.ReadPixels(new Rect(0, 0, rt.width, rt.height), 0, 0); 173 | output.Apply(); 174 | 175 | RenderTexture.active = null; 176 | 177 | //save the asset to disk 178 | if (Directory.Exists(Path.GetDirectoryName(Application.dataPath) + "/" + directory) == false) 179 | Directory.CreateDirectory(Path.GetDirectoryName(Application.dataPath) + "/" + directory); 180 | 181 | string assetPath = directory + cubemapName + "_CUBE_" + faceIndex + ".exr"; 182 | string assetSystemPath = Path.GetDirectoryName(Application.dataPath) + "/" + assetPath; 183 | 184 | AssetDatabase.DeleteAsset(assetPath); 185 | File.WriteAllBytes(assetSystemPath, output.EncodeToEXR()); 186 | AssetDatabase.ImportAsset(assetPath); 187 | 188 | Texture2D loadedTexture = AssetDatabase.LoadAssetAtPath(assetPath); 189 | TextureImporter textureImporter = (TextureImporter)TextureImporter.GetAtPath(assetPath); 190 | 191 | if (loadedTexture.isReadable != true) 192 | { 193 | textureImporter.isReadable = true; 194 | textureImporter.SaveAndReimport(); 195 | } 196 | } 197 | 198 | public void CombineCUBE(TextureObjectCUBE faceTextures, string directory, TextureObjectSettings settings) 199 | { 200 | int cubemapFullHeightSize = faceTextures.X_Positive.height; 201 | int cubemapFullWidthSize = faceTextures.X_Positive.width * 6; 202 | 203 | int cubemapSingleHeightSize = faceTextures.X_Positive.height; 204 | int cubemapSingleWidthSize = faceTextures.X_Positive.width; 205 | 206 | Texture2D output = new Texture2D(cubemapFullWidthSize, cubemapFullHeightSize, assetFormat, false); 207 | output.anisoLevel = settings.anisoLevel; 208 | output.wrapMode = settings.wrapMode; 209 | output.filterMode = settings.filterMode; 210 | 211 | //x pos 212 | for (int x = 0; x < cubemapSingleWidthSize; x++) 213 | { 214 | for (int y = 0; y < cubemapSingleHeightSize; y++) 215 | { 216 | Vector2Int pixelPosFull = new Vector2Int(x + (cubemapSingleWidthSize * 0), y); 217 | Vector2Int pixelPosFace = new Vector2Int(x, y); 218 | 219 | Color pixelColorFace = faceTextures.X_Positive.GetPixel(pixelPosFace.x, pixelPosFace.y); 220 | 221 | output.SetPixel(pixelPosFull.x, pixelPosFull.y, pixelColorFace); 222 | } 223 | } 224 | 225 | //x neg 226 | for (int x = 0; x < cubemapSingleWidthSize; x++) 227 | { 228 | for (int y = 0; y < cubemapSingleHeightSize; y++) 229 | { 230 | Vector2Int pixelPosFull = new Vector2Int(x + (cubemapSingleWidthSize * 1), y); 231 | Vector2Int pixelPosFace = new Vector2Int(x, y); 232 | 233 | Color pixelColorFace = faceTextures.X_Negative.GetPixel(pixelPosFace.x, pixelPosFace.y); 234 | 235 | output.SetPixel(pixelPosFull.x, pixelPosFull.y, pixelColorFace); 236 | } 237 | } 238 | 239 | //y neg 240 | for (int x = 0; x < cubemapSingleWidthSize; x++) 241 | { 242 | for (int y = 0; y < cubemapSingleHeightSize; y++) 243 | { 244 | Vector2Int pixelPosFull = new Vector2Int(x + (cubemapSingleWidthSize * 2), y); 245 | Vector2Int pixelPosFace = new Vector2Int(x, y); 246 | 247 | Color pixelColorFace = faceTextures.Y_Negative.GetPixel(pixelPosFace.x, pixelPosFace.y); 248 | 249 | output.SetPixel(pixelPosFull.x, pixelPosFull.y, pixelColorFace); 250 | } 251 | } 252 | 253 | //y pos 254 | for (int x = 0; x < cubemapSingleWidthSize; x++) 255 | { 256 | for (int y = 0; y < cubemapSingleHeightSize; y++) 257 | { 258 | Vector2Int pixelPosFull = new Vector2Int(x + (cubemapSingleWidthSize * 3), y); 259 | Vector2Int pixelPosFace = new Vector2Int(x, y); 260 | 261 | Color pixelColorFace = faceTextures.Y_Positive.GetPixel(pixelPosFace.x, pixelPosFace.y); 262 | 263 | output.SetPixel(pixelPosFull.x, pixelPosFull.y, pixelColorFace); 264 | } 265 | } 266 | 267 | //z pos 268 | for (int x = 0; x < cubemapSingleWidthSize; x++) 269 | { 270 | for (int y = 0; y < cubemapSingleHeightSize; y++) 271 | { 272 | Vector2Int pixelPosFull = new Vector2Int(x + (cubemapSingleWidthSize * 4), y); 273 | Vector2Int pixelPosFace = new Vector2Int(x, y); 274 | 275 | Color pixelColorFace = faceTextures.Z_Positive.GetPixel(pixelPosFace.x, pixelPosFace.y); 276 | 277 | output.SetPixel(pixelPosFull.x, pixelPosFull.y, pixelColorFace); 278 | } 279 | } 280 | 281 | //z neg 282 | for (int x = 0; x < cubemapSingleWidthSize; x++) 283 | { 284 | for (int y = 0; y < cubemapSingleHeightSize; y++) 285 | { 286 | Vector2Int pixelPosFull = new Vector2Int(x + (cubemapSingleWidthSize * 5), y); 287 | Vector2Int pixelPosFace = new Vector2Int(x, y); 288 | 289 | Color pixelColorFace = faceTextures.Z_Negative.GetPixel(pixelPosFace.x, pixelPosFace.y); 290 | 291 | output.SetPixel(pixelPosFull.x, pixelPosFull.y, pixelColorFace); 292 | } 293 | } 294 | 295 | output.Apply(); 296 | 297 | //save the asset to disk 298 | if (Directory.Exists(Path.GetDirectoryName(Application.dataPath) + "/" + directory) == false) 299 | Directory.CreateDirectory(Path.GetDirectoryName(Application.dataPath) + "/" + directory); 300 | 301 | string assetPath = directory + cubemapName + "_CUBE.exr"; 302 | string assetSystemPath = Path.GetDirectoryName(Application.dataPath) + "/" + assetPath; 303 | 304 | AssetDatabase.DeleteAsset(assetPath); 305 | File.WriteAllBytes(assetSystemPath, output.EncodeToEXR()); 306 | AssetDatabase.ImportAsset(assetPath); 307 | 308 | //workaround because we can't set the texture shape on the texture object itself directly... stupid unity 309 | Texture2D loadedTexture = AssetDatabase.LoadAssetAtPath(assetPath); 310 | TextureImporter textureImporter = (TextureImporter)TextureImporter.GetAtPath(assetPath); 311 | TextureImporterSettings textureImporterSettings = new TextureImporterSettings(); 312 | 313 | if (loadedTexture.dimension != TextureDimension.Cube) 314 | { 315 | textureImporterSettings.seamlessCubemap = true; 316 | textureImporterSettings.textureShape = TextureImporterShape.TextureCube; 317 | textureImporterSettings.generateCubemap = TextureImporterGenerateCubemap.FullCubemap; 318 | textureImporterSettings.filterMode = FilterMode.Trilinear; 319 | textureImporterSettings.mipmapEnabled = true; 320 | 321 | if (specularConvolution) 322 | textureImporterSettings.cubemapConvolution = TextureImporterCubemapConvolution.Specular; 323 | 324 | textureImporter.SetTextureSettings(textureImporterSettings); 325 | textureImporter.SaveAndReimport(); 326 | } 327 | 328 | //remove the other faces since we don't need them anymore 329 | AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(faceTextures.X_Positive)); 330 | AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(faceTextures.X_Negative)); 331 | AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(faceTextures.Y_Positive)); 332 | AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(faceTextures.Y_Negative)); 333 | AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(faceTextures.Z_Positive)); 334 | AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(faceTextures.Z_Negative)); 335 | } 336 | } 337 | } 338 | 339 | #endif -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/Editor/GenerateSkyCubemap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31698e09e3c6fd545b05b03330e0a491 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/PostProcess.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04335a86d14af014f91e9f4fd9b80564 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/PostProcess/CubemapFog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.Rendering.PostProcessing; 6 | 7 | namespace CubemapFog 8 | { 9 | [Serializable] 10 | [PostProcess(typeof(CubemapFogRenderer), PostProcessEvent.BeforeTransparent, "Custom/CustomFog")] 11 | public sealed class CubemapFog : PostProcessEffectSettings 12 | { 13 | [Header("Cubemap")] 14 | public TextureParameter fogCubemap = new TextureParameter(); 15 | public FloatParameter fogCubemapExposure = new FloatParameter() { value = 1.0f }; 16 | 17 | [Header("Mip Mapping Properties")] 18 | public BoolParameter fogUseConstantMip = new BoolParameter(); 19 | public FloatParameter fogCubemapMipLevel = new FloatParameter(); 20 | public FloatParameter fogCubemapMipDistance = new FloatParameter(); 21 | public FloatParameter fogCubemapMipMultiplier = new FloatParameter() { value = 1.0f }; 22 | 23 | [Header("Main Fog Properties")] 24 | [Range(0f, 1f)] public FloatParameter intensity = new FloatParameter() { value = 1.0f }; 25 | public BoolParameter fogOccludeSky = new BoolParameter(); 26 | public FloatParameter fogStartDistance = new FloatParameter(); 27 | public FloatParameter fogDensity = new FloatParameter() { value = 1.0f }; 28 | 29 | [Header("Height Fog")] 30 | public BoolParameter heightEnable = new BoolParameter(); 31 | public FloatParameter heightFogStartDistance = new FloatParameter(); 32 | public FloatParameter heightFogDensity = new FloatParameter() { value = 1.0f }; 33 | public FloatParameter heightFogHeight = new FloatParameter(); 34 | public FloatParameter heightFogFallof = new FloatParameter() { value = 1.0f }; 35 | 36 | [Header("Debug")] 37 | public BoolParameter viewFog = new BoolParameter(); 38 | public BoolParameter viewMipDistance = new BoolParameter(); 39 | public BoolParameter viewCubemap = new BoolParameter(); 40 | } 41 | 42 | public sealed class CubemapFogRenderer : PostProcessEffectRenderer 43 | { 44 | public override void Render(PostProcessRenderContext context) 45 | { 46 | var sheet = context.propertySheets.Get(Shader.Find("Hidden/CubemapFog")); 47 | 48 | //|||||||||||||||||||||||||||||||||||||| CUBEMAP PROPERTIES |||||||||||||||||||||||||||||||||||||| 49 | //|||||||||||||||||||||||||||||||||||||| CUBEMAP PROPERTIES |||||||||||||||||||||||||||||||||||||| 50 | //|||||||||||||||||||||||||||||||||||||| CUBEMAP PROPERTIES |||||||||||||||||||||||||||||||||||||| 51 | var cubeTex = settings.fogCubemap.value == null ? RuntimeUtilities.blackTexture : settings.fogCubemap.value; 52 | 53 | sheet.properties.SetTexture("_Fog_Cubemap", cubeTex); 54 | sheet.properties.SetFloat("_Fog_Cubemap_Exposure", settings.fogCubemapExposure.value); 55 | 56 | //|||||||||||||||||||||||||||||||||||||| MAIN PROPERTIES |||||||||||||||||||||||||||||||||||||| 57 | //|||||||||||||||||||||||||||||||||||||| MAIN PROPERTIES |||||||||||||||||||||||||||||||||||||| 58 | //|||||||||||||||||||||||||||||||||||||| MAIN PROPERTIES |||||||||||||||||||||||||||||||||||||| 59 | sheet.properties.SetFloat("_Intensity", settings.intensity.value); 60 | sheet.properties.SetFloat("_Fog_StartDistance", settings.fogStartDistance.value); 61 | sheet.properties.SetFloat("_Fog_Density", settings.fogDensity.value); 62 | 63 | if (settings.fogOccludeSky.value) 64 | sheet.EnableKeyword("OCCLUDE_SKY"); 65 | else 66 | sheet.DisableKeyword("OCCLUDE_SKY"); 67 | 68 | //|||||||||||||||||||||||||||||||||||||| MIP MAP PROPERTIES |||||||||||||||||||||||||||||||||||||| 69 | //|||||||||||||||||||||||||||||||||||||| MIP MAP PROPERTIES |||||||||||||||||||||||||||||||||||||| 70 | //|||||||||||||||||||||||||||||||||||||| MIP MAP PROPERTIES |||||||||||||||||||||||||||||||||||||| 71 | if (settings.fogUseConstantMip.value) 72 | sheet.EnableKeyword("USE_CONSTANT_MIP"); 73 | else 74 | sheet.DisableKeyword("USE_CONSTANT_MIP"); 75 | 76 | sheet.properties.SetFloat("_Fog_Cubemap_Mip_MinLevel", settings.fogCubemapMipLevel.value); 77 | sheet.properties.SetFloat("_Fog_Cubemap_Mip_Distance", settings.fogCubemapMipDistance.value); 78 | sheet.properties.SetFloat("_Fog_Cubemap_Mip_Multiplier", settings.fogCubemapMipMultiplier.value); 79 | 80 | //|||||||||||||||||||||||||||||||||||||| HEIGHT FOG PROPERTIES |||||||||||||||||||||||||||||||||||||| 81 | //|||||||||||||||||||||||||||||||||||||| HEIGHT FOG PROPERTIES |||||||||||||||||||||||||||||||||||||| 82 | //|||||||||||||||||||||||||||||||||||||| HEIGHT FOG PROPERTIES |||||||||||||||||||||||||||||||||||||| 83 | if (settings.heightEnable.value) 84 | sheet.EnableKeyword("DO_HEIGHT_FOG"); 85 | else 86 | sheet.DisableKeyword("DO_HEIGHT_FOG"); 87 | 88 | sheet.properties.SetFloat("_Fog_Height_StartDistance", settings.heightFogStartDistance.value); 89 | sheet.properties.SetFloat("_Fog_Height_Density", settings.heightFogDensity.value); 90 | sheet.properties.SetFloat("_Fog_Height", settings.heightFogHeight.value); 91 | sheet.properties.SetFloat("_Fog_Height_Falloff", settings.heightFogFallof.value); 92 | 93 | //|||||||||||||||||||||||||||||||||||||| DEBUG PROPERTIES |||||||||||||||||||||||||||||||||||||| 94 | //|||||||||||||||||||||||||||||||||||||| DEBUG PROPERTIES |||||||||||||||||||||||||||||||||||||| 95 | //|||||||||||||||||||||||||||||||||||||| DEBUG PROPERTIES |||||||||||||||||||||||||||||||||||||| 96 | Vector4 debugModes = new Vector4(settings.viewFog.value ? 1 : 0, 0, settings.viewMipDistance.value ? 1 : 0, settings.viewCubemap.value ? 1 : 0); 97 | sheet.properties.SetVector("DebugModes", debugModes); 98 | 99 | //|||||||||||||||||||||||||||||||||||||| FINAL |||||||||||||||||||||||||||||||||||||| 100 | //|||||||||||||||||||||||||||||||||||||| FINAL |||||||||||||||||||||||||||||||||||||| 101 | //|||||||||||||||||||||||||||||||||||||| FINAL |||||||||||||||||||||||||||||||||||||| 102 | Matrix4x4 clipToView = GL.GetGPUProjectionMatrix(context.camera.projectionMatrix, true).inverse; 103 | sheet.properties.SetMatrix("_ClipToView", clipToView); 104 | 105 | Matrix4x4 viewMat = context.camera.worldToCameraMatrix; 106 | Matrix4x4 projMat = GL.GetGPUProjectionMatrix(context.camera.projectionMatrix, false); 107 | Matrix4x4 viewProjMat = (projMat * viewMat); 108 | Shader.SetGlobalMatrix("_ViewProjInv", viewProjMat.inverse); 109 | 110 | context.command.BlitFullscreenTriangle(context.source, context.destination, sheet, 0); 111 | } 112 | } 113 | } -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/PostProcess/CubemapFog.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3aba93752340b3945ba7b6571725359c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/PostProcess/CubemapFog.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/CubemapFog" 2 | { 3 | SubShader 4 | { 5 | Cull Off ZWrite Off ZTest Always 6 | 7 | Pass 8 | { 9 | HLSLPROGRAM 10 | #pragma vertex Vert 11 | #pragma fragment Frag 12 | #pragma shader_feature_local OCCLUDE_SKY 13 | #pragma shader_feature_local USE_CONSTANT_MIP 14 | #pragma shader_feature_local DO_HEIGHT_FOG 15 | #pragma fragmentoption ARB_precision_hint_fastest 16 | #include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl" 17 | 18 | TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex); 19 | TEXTURE2D_SAMPLER2D(_CameraDepthTexture, sampler_CameraDepthTexture); 20 | float4 _MainTex_TexelSize; 21 | float4x4 _ClipToView; 22 | float4x4 _ViewProjInv; 23 | 24 | //cubemap properties 25 | samplerCUBE _Fog_Cubemap; 26 | float _Fog_Cubemap_Exposure; 27 | 28 | //mip mapping properties 29 | float _Fog_Cubemap_Mip_MinLevel; 30 | float _Fog_Cubemap_Mip_Distance; 31 | float _Fog_Cubemap_Mip_Multiplier; 32 | 33 | //main fog properties 34 | float _Intensity; 35 | float _Fog_StartDistance; 36 | float _Fog_Density; 37 | 38 | //height fog 39 | float _Fog_Height_StartDistance; 40 | float _Fog_Height_Density; 41 | float _Fog_Height; 42 | float _Fog_Height_Falloff; 43 | 44 | //debugging 45 | float4 DebugModes; //x = classic fog, y = height fog, z = mip distance, w = cubemap only 46 | 47 | struct NewAttributesDefault 48 | { 49 | float3 vertex : POSITION; 50 | float4 texcoord : TEXCOORD; 51 | }; 52 | 53 | struct Varyings 54 | { 55 | float4 vertex : SV_POSITION; 56 | float2 texcoord : TEXCOORD0; 57 | float2 texcoordStereo : TEXCOORD1; 58 | float3 viewSpaceDir : TEXCOORD2; 59 | float3 ray : TEXCOORD3; 60 | 61 | #if STEREO_INSTANCING_ENABLED 62 | uint stereoTargetEyeIndex : SV_RenderTargetArrayIndex; 63 | #endif 64 | }; 65 | 66 | Varyings Vert(NewAttributesDefault v) 67 | { 68 | Varyings o; 69 | 70 | o.vertex = float4(v.vertex.xy, 0.0, 1.0); 71 | o.texcoord = TransformTriangleVertexToUV(v.vertex.xy); 72 | o.viewSpaceDir = mul(_ClipToView, o.vertex).xyz; 73 | o.ray = v.texcoord.xyz; 74 | 75 | #if UNITY_UV_STARTS_AT_TOP 76 | o.texcoord = o.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0); 77 | #endif 78 | 79 | o.texcoordStereo = TransformStereoScreenSpaceTex(o.texcoord, 1.0); 80 | 81 | return o; 82 | } 83 | 84 | float ComputeDistance(float3 ray, float depth) 85 | { 86 | return length(ray * depth) - _ProjectionParams.y; 87 | } 88 | 89 | float GetDepth(float2 uv) 90 | { 91 | return SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, sampler_CameraDepthTexture, uv).r; 92 | } 93 | 94 | float4 GetWorldPositionFromDepth(float2 uv_depth) 95 | { 96 | float depth = GetDepth(uv_depth); 97 | 98 | #if defined(SHADER_API_OPENGL) 99 | depth = depth * 2.0 - 1.0; 100 | #endif 101 | 102 | float4 H = float4(uv_depth.x * 2.0 - 1.0, (uv_depth.y) * 2.0 - 1.0, depth, 1.0); 103 | float4 D = mul(_ViewProjInv, H); 104 | 105 | return D / D.w; 106 | } 107 | 108 | float4 Frag(Varyings i) : SV_Target 109 | { 110 | float2 uv = i.texcoordStereo.xy; 111 | 112 | float zsample = GetDepth(uv); 113 | float4 worldPos = GetWorldPositionFromDepth(uv); 114 | float4 cameraWorldPos = mul(unity_ObjectToWorld, worldPos); 115 | float3 cameraWorldDir = _WorldSpaceCameraPos.xyz - worldPos.xyz; 116 | 117 | float depth = Linear01Depth(zsample * (zsample < 1.0)); 118 | float computedDistance = ComputeDistance(cameraWorldDir.rgb, depth); 119 | 120 | float fog = max(0.0f, (computedDistance - _Fog_StartDistance) * _Fog_Density); 121 | fog = saturate(fog); 122 | 123 | #ifdef DO_HEIGHT_FOG 124 | float fog_height = max(0.0f, (computedDistance - _Fog_Height_StartDistance) * _Fog_Height_Density); 125 | fog_height = lerp(fog_height, 0.0f, (worldPos.y * _Fog_Height_Falloff) - _Fog_Height); 126 | fog_height = saturate(fog_height); 127 | fog = saturate(fog + fog_height); 128 | #endif 129 | 130 | #ifdef OCCLUDE_SKY 131 | #else 132 | if (depth == 1.0f) 133 | fog = 0.0f; 134 | #endif 135 | 136 | #ifdef USE_CONSTANT_MIP 137 | float mipDistance = _Fog_Cubemap_Mip_MinLevel; 138 | #else 139 | float mipDistance = 1 - max(0.0f, (computedDistance - _Fog_Cubemap_Mip_Distance) * _Fog_Cubemap_Mip_Multiplier); 140 | mipDistance = saturate(mipDistance) * _Fog_Cubemap_Mip_MinLevel; 141 | #endif 142 | float4 cubemap = texCUBElod(_Fog_Cubemap, float4(-cameraWorldDir.xyz, mipDistance)) * _Fog_Cubemap_Exposure; 143 | 144 | float4 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, uv); 145 | fog = lerp(fog, 0.0f, 1 - _Intensity); 146 | color.rgb = lerp(color.rgb, cubemap.rgb, fog); 147 | 148 | if (DebugModes.x > 0) //view classic fog 149 | return float4(fog, fog, fog, 1.0); 150 | else if (DebugModes.z > 0) //view mip level distance 151 | return float4(mipDistance, mipDistance, mipDistance, mipDistance); 152 | else if (DebugModes.w > 0) //view cubemap only 153 | return cubemap; 154 | 155 | return color; 156 | } 157 | 158 | ENDHLSL 159 | } 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/PostProcess/CubemapFog.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b42633cf931535741af9240eb1f72b51 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a49548651f5aade489e1b34925f66b7e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject/CubemapFog.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &804328937833662 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 1031549426639055313} 12 | - component: {fileID: 7051636600332115985} 13 | - component: {fileID: 9173119406207767526} 14 | m_Layer: 0 15 | m_Name: CubemapFog 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!4 &1031549426639055313 22 | Transform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 804328937833662} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 500, y: 0, z: 500} 30 | m_LocalScale: {x: 2500, y: 2500, z: 2500} 31 | m_Children: [] 32 | m_Father: {fileID: 0} 33 | m_RootOrder: 0 34 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 35 | --- !u!33 &7051636600332115985 36 | MeshFilter: 37 | m_ObjectHideFlags: 0 38 | m_CorrespondingSourceObject: {fileID: 0} 39 | m_PrefabInstance: {fileID: 0} 40 | m_PrefabAsset: {fileID: 0} 41 | m_GameObject: {fileID: 804328937833662} 42 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 43 | --- !u!23 &9173119406207767526 44 | MeshRenderer: 45 | m_ObjectHideFlags: 0 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInstance: {fileID: 0} 48 | m_PrefabAsset: {fileID: 0} 49 | m_GameObject: {fileID: 804328937833662} 50 | m_Enabled: 1 51 | m_CastShadows: 0 52 | m_ReceiveShadows: 0 53 | m_DynamicOccludee: 0 54 | m_MotionVectors: 2 55 | m_LightProbeUsage: 0 56 | m_ReflectionProbeUsage: 0 57 | m_RayTracingMode: 2 58 | m_RayTraceProcedural: 0 59 | m_RenderingLayerMask: 1 60 | m_RendererPriority: 0 61 | m_Materials: 62 | - {fileID: 2100000, guid: 4e36b7260e9b5b64785718194174fe48, type: 2} 63 | m_StaticBatchInfo: 64 | firstSubMesh: 0 65 | subMeshCount: 0 66 | m_StaticBatchRoot: {fileID: 0} 67 | m_ProbeAnchor: {fileID: 0} 68 | m_LightProbeVolumeOverride: {fileID: 0} 69 | m_ScaleInLightmap: 1 70 | m_ReceiveGI: 1 71 | m_PreserveUVs: 0 72 | m_IgnoreNormalsForChartDetection: 0 73 | m_ImportantGI: 0 74 | m_StitchLightmapSeams: 1 75 | m_SelectedEditorRenderState: 3 76 | m_MinimumChartSize: 4 77 | m_AutoUVMaxDistance: 0.5 78 | m_AutoUVMaxAngle: 89 79 | m_LightmapParameters: {fileID: 0} 80 | m_SortingLayerID: 0 81 | m_SortingLayer: 0 82 | m_SortingOrder: 0 83 | m_AdditionalVertexStreams: {fileID: 0} 84 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject/CubemapFog.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8f25e4097aa2eed47aa7213dca41ddd7 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject/SceneCubemapFog.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: SceneCubemapFog 11 | m_Shader: {fileID: 4800000, guid: 54eceac8c5670054b883ffe0676eb87d, type: 3} 12 | m_ShaderKeywords: DO_HEIGHT_FOG OCCLUDE_SKY USE_CONSTANT_MIP UseConstantMip _FOG_CUBEMAP_USECONSTANTMIP_ON 13 | _OCCLUDE_SKY 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _Cubemap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailAlbedoMap: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailMask: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _DetailNormalMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _EmissionMap: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _Fog_Cubemap: 48 | m_Texture: {fileID: 8900000, guid: cc98c81feaae9094b9de26229de2389d, type: 3} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _JitterTexture: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _MainTex: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _MetallicGlossMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _OcclusionMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | - _ParallaxMap: 68 | m_Texture: {fileID: 0} 69 | m_Scale: {x: 1, y: 1} 70 | m_Offset: {x: 0, y: 0} 71 | - _VolumeTexture: 72 | m_Texture: {fileID: 0} 73 | m_Scale: {x: 1, y: 1} 74 | m_Offset: {x: 0, y: 0} 75 | m_Floats: 76 | - _BumpScale: 1 77 | - _Cutoff: 0.5 78 | - _DetailNormalMapScale: 1 79 | - _DstBlend: 0 80 | - _Fog_Cubemap_Exposure: 1 81 | - _Fog_Cubemap_Mip_Distance: 11.61 82 | - _Fog_Cubemap_Mip_MinLevel: 4.31 83 | - _Fog_Cubemap_Mip_Multiplier: 0.22 84 | - _Fog_Cubemap_UseConstantMip: 1 85 | - _Fog_Density: 0.09 86 | - _Fog_DoHeightFog: 1 87 | - _Fog_Height: 2.24 88 | - _Fog_Height_Density: 0.05 89 | - _Fog_Height_Falloff: 0.14 90 | - _Fog_Height_StartDistance: -1.65 91 | - _Fog_OccludeSky: 1 92 | - _Fog_StartDistance: 2.94 93 | - _GlossMapScale: 1 94 | - _Glossiness: 0.5 95 | - _GlossyReflections: 1 96 | - _Metallic: 0 97 | - _Mode: 0 98 | - _OcclusionStrength: 1 99 | - _Parallax: 0.02 100 | - _RaymarchJitterStrength: 2 101 | - _RaymarchStepSize: 25 102 | - _SmoothnessTextureChannel: 0 103 | - _SpecularHighlights: 1 104 | - _SrcBlend: 1 105 | - _UVSec: 0 106 | - _VolumeDensity: 1 107 | - _ZWrite: 1 108 | m_Colors: 109 | - _Color: {r: 1, g: 1, b: 1, a: 1} 110 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 111 | - _VolumePos: {r: 0, g: 0, b: 0, a: 0} 112 | - _VolumeSize: {r: 0, g: 0, b: 0, a: 0} 113 | m_BuildTextureStacks: [] 114 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject/SceneCubemapFog.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e36b7260e9b5b64785718194174fe48 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject/SceneCubemapFog.shader: -------------------------------------------------------------------------------- 1 | Shader "SceneVolumetricFog" 2 | { 3 | Properties 4 | { 5 | [Header(Cubemap)] 6 | _Fog_Cubemap("Cubemap", Cube) = "white" {} 7 | _Fog_Cubemap_Exposure("Exposure", Float) = 1 8 | 9 | [Header(Mip Mapping)] 10 | [Toggle(USE_CONSTANT_MIP)] _Fog_Cubemap_UseConstantMip("Use Constant Mip", Float) = 1 11 | _Fog_Cubemap_Mip_MinLevel("Mip Level", Float) = 1 12 | _Fog_Cubemap_Mip_Distance("Mip Distance", Float) = 1 13 | _Fog_Cubemap_Mip_Multiplier("Mip Density Multiplier", Float) = 1 14 | 15 | [Header(Fog Main)] 16 | [Toggle(OCCLUDE_SKY)] _Fog_OccludeSky("Occlude Sky", Float) = 1 17 | _Fog_StartDistance("Start Distance", Float) = 1 18 | _Fog_Density("Density", Float) = 1 19 | 20 | [Header(Fog Height)] 21 | [Toggle(DO_HEIGHT_FOG)] _Fog_DoHeightFog("Enable Height Fog", Float) = 1 22 | _Fog_Height_StartDistance("Height Distance", Float) = 1 23 | _Fog_Height_Density("Height Density", Float) = 1 24 | _Fog_Height("Height", Float) = 1 25 | _Fog_Height_Falloff("Height Falloff", Float) = 1 26 | } 27 | 28 | SubShader 29 | { 30 | Tags { "RenderType" = "Transparent" "Queue" = "Transparent+2000" } 31 | 32 | Cull Off ZWrite Off ZTest Off 33 | Blend SrcAlpha OneMinusSrcAlpha 34 | 35 | Pass 36 | { 37 | CGPROGRAM 38 | #pragma vertex vert 39 | #pragma fragment frag 40 | #pragma multi_compile_instancing 41 | #pragma shader_feature_local OCCLUDE_SKY 42 | #pragma shader_feature_local USE_CONSTANT_MIP 43 | #pragma shader_feature_local DO_HEIGHT_FOG 44 | #pragma fragmentoption ARB_precision_hint_fastest 45 | #include "UnityCG.cginc" 46 | 47 | struct appdata 48 | { 49 | fixed4 vertex : POSITION; 50 | 51 | //Single Pass Instanced Support 52 | UNITY_VERTEX_INPUT_INSTANCE_ID 53 | }; 54 | 55 | struct v2f 56 | { 57 | fixed4 vertex : SV_POSITION; 58 | fixed4 screenPos : TEXCOORD0; 59 | fixed3 camRelativeWorldPos : TEXCOORD1; 60 | 61 | //Single Pass Instanced Support 62 | UNITY_VERTEX_OUTPUT_STEREO 63 | }; 64 | 65 | //cubemap properties 66 | samplerCUBE _Fog_Cubemap; 67 | fixed _Fog_Cubemap_Exposure; 68 | 69 | //mip mapping properties 70 | fixed _Fog_Cubemap_Mip_MinLevel; 71 | fixed _Fog_Cubemap_Mip_Distance; 72 | fixed _Fog_Cubemap_Mip_Multiplier; 73 | 74 | //fog properties 75 | fixed _Fog_StartDistance; 76 | fixed _Fog_Density; 77 | 78 | //height fog properties 79 | fixed _Fog_Height_StartDistance; 80 | fixed _Fog_Height_Density; 81 | fixed _Fog_Height; 82 | fixed _Fog_Height_Falloff; 83 | 84 | //sampler2D_float _CameraDepthTexture; 85 | UNITY_DECLARE_SCREENSPACE_TEXTURE(_CameraDepthTexture); 86 | fixed4 _CameraDepthTexture_TexelSize; 87 | 88 | v2f vert(appdata v) 89 | { 90 | v2f o; 91 | 92 | //Single Pass Instanced Support 93 | UNITY_SETUP_INSTANCE_ID(v); 94 | UNITY_INITIALIZE_OUTPUT(v2f, o); 95 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 96 | 97 | o.vertex = UnityObjectToClipPos(v.vertex); 98 | o.screenPos = UnityStereoTransformScreenSpaceTex(ComputeScreenPos(o.vertex)); 99 | o.camRelativeWorldPos = mul(unity_ObjectToWorld, fixed4(v.vertex.xyz, 1.0)).xyz - _WorldSpaceCameraPos; 100 | 101 | #if UNITY_UV_STARTS_AT_TOP 102 | if (_CameraDepthTexture_TexelSize.y < 0) 103 | o.screenPos.y = 1 - o.screenPos.y; 104 | #endif 105 | 106 | #if UNITY_SINGLE_PASS_STEREO 107 | // If Single-Pass Stereo mode is active, transform the 108 | // coordinates to get the correct output UV for the current eye. 109 | fixed4 scaleOffset = unity_StereoScaleOffset[unity_StereoEyeIndex]; 110 | o.screenPos = (o.screenPos - scaleOffset.zw) / scaleOffset.xy; 111 | #endif 112 | 113 | return o; 114 | } 115 | 116 | fixed ComputeDistance(fixed3 ray, fixed depth) 117 | { 118 | return length(ray * depth) - _ProjectionParams.y; 119 | } 120 | 121 | fixed4 frag(v2f i) : SV_Target 122 | { 123 | //Single Pass Instanced Support 124 | UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i); 125 | 126 | //get our screen uv coords 127 | fixed2 screenUV = i.screenPos.xy / i.screenPos.w; 128 | 129 | //draw our scene depth texture 130 | fixed depth = SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.screenPos)); 131 | fixed linearDepth = LinearEyeDepth(depth); //linearize it 132 | fixed linear01depth = Linear01Depth(depth * (depth < 1.0)); 133 | 134 | //calculate the world position view plane for the camera 135 | fixed3 cameraWorldPositionViewPlane = i.camRelativeWorldPos.xyz / dot(i.camRelativeWorldPos.xyz, unity_WorldToCamera._m20_m21_m22); 136 | 137 | //get the world position vector 138 | fixed3 worldPos = cameraWorldPositionViewPlane * linearDepth + _WorldSpaceCameraPos; 139 | fixed3 cameraWorldDir = _WorldSpaceCameraPos.xyz - worldPos.xyz; 140 | 141 | //compute a radial distance (instead of just modifying the regular scene depth buffer for fog since if the camera rotates ) 142 | fixed computedDistance = ComputeDistance(cameraWorldDir.rgb, linear01depth); 143 | 144 | //calculate the main fog 145 | fixed fog = max(0.0f, (computedDistance - _Fog_StartDistance) * _Fog_Density); 146 | fog = saturate(fog); //clamp it 147 | 148 | #ifdef DO_HEIGHT_FOG 149 | fixed fog_height = max(0.0f, (computedDistance - _Fog_Height_StartDistance) * _Fog_Height_Density); 150 | fog_height = lerp(fog_height, 0.0f, (worldPos.y * _Fog_Height_Falloff) - _Fog_Height); 151 | fog_height = saturate(fog_height); 152 | fog = saturate(fog + fog_height); 153 | #endif 154 | 155 | #ifdef OCCLUDE_SKY 156 | #else 157 | if (linearDepth > _ProjectionParams.z - 0.001) //if we don't want to occlude the sky, make sure that at the highest depth value (farthest from camera) we don't do any fog. 158 | fog = 0.0f; 159 | #endif 160 | 161 | #ifdef USE_CONSTANT_MIP 162 | //use a constant mip level 163 | fixed mipDistance = _Fog_Cubemap_Mip_MinLevel; 164 | #else 165 | //using a fog based mip plevel 166 | fixed mipDistance = 1 - max(0.0f, (computedDistance - _Fog_Cubemap_Mip_Distance) * _Fog_Cubemap_Mip_Multiplier); 167 | mipDistance = saturate(mipDistance) * _Fog_Cubemap_Mip_MinLevel; 168 | #endif 169 | fixed4 cubemap = texCUBElod(_Fog_Cubemap, fixed4(-cameraWorldDir.xyz, mipDistance)) * _Fog_Cubemap_Exposure; 170 | 171 | //return the final fog color 172 | return fixed4(cubemap.rgb, fog); 173 | } 174 | ENDCG 175 | } 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /CubemapFog/Assets/CubemapFog/SceneObject/SceneCubemapFog.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 54eceac8c5670054b883ffe0676eb87d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | nonModifiableTextures: [] 7 | preprocessorOverride: 0 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Material.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9b8c04612c14224392c876130eb51a2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Material/Sky.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Sky 11 | m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _SUNDISK_HIGH_QUALITY 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _AtmosphereThickness: 1.4 60 | - _BumpScale: 1 61 | - _Cutoff: 0.5 62 | - _DetailNormalMapScale: 1 63 | - _DstBlend: 0 64 | - _Exposure: 1 65 | - _GlossMapScale: 1 66 | - _Glossiness: 0.5 67 | - _GlossyReflections: 1 68 | - _Metallic: 0 69 | - _Mode: 0 70 | - _OcclusionStrength: 1 71 | - _Parallax: 0.02 72 | - _SmoothnessTextureChannel: 0 73 | - _SpecularHighlights: 1 74 | - _SrcBlend: 1 75 | - _SunDisk: 2 76 | - _SunSize: 0.04 77 | - _SunSizeConvergence: 4.1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 1, g: 1, b: 1, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | - _GroundColor: {r: 1, g: 1, b: 1, a: 1} 84 | - _SkyTint: {r: 0.28109807, g: 0.5019608, b: 0.39152944, a: 1} 85 | m_BuildTextureStacks: [] 86 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Material/Sky.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 538e99f3518d0744dad5831ae7864bfd 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/New Terrain.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/CubemapFog/Assets/New Terrain.asset -------------------------------------------------------------------------------- /CubemapFog/Assets/New Terrain.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 119cc3bd73873d44b8d119ad70cec5ba 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 15600000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acb16fb0cd419fc40846659aa1d1bc6b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/CubemapFog_CUBE.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/CubemapFog/Assets/Scenes/CubemapFog_CUBE.exr -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/CubemapFog_CUBE.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc98c81feaae9094b9de26229de2389d 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0 16 | mipMapFadeDistanceStart: 0 17 | mipMapFadeDistanceEnd: 0 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 5 29 | cubemapConvolution: 1 30 | seamlessCubemap: 1 31 | textureFormat: 0 32 | maxTextureSize: 0 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 2 36 | aniso: 0 37 | mipBias: 0 38 | wrapU: 0 39 | wrapV: 0 40 | wrapW: 0 41 | nPOTScale: 0 42 | lightmap: 0 43 | compressionQuality: 0 44 | spriteMode: 0 45 | spriteExtrude: 0 46 | spriteMeshType: 0 47 | alignment: 0 48 | spritePivot: {x: 0, y: 0} 49 | spritePixelsToUnits: 0 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 0 52 | alphaUsage: 0 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: 0 55 | textureType: 0 56 | textureShape: 2 57 | singleChannelComponent: 0 58 | flipbookRows: 0 59 | flipbookColumns: 0 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene.lighting: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!850595691 &4890085278179872738 4 | LightingSettings: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_Name: SampleScene 10 | serializedVersion: 3 11 | m_GIWorkflowMode: 1 12 | m_EnableBakedLightmaps: 1 13 | m_EnableRealtimeLightmaps: 0 14 | m_RealtimeEnvironmentLighting: 1 15 | m_BounceScale: 1 16 | m_AlbedoBoost: 1 17 | m_IndirectOutputScale: 1 18 | m_UsingShadowmask: 0 19 | m_BakeBackend: 2 20 | m_LightmapMaxSize: 1024 21 | m_BakeResolution: 40 22 | m_Padding: 2 23 | m_TextureCompression: 1 24 | m_AO: 1 25 | m_AOMaxDistance: 1 26 | m_CompAOExponent: 1 27 | m_CompAOExponentDirect: 0 28 | m_ExtractAO: 0 29 | m_MixedBakeMode: 1 30 | m_LightmapsBakeMode: 1 31 | m_FilterMode: 1 32 | m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} 33 | m_ExportTrainingData: 0 34 | m_TrainingDataDestination: TrainingData 35 | m_RealtimeResolution: 2 36 | m_ForceWhiteAlbedo: 0 37 | m_ForceUpdates: 0 38 | m_FinalGather: 0 39 | m_FinalGatherRayCount: 256 40 | m_FinalGatherFiltering: 1 41 | m_PVRCulling: 0 42 | m_PVRSampling: 1 43 | m_PVRDirectSampleCount: 32 44 | m_PVRSampleCount: 128 45 | m_PVREnvironmentSampleCount: 128 46 | m_PVREnvironmentReferencePointCount: 2048 47 | m_LightProbeSampleCountMultiplier: 4 48 | m_PVRBounces: 4 49 | m_PVRMinBounces: 2 50 | m_PVREnvironmentMIS: 1 51 | m_PVRFilteringMode: 2 52 | m_PVRDenoiserTypeDirect: 2 53 | m_PVRDenoiserTypeIndirect: 2 54 | m_PVRDenoiserTypeAO: 2 55 | m_PVRFilterTypeDirect: 0 56 | m_PVRFilterTypeIndirect: 0 57 | m_PVRFilterTypeAO: 0 58 | m_PVRFilteringGaussRadiusDirect: 1 59 | m_PVRFilteringGaussRadiusIndirect: 5 60 | m_PVRFilteringGaussRadiusAO: 2 61 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 62 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 63 | m_PVRFilteringAtrousPositionSigmaAO: 1 64 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene.lighting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b86b4269f13d6784d9c27858ddef94f3 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 4890085278179872738 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df2f742c7f11d9b4da8381c952a0c7a6 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.801, g: 0.5984052, b: 0.46693364, a: 1} 19 | m_FogMode: 1 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 80 22 | m_LinearFogEnd: 296.33 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 2100000, guid: 538e99f3518d0744dad5831ae7864bfd, type: 2} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 705507994} 41 | m_IndirectSpecularColor: {r: 0.42375666, g: 0.31726855, b: 0.23191439, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 1 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 112000000, guid: ee040b0b203defb48af8526d6b5dfbea, type: 2} 101 | m_LightingSettings: {fileID: 4890085278179872738, guid: b86b4269f13d6784d9c27858ddef94f3, type: 2} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!1 &364402930 127 | GameObject: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | serializedVersion: 6 133 | m_Component: 134 | - component: {fileID: 364402933} 135 | - component: {fileID: 364402932} 136 | - component: {fileID: 364402931} 137 | m_Layer: 0 138 | m_Name: Terrain 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 4294967295 143 | m_IsActive: 1 144 | --- !u!154 &364402931 145 | TerrainCollider: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 364402930} 151 | m_Material: {fileID: 0} 152 | m_Enabled: 1 153 | m_TerrainData: {fileID: 15600000, guid: 119cc3bd73873d44b8d119ad70cec5ba, type: 2} 154 | m_EnableTreeColliders: 1 155 | --- !u!218 &364402932 156 | Terrain: 157 | m_ObjectHideFlags: 0 158 | m_CorrespondingSourceObject: {fileID: 0} 159 | m_PrefabInstance: {fileID: 0} 160 | m_PrefabAsset: {fileID: 0} 161 | m_GameObject: {fileID: 364402930} 162 | m_Enabled: 1 163 | serializedVersion: 6 164 | m_TerrainData: {fileID: 15600000, guid: 119cc3bd73873d44b8d119ad70cec5ba, type: 2} 165 | m_TreeDistance: 5000 166 | m_TreeBillboardDistance: 50 167 | m_TreeCrossFadeLength: 5 168 | m_TreeMaximumFullLODCount: 50 169 | m_DetailObjectDistance: 80 170 | m_DetailObjectDensity: 1 171 | m_HeightmapPixelError: 1 172 | m_SplatMapDistance: 1000 173 | m_HeightmapMaximumLOD: 0 174 | m_ShadowCastingMode: 2 175 | m_DrawHeightmap: 1 176 | m_DrawInstanced: 0 177 | m_DrawTreesAndFoliage: 1 178 | m_ReflectionProbeUsage: 1 179 | m_MaterialTemplate: {fileID: 10652, guid: 0000000000000000f000000000000000, type: 0} 180 | m_BakeLightProbesForTrees: 1 181 | m_PreserveTreePrototypeLayers: 0 182 | m_DeringLightProbesForTrees: 1 183 | m_ScaleInLightmap: 0.0256 184 | m_LightmapParameters: {fileID: 15203, guid: 0000000000000000f000000000000000, type: 0} 185 | m_GroupingID: 0 186 | m_RenderingLayerMask: 1 187 | m_AllowAutoConnect: 1 188 | --- !u!4 &364402933 189 | Transform: 190 | m_ObjectHideFlags: 0 191 | m_CorrespondingSourceObject: {fileID: 0} 192 | m_PrefabInstance: {fileID: 0} 193 | m_PrefabAsset: {fileID: 0} 194 | m_GameObject: {fileID: 364402930} 195 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 196 | m_LocalPosition: {x: 0, y: 0, z: 0} 197 | m_LocalScale: {x: 1, y: 1, z: 1} 198 | m_Children: [] 199 | m_Father: {fileID: 0} 200 | m_RootOrder: 3 201 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 202 | --- !u!1 &625741560 203 | GameObject: 204 | m_ObjectHideFlags: 0 205 | m_CorrespondingSourceObject: {fileID: 0} 206 | m_PrefabInstance: {fileID: 0} 207 | m_PrefabAsset: {fileID: 0} 208 | serializedVersion: 6 209 | m_Component: 210 | - component: {fileID: 625741562} 211 | - component: {fileID: 625741561} 212 | m_Layer: 3 213 | m_Name: Post-process Volume 214 | m_TagString: Untagged 215 | m_Icon: {fileID: 0} 216 | m_NavMeshLayer: 0 217 | m_StaticEditorFlags: 0 218 | m_IsActive: 1 219 | --- !u!114 &625741561 220 | MonoBehaviour: 221 | m_ObjectHideFlags: 0 222 | m_CorrespondingSourceObject: {fileID: 0} 223 | m_PrefabInstance: {fileID: 0} 224 | m_PrefabAsset: {fileID: 0} 225 | m_GameObject: {fileID: 625741560} 226 | m_Enabled: 1 227 | m_EditorHideFlags: 0 228 | m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} 229 | m_Name: 230 | m_EditorClassIdentifier: 231 | sharedProfile: {fileID: 11400000, guid: f5b32d49df2a94b47aa520a72c733649, type: 2} 232 | isGlobal: 1 233 | blendDistance: 0 234 | weight: 1 235 | priority: 0 236 | --- !u!4 &625741562 237 | Transform: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | m_GameObject: {fileID: 625741560} 243 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 244 | m_LocalPosition: {x: 0, y: 0, z: 0} 245 | m_LocalScale: {x: 1, y: 1, z: 1} 246 | m_Children: [] 247 | m_Father: {fileID: 0} 248 | m_RootOrder: 2 249 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 250 | --- !u!1 &705507993 251 | GameObject: 252 | m_ObjectHideFlags: 0 253 | m_CorrespondingSourceObject: {fileID: 0} 254 | m_PrefabInstance: {fileID: 0} 255 | m_PrefabAsset: {fileID: 0} 256 | serializedVersion: 6 257 | m_Component: 258 | - component: {fileID: 705507995} 259 | - component: {fileID: 705507994} 260 | m_Layer: 0 261 | m_Name: Directional Light 262 | m_TagString: Untagged 263 | m_Icon: {fileID: 0} 264 | m_NavMeshLayer: 0 265 | m_StaticEditorFlags: 0 266 | m_IsActive: 1 267 | --- !u!108 &705507994 268 | Light: 269 | m_ObjectHideFlags: 0 270 | m_CorrespondingSourceObject: {fileID: 0} 271 | m_PrefabInstance: {fileID: 0} 272 | m_PrefabAsset: {fileID: 0} 273 | m_GameObject: {fileID: 705507993} 274 | m_Enabled: 1 275 | serializedVersion: 10 276 | m_Type: 1 277 | m_Shape: 0 278 | m_Color: {r: 1, g: 0.74425733, b: 0.48900002, a: 1} 279 | m_Intensity: 2.5 280 | m_Range: 10 281 | m_SpotAngle: 30 282 | m_InnerSpotAngle: 21.80208 283 | m_CookieSize: 10 284 | m_Shadows: 285 | m_Type: 2 286 | m_Resolution: -1 287 | m_CustomResolution: -1 288 | m_Strength: 1 289 | m_Bias: 0.05 290 | m_NormalBias: 0.4 291 | m_NearPlane: 0.2 292 | m_CullingMatrixOverride: 293 | e00: 1 294 | e01: 0 295 | e02: 0 296 | e03: 0 297 | e10: 0 298 | e11: 1 299 | e12: 0 300 | e13: 0 301 | e20: 0 302 | e21: 0 303 | e22: 1 304 | e23: 0 305 | e30: 0 306 | e31: 0 307 | e32: 0 308 | e33: 1 309 | m_UseCullingMatrixOverride: 0 310 | m_Cookie: {fileID: 0} 311 | m_DrawHalo: 0 312 | m_Flare: {fileID: 0} 313 | m_RenderMode: 0 314 | m_CullingMask: 315 | serializedVersion: 2 316 | m_Bits: 4294967295 317 | m_RenderingLayerMask: 1 318 | m_Lightmapping: 1 319 | m_LightShadowCasterMode: 0 320 | m_AreaSize: {x: 1, y: 1} 321 | m_BounceIntensity: 2 322 | m_ColorTemperature: 6570 323 | m_UseColorTemperature: 0 324 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 325 | m_UseBoundingSphereOverride: 0 326 | m_UseViewFrustumForShadowCasterCull: 1 327 | m_ShadowRadius: 0 328 | m_ShadowAngle: 0 329 | --- !u!4 &705507995 330 | Transform: 331 | m_ObjectHideFlags: 0 332 | m_CorrespondingSourceObject: {fileID: 0} 333 | m_PrefabInstance: {fileID: 0} 334 | m_PrefabAsset: {fileID: 0} 335 | m_GameObject: {fileID: 705507993} 336 | m_LocalRotation: {x: -0.06089881, y: 0.24313404, z: -0.015296706, w: -0.9679583} 337 | m_LocalPosition: {x: 484.4784, y: 59.849857, z: 666.83057} 338 | m_LocalScale: {x: 1, y: 1, z: 1} 339 | m_Children: [] 340 | m_Father: {fileID: 0} 341 | m_RootOrder: 1 342 | m_LocalEulerAnglesHint: {x: 7.2, y: -388.2, z: 0} 343 | --- !u!1 &963194225 344 | GameObject: 345 | m_ObjectHideFlags: 0 346 | m_CorrespondingSourceObject: {fileID: 0} 347 | m_PrefabInstance: {fileID: 0} 348 | m_PrefabAsset: {fileID: 0} 349 | serializedVersion: 6 350 | m_Component: 351 | - component: {fileID: 963194228} 352 | - component: {fileID: 963194227} 353 | - component: {fileID: 963194226} 354 | m_Layer: 0 355 | m_Name: Main Camera 356 | m_TagString: MainCamera 357 | m_Icon: {fileID: 0} 358 | m_NavMeshLayer: 0 359 | m_StaticEditorFlags: 0 360 | m_IsActive: 1 361 | --- !u!114 &963194226 362 | MonoBehaviour: 363 | m_ObjectHideFlags: 0 364 | m_CorrespondingSourceObject: {fileID: 0} 365 | m_PrefabInstance: {fileID: 0} 366 | m_PrefabAsset: {fileID: 0} 367 | m_GameObject: {fileID: 963194225} 368 | m_Enabled: 1 369 | m_EditorHideFlags: 0 370 | m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3} 371 | m_Name: 372 | m_EditorClassIdentifier: 373 | volumeTrigger: {fileID: 963194228} 374 | volumeLayer: 375 | serializedVersion: 2 376 | m_Bits: 8 377 | stopNaNPropagation: 1 378 | finalBlitToCameraTarget: 0 379 | antialiasingMode: 0 380 | temporalAntialiasing: 381 | jitterSpread: 0.75 382 | sharpness: 0.25 383 | stationaryBlending: 0.95 384 | motionBlending: 0.85 385 | subpixelMorphologicalAntialiasing: 386 | quality: 2 387 | fastApproximateAntialiasing: 388 | fastMode: 0 389 | keepAlpha: 0 390 | fog: 391 | enabled: 1 392 | excludeSkybox: 1 393 | debugLayer: 394 | lightMeter: 395 | width: 512 396 | height: 256 397 | showCurves: 1 398 | histogram: 399 | width: 512 400 | height: 256 401 | channel: 3 402 | waveform: 403 | exposure: 0.12 404 | height: 256 405 | vectorscope: 406 | size: 256 407 | exposure: 0.12 408 | overlaySettings: 409 | linearDepth: 0 410 | motionColorIntensity: 4 411 | motionGridSize: 64 412 | colorBlindnessType: 0 413 | colorBlindnessStrength: 1 414 | m_Resources: {fileID: 11400000, guid: d82512f9c8e5d4a4d938b575d47f88d4, type: 2} 415 | m_ShowToolkit: 0 416 | m_ShowCustomSorter: 0 417 | breakBeforeColorGrading: 0 418 | m_BeforeTransparentBundles: 419 | - assemblyQualifiedName: CubemapFog.CubemapFog, Assembly-CSharp, Version=0.0.0.0, 420 | Culture=neutral, PublicKeyToken=null 421 | m_BeforeStackBundles: [] 422 | m_AfterStackBundles: [] 423 | --- !u!20 &963194227 424 | Camera: 425 | m_ObjectHideFlags: 0 426 | m_CorrespondingSourceObject: {fileID: 0} 427 | m_PrefabInstance: {fileID: 0} 428 | m_PrefabAsset: {fileID: 0} 429 | m_GameObject: {fileID: 963194225} 430 | m_Enabled: 1 431 | serializedVersion: 2 432 | m_ClearFlags: 1 433 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 434 | m_projectionMatrixMode: 1 435 | m_GateFitMode: 2 436 | m_FOVAxisMode: 0 437 | m_SensorSize: {x: 36, y: 24} 438 | m_LensShift: {x: 0, y: 0} 439 | m_FocalLength: 50 440 | m_NormalizedViewPortRect: 441 | serializedVersion: 2 442 | x: 0 443 | y: 0 444 | width: 1 445 | height: 1 446 | near clip plane: 0.3 447 | far clip plane: 10000 448 | field of view: 60.8 449 | orthographic: 0 450 | orthographic size: 5 451 | m_Depth: -1 452 | m_CullingMask: 453 | serializedVersion: 2 454 | m_Bits: 4294967295 455 | m_RenderingPath: 3 456 | m_TargetTexture: {fileID: 0} 457 | m_TargetDisplay: 0 458 | m_TargetEye: 3 459 | m_HDR: 1 460 | m_AllowMSAA: 1 461 | m_AllowDynamicResolution: 0 462 | m_ForceIntoRT: 0 463 | m_OcclusionCulling: 1 464 | m_StereoConvergence: 10 465 | m_StereoSeparation: 0.022 466 | --- !u!4 &963194228 467 | Transform: 468 | m_ObjectHideFlags: 0 469 | m_CorrespondingSourceObject: {fileID: 0} 470 | m_PrefabInstance: {fileID: 0} 471 | m_PrefabAsset: {fileID: 0} 472 | m_GameObject: {fileID: 963194225} 473 | m_LocalRotation: {x: 0.01858384, y: -0.9740324, z: 0.086930074, w: 0.20822784} 474 | m_LocalPosition: {x: 484.4784, y: 50.09, z: 666.83057} 475 | m_LocalScale: {x: 1, y: 1, z: 1} 476 | m_Children: [] 477 | m_Father: {fileID: 0} 478 | m_RootOrder: 0 479 | m_LocalEulerAnglesHint: {x: 10.2, y: -155.866, z: 0} 480 | --- !u!1001 &5985823479741903123 481 | PrefabInstance: 482 | m_ObjectHideFlags: 0 483 | serializedVersion: 2 484 | m_Modification: 485 | m_TransformParent: {fileID: 0} 486 | m_Modifications: 487 | - target: {fileID: 804328937833662, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 488 | propertyPath: m_Name 489 | value: CubemapFog 490 | objectReference: {fileID: 0} 491 | - target: {fileID: 804328937833662, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 492 | propertyPath: m_IsActive 493 | value: 0 494 | objectReference: {fileID: 0} 495 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 496 | propertyPath: m_RootOrder 497 | value: 4 498 | objectReference: {fileID: 0} 499 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 500 | propertyPath: m_LocalPosition.x 501 | value: 500 502 | objectReference: {fileID: 0} 503 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 504 | propertyPath: m_LocalPosition.y 505 | value: 0 506 | objectReference: {fileID: 0} 507 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 508 | propertyPath: m_LocalPosition.z 509 | value: 500 510 | objectReference: {fileID: 0} 511 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 512 | propertyPath: m_LocalRotation.w 513 | value: 1 514 | objectReference: {fileID: 0} 515 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 516 | propertyPath: m_LocalRotation.x 517 | value: 0 518 | objectReference: {fileID: 0} 519 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 520 | propertyPath: m_LocalRotation.y 521 | value: 0 522 | objectReference: {fileID: 0} 523 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 524 | propertyPath: m_LocalRotation.z 525 | value: 0 526 | objectReference: {fileID: 0} 527 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 528 | propertyPath: m_LocalEulerAnglesHint.x 529 | value: 0 530 | objectReference: {fileID: 0} 531 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 532 | propertyPath: m_LocalEulerAnglesHint.y 533 | value: 0 534 | objectReference: {fileID: 0} 535 | - target: {fileID: 1031549426639055313, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 536 | propertyPath: m_LocalEulerAnglesHint.z 537 | value: 0 538 | objectReference: {fileID: 0} 539 | m_RemovedComponents: [] 540 | m_SourcePrefab: {fileID: 100100000, guid: 8f25e4097aa2eed47aa7213dca41ddd7, type: 3} 541 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/LightingData.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/CubemapFog/Assets/Scenes/SampleScene/LightingData.asset -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/LightingData.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee040b0b203defb48af8526d6b5dfbea 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 112000000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/Lightmap-0_comp_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/CubemapFog/Assets/Scenes/SampleScene/Lightmap-0_comp_dir.png -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/Lightmap-0_comp_dir.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a3e71cdb0f96014d9288847d109b407 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 0 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 1 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 3 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 12 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 2 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/Lightmap-0_comp_light.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/CubemapFog/Assets/Scenes/SampleScene/Lightmap-0_comp_light.exr -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/Lightmap-0_comp_light.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d69c22fdeddfdde459694f820cd32389 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 1 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 0 30 | seamlessCubemap: 0 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 1 36 | aniso: 3 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 0 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 6 56 | textureShape: 1 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 2 72 | compressionQuality: 50 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/ReflectionProbe-0.exr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/CubemapFog/Assets/Scenes/SampleScene/ReflectionProbe-0.exr -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene/ReflectionProbe-0.exr.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b047d2d5d85abc44b83fc4e63ee4e387 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | vTOnly: 0 27 | grayScaleToAlpha: 0 28 | generateCubemap: 6 29 | cubemapConvolution: 1 30 | seamlessCubemap: 1 31 | textureFormat: 1 32 | maxTextureSize: 2048 33 | textureSettings: 34 | serializedVersion: 2 35 | filterMode: 2 36 | aniso: 0 37 | mipBias: 0 38 | wrapU: 1 39 | wrapV: 1 40 | wrapW: 1 41 | nPOTScale: 1 42 | lightmap: 0 43 | compressionQuality: 50 44 | spriteMode: 0 45 | spriteExtrude: 1 46 | spriteMeshType: 1 47 | alignment: 0 48 | spritePivot: {x: 0.5, y: 0.5} 49 | spritePixelsToUnits: 100 50 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 51 | spriteGenerateFallbackPhysicsShape: 1 52 | alphaUsage: 1 53 | alphaIsTransparency: 0 54 | spriteTessellationDetail: -1 55 | textureType: 0 56 | textureShape: 2 57 | singleChannelComponent: 0 58 | flipbookRows: 1 59 | flipbookColumns: 1 60 | maxTextureSizeSet: 0 61 | compressionQualitySet: 0 62 | textureFormatSet: 0 63 | ignorePngGamma: 0 64 | applyGammaDecoding: 0 65 | platformSettings: 66 | - serializedVersion: 3 67 | buildTarget: DefaultTexturePlatform 68 | maxTextureSize: 2048 69 | resizeAlgorithm: 0 70 | textureFormat: -1 71 | textureCompression: 1 72 | compressionQuality: 100 73 | crunchedCompression: 0 74 | allowsAlphaSplitting: 0 75 | overridden: 0 76 | androidETC2FallbackOverride: 0 77 | forceMaximumCompressionQuality_BC6H_BC7: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | bones: [] 84 | spriteID: 85 | internalID: 0 86 | vertices: [] 87 | indices: 88 | edges: [] 89 | weights: [] 90 | secondaryTextures: [] 91 | spritePackingTag: 92 | pSDRemoveMatte: 0 93 | pSDShowRemoveMatteOption: 0 94 | userData: 95 | assetBundleName: 96 | assetBundleVariant: 97 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene_Profiles.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27305b6083f78ab408b10625f9a39433 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene_Profiles/Post-process Volume Profile.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 8e6292b2c06870d4495f009f912b9600, type: 3} 13 | m_Name: Post-process Volume Profile 14 | m_EditorClassIdentifier: 15 | settings: 16 | - {fileID: 8988526043191850240} 17 | --- !u!114 &8988526043191850240 18 | MonoBehaviour: 19 | m_ObjectHideFlags: 3 20 | m_CorrespondingSourceObject: {fileID: 0} 21 | m_PrefabInstance: {fileID: 0} 22 | m_PrefabAsset: {fileID: 0} 23 | m_GameObject: {fileID: 0} 24 | m_Enabled: 1 25 | m_EditorHideFlags: 0 26 | m_Script: {fileID: 11500000, guid: 3aba93752340b3945ba7b6571725359c, type: 3} 27 | m_Name: CubemapFog 28 | m_EditorClassIdentifier: 29 | active: 1 30 | enabled: 31 | overrideState: 1 32 | value: 1 33 | fogCubemap: 34 | overrideState: 1 35 | value: {fileID: 8900000, guid: cc98c81feaae9094b9de26229de2389d, type: 3} 36 | defaultState: 1 37 | fogCubemapExposure: 38 | overrideState: 1 39 | value: 1 40 | fogUseConstantMip: 41 | overrideState: 1 42 | value: 1 43 | fogCubemapMipLevel: 44 | overrideState: 1 45 | value: 5.09 46 | fogCubemapMipDistance: 47 | overrideState: 1 48 | value: 33.34 49 | fogCubemapMipMultiplier: 50 | overrideState: 1 51 | value: 0.12 52 | intensity: 53 | overrideState: 1 54 | value: 1 55 | fogOccludeSky: 56 | overrideState: 1 57 | value: 1 58 | fogStartDistance: 59 | overrideState: 1 60 | value: 129.63 61 | fogDensity: 62 | overrideState: 1 63 | value: 0.16 64 | heightEnable: 65 | overrideState: 1 66 | value: 1 67 | heightFogStartDistance: 68 | overrideState: 1 69 | value: 0 70 | heightFogDensity: 71 | overrideState: 1 72 | value: 0.01 73 | heightFogHeight: 74 | overrideState: 1 75 | value: 14.56 76 | heightFogFallof: 77 | overrideState: 0 78 | value: 1 79 | viewFog: 80 | overrideState: 0 81 | value: 0 82 | viewMipDistance: 83 | overrideState: 0 84 | value: 0 85 | viewCubemap: 86 | overrideState: 0 87 | value: 0 88 | -------------------------------------------------------------------------------- /CubemapFog/Assets/Scenes/SampleScene_Profiles/Post-process Volume Profile.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5b32d49df2a94b47aa520a72c733649 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CubemapFog/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": "1.15.17", 4 | "com.unity.ide.rider": "2.0.7", 5 | "com.unity.ide.visualstudio": "2.0.15", 6 | "com.unity.ide.vscode": "1.2.5", 7 | "com.unity.postprocessing": "3.2.2", 8 | "com.unity.test-framework": "1.1.31", 9 | "com.unity.textmeshpro": "3.0.6", 10 | "com.unity.timeline": "1.4.8", 11 | "com.unity.ugui": "1.0.0", 12 | "com.unity.modules.ai": "1.0.0", 13 | "com.unity.modules.androidjni": "1.0.0", 14 | "com.unity.modules.animation": "1.0.0", 15 | "com.unity.modules.assetbundle": "1.0.0", 16 | "com.unity.modules.audio": "1.0.0", 17 | "com.unity.modules.cloth": "1.0.0", 18 | "com.unity.modules.director": "1.0.0", 19 | "com.unity.modules.imageconversion": "1.0.0", 20 | "com.unity.modules.imgui": "1.0.0", 21 | "com.unity.modules.jsonserialize": "1.0.0", 22 | "com.unity.modules.particlesystem": "1.0.0", 23 | "com.unity.modules.physics": "1.0.0", 24 | "com.unity.modules.physics2d": "1.0.0", 25 | "com.unity.modules.screencapture": "1.0.0", 26 | "com.unity.modules.terrain": "1.0.0", 27 | "com.unity.modules.terrainphysics": "1.0.0", 28 | "com.unity.modules.tilemap": "1.0.0", 29 | "com.unity.modules.ui": "1.0.0", 30 | "com.unity.modules.uielements": "1.0.0", 31 | "com.unity.modules.umbra": "1.0.0", 32 | "com.unity.modules.unityanalytics": "1.0.0", 33 | "com.unity.modules.unitywebrequest": "1.0.0", 34 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 35 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 36 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 37 | "com.unity.modules.unitywebrequestwww": "1.0.0", 38 | "com.unity.modules.vehicles": "1.0.0", 39 | "com.unity.modules.video": "1.0.0", 40 | "com.unity.modules.vr": "1.0.0", 41 | "com.unity.modules.wind": "1.0.0", 42 | "com.unity.modules.xr": "1.0.0" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /CubemapFog/Packages/packages-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.collab-proxy": { 4 | "version": "1.15.17", 5 | "depth": 0, 6 | "source": "registry", 7 | "dependencies": { 8 | "com.unity.services.core": "1.0.1" 9 | }, 10 | "url": "https://packages.unity.com" 11 | }, 12 | "com.unity.ext.nunit": { 13 | "version": "1.0.6", 14 | "depth": 1, 15 | "source": "registry", 16 | "dependencies": {}, 17 | "url": "https://packages.unity.com" 18 | }, 19 | "com.unity.ide.rider": { 20 | "version": "2.0.7", 21 | "depth": 0, 22 | "source": "registry", 23 | "dependencies": { 24 | "com.unity.test-framework": "1.1.1" 25 | }, 26 | "url": "https://packages.unity.com" 27 | }, 28 | "com.unity.ide.visualstudio": { 29 | "version": "2.0.15", 30 | "depth": 0, 31 | "source": "registry", 32 | "dependencies": { 33 | "com.unity.test-framework": "1.1.9" 34 | }, 35 | "url": "https://packages.unity.com" 36 | }, 37 | "com.unity.ide.vscode": { 38 | "version": "1.2.5", 39 | "depth": 0, 40 | "source": "registry", 41 | "dependencies": {}, 42 | "url": "https://packages.unity.com" 43 | }, 44 | "com.unity.postprocessing": { 45 | "version": "3.2.2", 46 | "depth": 0, 47 | "source": "registry", 48 | "dependencies": { 49 | "com.unity.modules.physics": "1.0.0" 50 | }, 51 | "url": "https://packages.unity.com" 52 | }, 53 | "com.unity.services.core": { 54 | "version": "1.0.1", 55 | "depth": 1, 56 | "source": "registry", 57 | "dependencies": { 58 | "com.unity.modules.unitywebrequest": "1.0.0" 59 | }, 60 | "url": "https://packages.unity.com" 61 | }, 62 | "com.unity.test-framework": { 63 | "version": "1.1.31", 64 | "depth": 0, 65 | "source": "registry", 66 | "dependencies": { 67 | "com.unity.ext.nunit": "1.0.6", 68 | "com.unity.modules.imgui": "1.0.0", 69 | "com.unity.modules.jsonserialize": "1.0.0" 70 | }, 71 | "url": "https://packages.unity.com" 72 | }, 73 | "com.unity.textmeshpro": { 74 | "version": "3.0.6", 75 | "depth": 0, 76 | "source": "registry", 77 | "dependencies": { 78 | "com.unity.ugui": "1.0.0" 79 | }, 80 | "url": "https://packages.unity.com" 81 | }, 82 | "com.unity.timeline": { 83 | "version": "1.4.8", 84 | "depth": 0, 85 | "source": "registry", 86 | "dependencies": { 87 | "com.unity.modules.director": "1.0.0", 88 | "com.unity.modules.animation": "1.0.0", 89 | "com.unity.modules.audio": "1.0.0", 90 | "com.unity.modules.particlesystem": "1.0.0" 91 | }, 92 | "url": "https://packages.unity.com" 93 | }, 94 | "com.unity.ugui": { 95 | "version": "1.0.0", 96 | "depth": 0, 97 | "source": "builtin", 98 | "dependencies": { 99 | "com.unity.modules.ui": "1.0.0", 100 | "com.unity.modules.imgui": "1.0.0" 101 | } 102 | }, 103 | "com.unity.modules.ai": { 104 | "version": "1.0.0", 105 | "depth": 0, 106 | "source": "builtin", 107 | "dependencies": {} 108 | }, 109 | "com.unity.modules.androidjni": { 110 | "version": "1.0.0", 111 | "depth": 0, 112 | "source": "builtin", 113 | "dependencies": {} 114 | }, 115 | "com.unity.modules.animation": { 116 | "version": "1.0.0", 117 | "depth": 0, 118 | "source": "builtin", 119 | "dependencies": {} 120 | }, 121 | "com.unity.modules.assetbundle": { 122 | "version": "1.0.0", 123 | "depth": 0, 124 | "source": "builtin", 125 | "dependencies": {} 126 | }, 127 | "com.unity.modules.audio": { 128 | "version": "1.0.0", 129 | "depth": 0, 130 | "source": "builtin", 131 | "dependencies": {} 132 | }, 133 | "com.unity.modules.cloth": { 134 | "version": "1.0.0", 135 | "depth": 0, 136 | "source": "builtin", 137 | "dependencies": { 138 | "com.unity.modules.physics": "1.0.0" 139 | } 140 | }, 141 | "com.unity.modules.director": { 142 | "version": "1.0.0", 143 | "depth": 0, 144 | "source": "builtin", 145 | "dependencies": { 146 | "com.unity.modules.audio": "1.0.0", 147 | "com.unity.modules.animation": "1.0.0" 148 | } 149 | }, 150 | "com.unity.modules.imageconversion": { 151 | "version": "1.0.0", 152 | "depth": 0, 153 | "source": "builtin", 154 | "dependencies": {} 155 | }, 156 | "com.unity.modules.imgui": { 157 | "version": "1.0.0", 158 | "depth": 0, 159 | "source": "builtin", 160 | "dependencies": {} 161 | }, 162 | "com.unity.modules.jsonserialize": { 163 | "version": "1.0.0", 164 | "depth": 0, 165 | "source": "builtin", 166 | "dependencies": {} 167 | }, 168 | "com.unity.modules.particlesystem": { 169 | "version": "1.0.0", 170 | "depth": 0, 171 | "source": "builtin", 172 | "dependencies": {} 173 | }, 174 | "com.unity.modules.physics": { 175 | "version": "1.0.0", 176 | "depth": 0, 177 | "source": "builtin", 178 | "dependencies": {} 179 | }, 180 | "com.unity.modules.physics2d": { 181 | "version": "1.0.0", 182 | "depth": 0, 183 | "source": "builtin", 184 | "dependencies": {} 185 | }, 186 | "com.unity.modules.screencapture": { 187 | "version": "1.0.0", 188 | "depth": 0, 189 | "source": "builtin", 190 | "dependencies": { 191 | "com.unity.modules.imageconversion": "1.0.0" 192 | } 193 | }, 194 | "com.unity.modules.subsystems": { 195 | "version": "1.0.0", 196 | "depth": 1, 197 | "source": "builtin", 198 | "dependencies": { 199 | "com.unity.modules.jsonserialize": "1.0.0" 200 | } 201 | }, 202 | "com.unity.modules.terrain": { 203 | "version": "1.0.0", 204 | "depth": 0, 205 | "source": "builtin", 206 | "dependencies": {} 207 | }, 208 | "com.unity.modules.terrainphysics": { 209 | "version": "1.0.0", 210 | "depth": 0, 211 | "source": "builtin", 212 | "dependencies": { 213 | "com.unity.modules.physics": "1.0.0", 214 | "com.unity.modules.terrain": "1.0.0" 215 | } 216 | }, 217 | "com.unity.modules.tilemap": { 218 | "version": "1.0.0", 219 | "depth": 0, 220 | "source": "builtin", 221 | "dependencies": { 222 | "com.unity.modules.physics2d": "1.0.0" 223 | } 224 | }, 225 | "com.unity.modules.ui": { 226 | "version": "1.0.0", 227 | "depth": 0, 228 | "source": "builtin", 229 | "dependencies": {} 230 | }, 231 | "com.unity.modules.uielements": { 232 | "version": "1.0.0", 233 | "depth": 0, 234 | "source": "builtin", 235 | "dependencies": { 236 | "com.unity.modules.ui": "1.0.0", 237 | "com.unity.modules.imgui": "1.0.0", 238 | "com.unity.modules.jsonserialize": "1.0.0", 239 | "com.unity.modules.uielementsnative": "1.0.0" 240 | } 241 | }, 242 | "com.unity.modules.uielementsnative": { 243 | "version": "1.0.0", 244 | "depth": 1, 245 | "source": "builtin", 246 | "dependencies": { 247 | "com.unity.modules.ui": "1.0.0", 248 | "com.unity.modules.imgui": "1.0.0", 249 | "com.unity.modules.jsonserialize": "1.0.0" 250 | } 251 | }, 252 | "com.unity.modules.umbra": { 253 | "version": "1.0.0", 254 | "depth": 0, 255 | "source": "builtin", 256 | "dependencies": {} 257 | }, 258 | "com.unity.modules.unityanalytics": { 259 | "version": "1.0.0", 260 | "depth": 0, 261 | "source": "builtin", 262 | "dependencies": { 263 | "com.unity.modules.unitywebrequest": "1.0.0", 264 | "com.unity.modules.jsonserialize": "1.0.0" 265 | } 266 | }, 267 | "com.unity.modules.unitywebrequest": { 268 | "version": "1.0.0", 269 | "depth": 0, 270 | "source": "builtin", 271 | "dependencies": {} 272 | }, 273 | "com.unity.modules.unitywebrequestassetbundle": { 274 | "version": "1.0.0", 275 | "depth": 0, 276 | "source": "builtin", 277 | "dependencies": { 278 | "com.unity.modules.assetbundle": "1.0.0", 279 | "com.unity.modules.unitywebrequest": "1.0.0" 280 | } 281 | }, 282 | "com.unity.modules.unitywebrequestaudio": { 283 | "version": "1.0.0", 284 | "depth": 0, 285 | "source": "builtin", 286 | "dependencies": { 287 | "com.unity.modules.unitywebrequest": "1.0.0", 288 | "com.unity.modules.audio": "1.0.0" 289 | } 290 | }, 291 | "com.unity.modules.unitywebrequesttexture": { 292 | "version": "1.0.0", 293 | "depth": 0, 294 | "source": "builtin", 295 | "dependencies": { 296 | "com.unity.modules.unitywebrequest": "1.0.0", 297 | "com.unity.modules.imageconversion": "1.0.0" 298 | } 299 | }, 300 | "com.unity.modules.unitywebrequestwww": { 301 | "version": "1.0.0", 302 | "depth": 0, 303 | "source": "builtin", 304 | "dependencies": { 305 | "com.unity.modules.unitywebrequest": "1.0.0", 306 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 307 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 308 | "com.unity.modules.audio": "1.0.0", 309 | "com.unity.modules.assetbundle": "1.0.0", 310 | "com.unity.modules.imageconversion": "1.0.0" 311 | } 312 | }, 313 | "com.unity.modules.vehicles": { 314 | "version": "1.0.0", 315 | "depth": 0, 316 | "source": "builtin", 317 | "dependencies": { 318 | "com.unity.modules.physics": "1.0.0" 319 | } 320 | }, 321 | "com.unity.modules.video": { 322 | "version": "1.0.0", 323 | "depth": 0, 324 | "source": "builtin", 325 | "dependencies": { 326 | "com.unity.modules.audio": "1.0.0", 327 | "com.unity.modules.ui": "1.0.0", 328 | "com.unity.modules.unitywebrequest": "1.0.0" 329 | } 330 | }, 331 | "com.unity.modules.vr": { 332 | "version": "1.0.0", 333 | "depth": 0, 334 | "source": "builtin", 335 | "dependencies": { 336 | "com.unity.modules.jsonserialize": "1.0.0", 337 | "com.unity.modules.physics": "1.0.0", 338 | "com.unity.modules.xr": "1.0.0" 339 | } 340 | }, 341 | "com.unity.modules.wind": { 342 | "version": "1.0.0", 343 | "depth": 0, 344 | "source": "builtin", 345 | "dependencies": {} 346 | }, 347 | "com.unity.modules.xr": { 348 | "version": "1.0.0", 349 | "depth": 0, 350 | "source": "builtin", 351 | "dependencies": { 352 | "com.unity.modules.physics": "1.0.0", 353 | "com.unity.modules.jsonserialize": "1.0.0", 354 | "com.unity.modules.subsystems": "1.0.0" 355 | } 356 | } 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | m_LogWhenShaderIsCompiled: 0 63 | m_AllowEnlightenSupportForUpgradedProject: 0 64 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 22 7 | productGUID: 34451bd1852d32f478197b482094ca5b 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: My project 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_MTRendering: 1 52 | mipStripping: 1 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | androidResizableWindow: 0 72 | androidDefaultWindowWidth: 1920 73 | androidDefaultWindowHeight: 1080 74 | androidMinimumWindowWidth: 400 75 | androidMinimumWindowHeight: 300 76 | androidFullscreenMode: 1 77 | defaultIsNativeResolution: 1 78 | macRetinaSupport: 1 79 | runInBackground: 1 80 | captureSingleScreen: 0 81 | muteOtherAudioSources: 0 82 | Prepare IOS For Recording: 0 83 | Force IOS Speakers When Recording: 0 84 | deferSystemGesturesMode: 0 85 | hideHomeButton: 0 86 | submitAnalytics: 1 87 | usePlayerLog: 1 88 | bakeCollisionMeshes: 1 89 | forceSingleInstance: 0 90 | useFlipModelSwapchain: 1 91 | resizableWindow: 0 92 | useMacAppStoreValidation: 0 93 | macAppStoreCategory: public.app-category.games 94 | gpuSkinning: 1 95 | xboxPIXTextureCapture: 0 96 | xboxEnableAvatar: 0 97 | xboxEnableKinect: 0 98 | xboxEnableKinectAutoTracking: 0 99 | xboxEnableFitness: 0 100 | visibleInBackground: 1 101 | allowFullscreenSwitch: 1 102 | fullscreenMode: 1 103 | xboxSpeechDB: 0 104 | xboxEnableHeadOrientation: 0 105 | xboxEnableGuest: 0 106 | xboxEnablePIXSampling: 0 107 | metalFramebufferOnly: 0 108 | xboxOneResolution: 0 109 | xboxOneSResolution: 0 110 | xboxOneXResolution: 3 111 | xboxOneMonoLoggingLevel: 0 112 | xboxOneLoggingLevel: 1 113 | xboxOneDisableEsram: 0 114 | xboxOneEnableTypeOptimization: 0 115 | xboxOnePresentImmediateThreshold: 0 116 | switchQueueCommandMemory: 0 117 | switchQueueControlMemory: 16384 118 | switchQueueComputeMemory: 262144 119 | switchNVNShaderPoolsGranularity: 33554432 120 | switchNVNDefaultPoolsGranularity: 16777216 121 | switchNVNOtherPoolsGranularity: 16777216 122 | switchNVNMaxPublicTextureIDCount: 0 123 | switchNVNMaxPublicSamplerIDCount: 0 124 | stadiaPresentMode: 0 125 | stadiaTargetFramerate: 0 126 | vulkanNumSwapchainBuffers: 3 127 | vulkanEnableSetSRGBWrite: 0 128 | vulkanEnablePreTransform: 0 129 | vulkanEnableLateAcquireNextImage: 0 130 | vulkanEnableCommandBufferRecycling: 1 131 | m_SupportedAspectRatios: 132 | 4:3: 1 133 | 5:4: 1 134 | 16:10: 1 135 | 16:9: 1 136 | Others: 1 137 | bundleVersion: 0.1 138 | preloadedAssets: [] 139 | metroInputSource: 0 140 | wsaTransparentSwapchain: 0 141 | m_HolographicPauseOnTrackingLoss: 1 142 | xboxOneDisableKinectGpuReservation: 1 143 | xboxOneEnable7thCore: 1 144 | vrSettings: 145 | enable360StereoCapture: 0 146 | isWsaHolographicRemotingEnabled: 0 147 | enableFrameTimingStats: 0 148 | useHDRDisplay: 0 149 | D3DHDRBitDepth: 0 150 | m_ColorGamuts: 00000000 151 | targetPixelDensity: 30 152 | resolutionScalingMode: 0 153 | resetResolutionOnWindowResize: 0 154 | androidSupportedAspectRatio: 1 155 | androidMaxAspectRatio: 2.1 156 | applicationIdentifier: 157 | Standalone: com.DefaultCompany.My-project 158 | buildNumber: 159 | Standalone: 0 160 | iPhone: 0 161 | tvOS: 0 162 | overrideDefaultApplicationIdentifier: 0 163 | AndroidBundleVersionCode: 1 164 | AndroidMinSdkVersion: 19 165 | AndroidTargetSdkVersion: 0 166 | AndroidPreferredInstallLocation: 1 167 | aotOptions: 168 | stripEngineCode: 1 169 | iPhoneStrippingLevel: 0 170 | iPhoneScriptCallOptimization: 0 171 | ForceInternetPermission: 0 172 | ForceSDCardPermission: 0 173 | CreateWallpaper: 0 174 | APKExpansionFiles: 0 175 | keepLoadedShadersAlive: 1 176 | StripUnusedMeshComponents: 1 177 | VertexChannelCompressionMask: -1 178 | iPhoneSdkVersion: 988 179 | iOSTargetOSVersionString: 11.0 180 | tvOSSdkVersion: 0 181 | tvOSRequireExtendedGameController: 0 182 | tvOSTargetOSVersionString: 11.0 183 | uIPrerenderedIcon: 0 184 | uIRequiresPersistentWiFi: 0 185 | uIRequiresFullScreen: 1 186 | uIStatusBarHidden: 1 187 | uIExitOnSuspend: 0 188 | uIStatusBarStyle: 0 189 | appleTVSplashScreen: {fileID: 0} 190 | appleTVSplashScreen2x: {fileID: 0} 191 | tvOSSmallIconLayers: [] 192 | tvOSSmallIconLayers2x: [] 193 | tvOSLargeIconLayers: [] 194 | tvOSLargeIconLayers2x: [] 195 | tvOSTopShelfImageLayers: [] 196 | tvOSTopShelfImageLayers2x: [] 197 | tvOSTopShelfImageWideLayers: [] 198 | tvOSTopShelfImageWideLayers2x: [] 199 | iOSLaunchScreenType: 0 200 | iOSLaunchScreenPortrait: {fileID: 0} 201 | iOSLaunchScreenLandscape: {fileID: 0} 202 | iOSLaunchScreenBackgroundColor: 203 | serializedVersion: 2 204 | rgba: 0 205 | iOSLaunchScreenFillPct: 100 206 | iOSLaunchScreenSize: 100 207 | iOSLaunchScreenCustomXibPath: 208 | iOSLaunchScreeniPadType: 0 209 | iOSLaunchScreeniPadImage: {fileID: 0} 210 | iOSLaunchScreeniPadBackgroundColor: 211 | serializedVersion: 2 212 | rgba: 0 213 | iOSLaunchScreeniPadFillPct: 100 214 | iOSLaunchScreeniPadSize: 100 215 | iOSLaunchScreeniPadCustomXibPath: 216 | iOSLaunchScreenCustomStoryboardPath: 217 | iOSLaunchScreeniPadCustomStoryboardPath: 218 | iOSDeviceRequirements: [] 219 | iOSURLSchemes: [] 220 | iOSBackgroundModes: 0 221 | iOSMetalForceHardShadows: 0 222 | metalEditorSupport: 1 223 | metalAPIValidation: 1 224 | iOSRenderExtraFrameOnPause: 0 225 | iosCopyPluginsCodeInsteadOfSymlink: 0 226 | appleDeveloperTeamID: 227 | iOSManualSigningProvisioningProfileID: 228 | tvOSManualSigningProvisioningProfileID: 229 | iOSManualSigningProvisioningProfileType: 0 230 | tvOSManualSigningProvisioningProfileType: 0 231 | appleEnableAutomaticSigning: 0 232 | iOSRequireARKit: 0 233 | iOSAutomaticallyDetectAndAddCapabilities: 1 234 | appleEnableProMotion: 0 235 | shaderPrecisionModel: 0 236 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 237 | templatePackageId: com.unity.template.3d@5.0.4 238 | templateDefaultScene: Assets/Scenes/SampleScene.unity 239 | useCustomMainManifest: 0 240 | useCustomLauncherManifest: 0 241 | useCustomMainGradleTemplate: 0 242 | useCustomLauncherGradleManifest: 0 243 | useCustomBaseGradleTemplate: 0 244 | useCustomGradlePropertiesTemplate: 0 245 | useCustomProguardFile: 0 246 | AndroidTargetArchitectures: 1 247 | AndroidTargetDevices: 0 248 | AndroidSplashScreenScale: 0 249 | androidSplashScreen: {fileID: 0} 250 | AndroidKeystoreName: 251 | AndroidKeyaliasName: 252 | AndroidBuildApkPerCpuArchitecture: 0 253 | AndroidTVCompatibility: 0 254 | AndroidIsGame: 1 255 | AndroidEnableTango: 0 256 | androidEnableBanner: 1 257 | androidUseLowAccuracyLocation: 0 258 | androidUseCustomKeystore: 0 259 | m_AndroidBanners: 260 | - width: 320 261 | height: 180 262 | banner: {fileID: 0} 263 | androidGamepadSupportLevel: 0 264 | chromeosInputEmulation: 1 265 | AndroidMinifyWithR8: 0 266 | AndroidMinifyRelease: 0 267 | AndroidMinifyDebug: 0 268 | AndroidValidateAppBundleSize: 1 269 | AndroidAppBundleSizeToValidate: 150 270 | m_BuildTargetIcons: [] 271 | m_BuildTargetPlatformIcons: [] 272 | m_BuildTargetBatching: 273 | - m_BuildTarget: Standalone 274 | m_StaticBatching: 1 275 | m_DynamicBatching: 0 276 | - m_BuildTarget: tvOS 277 | m_StaticBatching: 1 278 | m_DynamicBatching: 0 279 | - m_BuildTarget: Android 280 | m_StaticBatching: 1 281 | m_DynamicBatching: 0 282 | - m_BuildTarget: iPhone 283 | m_StaticBatching: 1 284 | m_DynamicBatching: 0 285 | - m_BuildTarget: WebGL 286 | m_StaticBatching: 0 287 | m_DynamicBatching: 0 288 | m_BuildTargetGraphicsJobs: 289 | - m_BuildTarget: MacStandaloneSupport 290 | m_GraphicsJobs: 0 291 | - m_BuildTarget: Switch 292 | m_GraphicsJobs: 1 293 | - m_BuildTarget: MetroSupport 294 | m_GraphicsJobs: 1 295 | - m_BuildTarget: AppleTVSupport 296 | m_GraphicsJobs: 0 297 | - m_BuildTarget: BJMSupport 298 | m_GraphicsJobs: 1 299 | - m_BuildTarget: LinuxStandaloneSupport 300 | m_GraphicsJobs: 1 301 | - m_BuildTarget: PS4Player 302 | m_GraphicsJobs: 1 303 | - m_BuildTarget: iOSSupport 304 | m_GraphicsJobs: 0 305 | - m_BuildTarget: WindowsStandaloneSupport 306 | m_GraphicsJobs: 1 307 | - m_BuildTarget: XboxOnePlayer 308 | m_GraphicsJobs: 1 309 | - m_BuildTarget: LuminSupport 310 | m_GraphicsJobs: 0 311 | - m_BuildTarget: AndroidPlayer 312 | m_GraphicsJobs: 0 313 | - m_BuildTarget: WebGLSupport 314 | m_GraphicsJobs: 0 315 | m_BuildTargetGraphicsJobMode: 316 | - m_BuildTarget: PS4Player 317 | m_GraphicsJobMode: 0 318 | - m_BuildTarget: XboxOnePlayer 319 | m_GraphicsJobMode: 0 320 | m_BuildTargetGraphicsAPIs: 321 | - m_BuildTarget: AndroidPlayer 322 | m_APIs: 150000000b000000 323 | m_Automatic: 0 324 | - m_BuildTarget: iOSSupport 325 | m_APIs: 10000000 326 | m_Automatic: 1 327 | - m_BuildTarget: AppleTVSupport 328 | m_APIs: 10000000 329 | m_Automatic: 1 330 | - m_BuildTarget: WebGLSupport 331 | m_APIs: 0b000000 332 | m_Automatic: 1 333 | m_BuildTargetVRSettings: 334 | - m_BuildTarget: Standalone 335 | m_Enabled: 0 336 | m_Devices: 337 | - Oculus 338 | - OpenVR 339 | openGLRequireES31: 0 340 | openGLRequireES31AEP: 0 341 | openGLRequireES32: 0 342 | m_TemplateCustomTags: {} 343 | mobileMTRendering: 344 | Android: 1 345 | iPhone: 1 346 | tvOS: 1 347 | m_BuildTargetGroupLightmapEncodingQuality: [] 348 | m_BuildTargetGroupLightmapSettings: [] 349 | m_BuildTargetNormalMapEncoding: [] 350 | playModeTestRunnerEnabled: 0 351 | runPlayModeTestAsEditModeTest: 0 352 | actionOnDotNetUnhandledException: 1 353 | enableInternalProfiler: 0 354 | logObjCUncaughtExceptions: 1 355 | enableCrashReportAPI: 0 356 | cameraUsageDescription: 357 | locationUsageDescription: 358 | microphoneUsageDescription: 359 | bluetoothUsageDescription: 360 | switchNMETAOverride: 361 | switchNetLibKey: 362 | switchSocketMemoryPoolSize: 6144 363 | switchSocketAllocatorPoolSize: 128 364 | switchSocketConcurrencyLimit: 14 365 | switchScreenResolutionBehavior: 2 366 | switchUseCPUProfiler: 0 367 | switchUseGOLDLinker: 0 368 | switchApplicationID: 0x01004b9000490000 369 | switchNSODependencies: 370 | switchTitleNames_0: 371 | switchTitleNames_1: 372 | switchTitleNames_2: 373 | switchTitleNames_3: 374 | switchTitleNames_4: 375 | switchTitleNames_5: 376 | switchTitleNames_6: 377 | switchTitleNames_7: 378 | switchTitleNames_8: 379 | switchTitleNames_9: 380 | switchTitleNames_10: 381 | switchTitleNames_11: 382 | switchTitleNames_12: 383 | switchTitleNames_13: 384 | switchTitleNames_14: 385 | switchTitleNames_15: 386 | switchPublisherNames_0: 387 | switchPublisherNames_1: 388 | switchPublisherNames_2: 389 | switchPublisherNames_3: 390 | switchPublisherNames_4: 391 | switchPublisherNames_5: 392 | switchPublisherNames_6: 393 | switchPublisherNames_7: 394 | switchPublisherNames_8: 395 | switchPublisherNames_9: 396 | switchPublisherNames_10: 397 | switchPublisherNames_11: 398 | switchPublisherNames_12: 399 | switchPublisherNames_13: 400 | switchPublisherNames_14: 401 | switchPublisherNames_15: 402 | switchIcons_0: {fileID: 0} 403 | switchIcons_1: {fileID: 0} 404 | switchIcons_2: {fileID: 0} 405 | switchIcons_3: {fileID: 0} 406 | switchIcons_4: {fileID: 0} 407 | switchIcons_5: {fileID: 0} 408 | switchIcons_6: {fileID: 0} 409 | switchIcons_7: {fileID: 0} 410 | switchIcons_8: {fileID: 0} 411 | switchIcons_9: {fileID: 0} 412 | switchIcons_10: {fileID: 0} 413 | switchIcons_11: {fileID: 0} 414 | switchIcons_12: {fileID: 0} 415 | switchIcons_13: {fileID: 0} 416 | switchIcons_14: {fileID: 0} 417 | switchIcons_15: {fileID: 0} 418 | switchSmallIcons_0: {fileID: 0} 419 | switchSmallIcons_1: {fileID: 0} 420 | switchSmallIcons_2: {fileID: 0} 421 | switchSmallIcons_3: {fileID: 0} 422 | switchSmallIcons_4: {fileID: 0} 423 | switchSmallIcons_5: {fileID: 0} 424 | switchSmallIcons_6: {fileID: 0} 425 | switchSmallIcons_7: {fileID: 0} 426 | switchSmallIcons_8: {fileID: 0} 427 | switchSmallIcons_9: {fileID: 0} 428 | switchSmallIcons_10: {fileID: 0} 429 | switchSmallIcons_11: {fileID: 0} 430 | switchSmallIcons_12: {fileID: 0} 431 | switchSmallIcons_13: {fileID: 0} 432 | switchSmallIcons_14: {fileID: 0} 433 | switchSmallIcons_15: {fileID: 0} 434 | switchManualHTML: 435 | switchAccessibleURLs: 436 | switchLegalInformation: 437 | switchMainThreadStackSize: 1048576 438 | switchPresenceGroupId: 439 | switchLogoHandling: 0 440 | switchReleaseVersion: 0 441 | switchDisplayVersion: 1.0.0 442 | switchStartupUserAccount: 0 443 | switchTouchScreenUsage: 0 444 | switchSupportedLanguagesMask: 0 445 | switchLogoType: 0 446 | switchApplicationErrorCodeCategory: 447 | switchUserAccountSaveDataSize: 0 448 | switchUserAccountSaveDataJournalSize: 0 449 | switchApplicationAttribute: 0 450 | switchCardSpecSize: -1 451 | switchCardSpecClock: -1 452 | switchRatingsMask: 0 453 | switchRatingsInt_0: 0 454 | switchRatingsInt_1: 0 455 | switchRatingsInt_2: 0 456 | switchRatingsInt_3: 0 457 | switchRatingsInt_4: 0 458 | switchRatingsInt_5: 0 459 | switchRatingsInt_6: 0 460 | switchRatingsInt_7: 0 461 | switchRatingsInt_8: 0 462 | switchRatingsInt_9: 0 463 | switchRatingsInt_10: 0 464 | switchRatingsInt_11: 0 465 | switchRatingsInt_12: 0 466 | switchLocalCommunicationIds_0: 467 | switchLocalCommunicationIds_1: 468 | switchLocalCommunicationIds_2: 469 | switchLocalCommunicationIds_3: 470 | switchLocalCommunicationIds_4: 471 | switchLocalCommunicationIds_5: 472 | switchLocalCommunicationIds_6: 473 | switchLocalCommunicationIds_7: 474 | switchParentalControl: 0 475 | switchAllowsScreenshot: 1 476 | switchAllowsVideoCapturing: 1 477 | switchAllowsRuntimeAddOnContentInstall: 0 478 | switchDataLossConfirmation: 0 479 | switchUserAccountLockEnabled: 0 480 | switchSystemResourceMemory: 16777216 481 | switchSupportedNpadStyles: 22 482 | switchNativeFsCacheSize: 32 483 | switchIsHoldTypeHorizontal: 0 484 | switchSupportedNpadCount: 8 485 | switchSocketConfigEnabled: 0 486 | switchTcpInitialSendBufferSize: 32 487 | switchTcpInitialReceiveBufferSize: 64 488 | switchTcpAutoSendBufferSizeMax: 256 489 | switchTcpAutoReceiveBufferSizeMax: 256 490 | switchUdpSendBufferSize: 9 491 | switchUdpReceiveBufferSize: 42 492 | switchSocketBufferEfficiency: 4 493 | switchSocketInitializeEnabled: 1 494 | switchNetworkInterfaceManagerInitializeEnabled: 1 495 | switchPlayerConnectionEnabled: 1 496 | switchUseNewStyleFilepaths: 0 497 | switchUseMicroSleepForYield: 1 498 | switchEnableRamDiskSupport: 0 499 | switchMicroSleepForYieldTime: 25 500 | switchRamDiskSpaceSize: 12 501 | ps4NPAgeRating: 12 502 | ps4NPTitleSecret: 503 | ps4NPTrophyPackPath: 504 | ps4ParentalLevel: 11 505 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 506 | ps4Category: 0 507 | ps4MasterVersion: 01.00 508 | ps4AppVersion: 01.00 509 | ps4AppType: 0 510 | ps4ParamSfxPath: 511 | ps4VideoOutPixelFormat: 0 512 | ps4VideoOutInitialWidth: 1920 513 | ps4VideoOutBaseModeInitialWidth: 1920 514 | ps4VideoOutReprojectionRate: 60 515 | ps4PronunciationXMLPath: 516 | ps4PronunciationSIGPath: 517 | ps4BackgroundImagePath: 518 | ps4StartupImagePath: 519 | ps4StartupImagesFolder: 520 | ps4IconImagesFolder: 521 | ps4SaveDataImagePath: 522 | ps4SdkOverride: 523 | ps4BGMPath: 524 | ps4ShareFilePath: 525 | ps4ShareOverlayImagePath: 526 | ps4PrivacyGuardImagePath: 527 | ps4ExtraSceSysFile: 528 | ps4NPtitleDatPath: 529 | ps4RemotePlayKeyAssignment: -1 530 | ps4RemotePlayKeyMappingDir: 531 | ps4PlayTogetherPlayerCount: 0 532 | ps4EnterButtonAssignment: 1 533 | ps4ApplicationParam1: 0 534 | ps4ApplicationParam2: 0 535 | ps4ApplicationParam3: 0 536 | ps4ApplicationParam4: 0 537 | ps4DownloadDataSize: 0 538 | ps4GarlicHeapSize: 2048 539 | ps4ProGarlicHeapSize: 2560 540 | playerPrefsMaxSize: 32768 541 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 542 | ps4pnSessions: 1 543 | ps4pnPresence: 1 544 | ps4pnFriends: 1 545 | ps4pnGameCustomData: 1 546 | playerPrefsSupport: 0 547 | enableApplicationExit: 0 548 | resetTempFolder: 1 549 | restrictedAudioUsageRights: 0 550 | ps4UseResolutionFallback: 0 551 | ps4ReprojectionSupport: 0 552 | ps4UseAudio3dBackend: 0 553 | ps4UseLowGarlicFragmentationMode: 1 554 | ps4SocialScreenEnabled: 0 555 | ps4ScriptOptimizationLevel: 0 556 | ps4Audio3dVirtualSpeakerCount: 14 557 | ps4attribCpuUsage: 0 558 | ps4PatchPkgPath: 559 | ps4PatchLatestPkgPath: 560 | ps4PatchChangeinfoPath: 561 | ps4PatchDayOne: 0 562 | ps4attribUserManagement: 0 563 | ps4attribMoveSupport: 0 564 | ps4attrib3DSupport: 0 565 | ps4attribShareSupport: 0 566 | ps4attribExclusiveVR: 0 567 | ps4disableAutoHideSplash: 0 568 | ps4videoRecordingFeaturesUsed: 0 569 | ps4contentSearchFeaturesUsed: 0 570 | ps4CompatibilityPS5: 0 571 | ps4AllowPS5Detection: 0 572 | ps4GPU800MHz: 1 573 | ps4attribEyeToEyeDistanceSettingVR: 0 574 | ps4IncludedModules: [] 575 | ps4attribVROutputEnabled: 0 576 | monoEnv: 577 | splashScreenBackgroundSourceLandscape: {fileID: 0} 578 | splashScreenBackgroundSourcePortrait: {fileID: 0} 579 | blurSplashScreenBackground: 1 580 | spritePackerPolicy: 581 | webGLMemorySize: 16 582 | webGLExceptionSupport: 1 583 | webGLNameFilesAsHashes: 0 584 | webGLDataCaching: 1 585 | webGLDebugSymbols: 0 586 | webGLEmscriptenArgs: 587 | webGLModulesDirectory: 588 | webGLTemplate: APPLICATION:Default 589 | webGLAnalyzeBuildSize: 0 590 | webGLUseEmbeddedResources: 0 591 | webGLCompressionFormat: 1 592 | webGLWasmArithmeticExceptions: 0 593 | webGLLinkerTarget: 1 594 | webGLThreadsSupport: 0 595 | webGLDecompressionFallback: 0 596 | scriptingDefineSymbols: 597 | 1: UNITY_POST_PROCESSING_STACK_V2 598 | 7: UNITY_POST_PROCESSING_STACK_V2 599 | 13: UNITY_POST_PROCESSING_STACK_V2 600 | 14: UNITY_POST_PROCESSING_STACK_V2 601 | 19: UNITY_POST_PROCESSING_STACK_V2 602 | 21: UNITY_POST_PROCESSING_STACK_V2 603 | 25: UNITY_POST_PROCESSING_STACK_V2 604 | 27: UNITY_POST_PROCESSING_STACK_V2 605 | 28: UNITY_POST_PROCESSING_STACK_V2 606 | 29: UNITY_POST_PROCESSING_STACK_V2 607 | 30: UNITY_POST_PROCESSING_STACK_V2 608 | 32: UNITY_POST_PROCESSING_STACK_V2 609 | 33: UNITY_POST_PROCESSING_STACK_V2 610 | additionalCompilerArguments: {} 611 | platformArchitecture: {} 612 | scriptingBackend: {} 613 | il2cppCompilerConfiguration: {} 614 | managedStrippingLevel: 615 | Standalone: 3 616 | incrementalIl2cppBuild: {} 617 | suppressCommonWarnings: 1 618 | allowUnsafeCode: 0 619 | useDeterministicCompilation: 1 620 | useReferenceAssemblies: 1 621 | enableRoslynAnalyzers: 1 622 | additionalIl2CppArgs: 623 | scriptingRuntimeVersion: 1 624 | gcIncremental: 1 625 | assemblyVersionValidation: 1 626 | gcWBarrierValidation: 0 627 | apiCompatibilityLevelPerPlatform: {} 628 | m_RenderingPath: 1 629 | m_MobileRenderingPath: 1 630 | metroPackageName: Template_3D 631 | metroPackageVersion: 632 | metroCertificatePath: 633 | metroCertificatePassword: 634 | metroCertificateSubject: 635 | metroCertificateIssuer: 636 | metroCertificateNotAfter: 0000000000000000 637 | metroApplicationDescription: Template_3D 638 | wsaImages: {} 639 | metroTileShortName: 640 | metroTileShowName: 0 641 | metroMediumTileShowName: 0 642 | metroLargeTileShowName: 0 643 | metroWideTileShowName: 0 644 | metroSupportStreamingInstall: 0 645 | metroLastRequiredScene: 0 646 | metroDefaultTileSize: 1 647 | metroTileForegroundText: 2 648 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 649 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 650 | metroSplashScreenUseBackgroundColor: 0 651 | platformCapabilities: {} 652 | metroTargetDeviceFamilies: {} 653 | metroFTAName: 654 | metroFTAFileTypes: [] 655 | metroProtocolName: 656 | vcxProjDefaultLanguage: 657 | XboxOneProductId: 658 | XboxOneUpdateKey: 659 | XboxOneSandboxId: 660 | XboxOneContentId: 661 | XboxOneTitleId: 662 | XboxOneSCId: 663 | XboxOneGameOsOverridePath: 664 | XboxOnePackagingOverridePath: 665 | XboxOneAppManifestOverridePath: 666 | XboxOneVersion: 1.0.0.0 667 | XboxOnePackageEncryption: 0 668 | XboxOnePackageUpdateGranularity: 2 669 | XboxOneDescription: 670 | XboxOneLanguage: 671 | - enus 672 | XboxOneCapability: [] 673 | XboxOneGameRating: {} 674 | XboxOneIsContentPackage: 0 675 | XboxOneEnhancedXboxCompatibilityMode: 0 676 | XboxOneEnableGPUVariability: 1 677 | XboxOneSockets: {} 678 | XboxOneSplashScreen: {fileID: 0} 679 | XboxOneAllowedProductIds: [] 680 | XboxOnePersistentLocalStorageSize: 0 681 | XboxOneXTitleMemory: 8 682 | XboxOneOverrideIdentityName: 683 | XboxOneOverrideIdentityPublisher: 684 | vrEditorSettings: {} 685 | cloudServicesEnabled: 686 | UNet: 1 687 | luminIcon: 688 | m_Name: 689 | m_ModelFolderPath: 690 | m_PortalFolderPath: 691 | luminCert: 692 | m_CertPath: 693 | m_SignPackage: 1 694 | luminIsChannelApp: 0 695 | luminVersion: 696 | m_VersionCode: 1 697 | m_VersionName: 698 | apiCompatibilityLevel: 6 699 | activeInputHandler: 0 700 | cloudProjectId: 701 | framebufferDepthMemorylessMode: 0 702 | qualitySettingsNames: [] 703 | projectName: 704 | organizationId: 705 | cloudEnabled: 0 706 | legacyClampBlendShapeWeights: 0 707 | virtualTexturingSupportEnabled: 0 708 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.35f1 2 | m_EditorVersionWithRevision: 2020.3.35f1 (18e4db7a9996) 3 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Quality 11 | pixelLightCount: 4 12 | shadows: 2 13 | shadowResolution: 2 14 | shadowProjection: 1 15 | shadowCascades: 4 16 | shadowDistance: 150 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 1 21 | skinWeights: 4 22 | textureQuality: 0 23 | anisotropicTextures: 2 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 1 27 | realtimeReflectionProbes: 1 28 | billboardsFaceCameraPosition: 1 29 | vSyncCount: 0 30 | lodBias: 2 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4096 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | m_PerPlatformDefaultQuality: 46 | Android: 0 47 | Lumin: 0 48 | Nintendo 3DS: 0 49 | Nintendo Switch: 0 50 | PS4: 0 51 | PSP2: 0 52 | Stadia: 0 53 | Standalone: 0 54 | WebGL: 0 55 | Windows Store Apps: 0 56 | XboxOne: 0 57 | iPhone: 0 58 | tvOS: 0 59 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - Post Processing 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /CubemapFog/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /CubemapFog/UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | RecentlyUsedScenePath-0: 9 | value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d 10 | flags: 0 11 | vcSharedLogLevel: 12 | value: 0d5e400f0650 13 | flags: 0 14 | m_VCAutomaticAdd: 1 15 | m_VCDebugCom: 0 16 | m_VCDebugCmd: 0 17 | m_VCDebugOut: 0 18 | m_SemanticMergeMode: 2 19 | m_VCShowFailedCheckout: 1 20 | m_VCOverwriteFailedCheckoutAssets: 1 21 | m_VCProjectOverlayIcons: 1 22 | m_VCHierarchyOverlayIcons: 1 23 | m_VCOtherOverlayIcons: 1 24 | m_VCAllowAsyncUpdate: 1 25 | -------------------------------------------------------------------------------- /GithubContent/off1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/GithubContent/off1.png -------------------------------------------------------------------------------- /GithubContent/on1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/GithubContent/on1.png -------------------------------------------------------------------------------- /GithubContent/result1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/GithubContent/result1.png -------------------------------------------------------------------------------- /GithubContent/result2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/GithubContent/result2.png -------------------------------------------------------------------------------- /GithubContent/result3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/GithubContent/result3.jpg -------------------------------------------------------------------------------- /GithubContent/result4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/frostbone25/Unity-Cubemap-Fog/a19847bf97f763722703f7b7e95bf7af5a6ac51e/GithubContent/result4.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 David Matos 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity Cubemap Fog 2 | 3 | A simple fog solution that utilizes a cubemap for color, rather than a single constant color for better fidelity. It can do height based fog as well. 4 | 5 | **Cubemap Fog On** 6 | ![on1](GithubContent/on1.png) 7 | 8 | **Cubemap Fog Off** 9 | ![off1](GithubContent/off1.png) 10 | 11 | # Results 12 | ![result1](GithubContent/result1.png) 13 | 14 | ![result2](GithubContent/result2.png) 15 | 16 | ![result3](GithubContent/result3.jpg) 17 | 18 | ![result4](GithubContent/result4.jpg) 19 | 20 | # Features 21 | 22 | - A fog solution using cubemap for color. 23 | - Two versions, post processing version and a scene based version to suit different needs. 24 | - Customizable, height based fog that samples the cubemap at different mip levels for blurring. 25 | 26 | **NOTE: Constructed on the Built-In Rendering Pipeline.** 27 | 28 | # Notes 29 | 30 | Note that unless you are using deffered rendering, the scene based solution requires that there is a camera rendering a camera depth texture. If you don't have access to the main camera properties there are a couple of tricks you can do to enable the rendering of the depth texture in forward rendering. 31 | 32 | ***Camera Depth Texture Trick 1:*** If that cant be done, a quirk of the post processing stack is that you can enable ambient occlusion which automatically sets off the camera depth texture generation flag and therefore allows this effect to work. If your world doesn't need AO then I suggest putting the quality settings at its lowest so the cost of the AO effect is smaller. The intensity value also needs to be greater than 0 otherwise the effect won't be active. 33 | 34 | ***Camera Depth Texture Trick 2:*** Courtesy of [orels1](https://github.com/orels1) *(from my baked volumetrics)*, you can make unity enable depth pass without using AO (in case of VRC where you do not have access to adjusting Main Cam properties). All you need is a directional light with shadows enabled hitting some random empty layer - and unity will enable the depth pass for you. 35 | --------------------------------------------------------------------------------