From bc4dc5d28f742b5717ecafd40a9e223e9d8a25a3 Mon Sep 17 00:00:00 2001 From: Casey Date: Mon, 17 Feb 2020 23:53:36 +1100 Subject: [PATCH] Lil level fixes, gradient skybox yeah that --- Assets/Scenes/CaseyTest.unity | 560 +++++------------- Assets/SkyboxPlus.meta | 9 + Assets/SkyboxPlus/Cubemap.shader | 83 +++ Assets/SkyboxPlus/Cubemap.shader.meta | 9 + Assets/SkyboxPlus/Editor.meta | 9 + .../Editor/CubemapMaterialEditor.cs | 79 +++ .../Editor/CubemapMaterialEditor.cs.meta | 12 + .../Editor/GradientsMaterialEditor.cs | 130 ++++ .../Editor/GradientsMaterialEditor.cs.meta | 12 + Assets/SkyboxPlus/Gradients.shader | 109 ++++ Assets/SkyboxPlus/Gradients.shader.meta | 9 + Assets/SkyboxPlus/Hemisphere.shader | 58 ++ Assets/SkyboxPlus/Hemisphere.shader.meta | 9 + Assets/WorldAssets/Materials/Sky01.mat | 122 ++++ Assets/WorldAssets/Materials/Sky01.mat.meta | 8 + Assets/WorldAssets/Models/SM_Level_Rev03.fbx | 3 + .../Models/SM_Level_Rev03.fbx.meta | 96 +++ 17 files changed, 916 insertions(+), 401 deletions(-) create mode 100644 Assets/SkyboxPlus.meta create mode 100644 Assets/SkyboxPlus/Cubemap.shader create mode 100644 Assets/SkyboxPlus/Cubemap.shader.meta create mode 100644 Assets/SkyboxPlus/Editor.meta create mode 100644 Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs create mode 100644 Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs.meta create mode 100644 Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs create mode 100644 Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs.meta create mode 100644 Assets/SkyboxPlus/Gradients.shader create mode 100644 Assets/SkyboxPlus/Gradients.shader.meta create mode 100644 Assets/SkyboxPlus/Hemisphere.shader create mode 100644 Assets/SkyboxPlus/Hemisphere.shader.meta create mode 100644 Assets/WorldAssets/Materials/Sky01.mat create mode 100644 Assets/WorldAssets/Materials/Sky01.mat.meta create mode 100644 Assets/WorldAssets/Models/SM_Level_Rev03.fbx create mode 100644 Assets/WorldAssets/Models/SM_Level_Rev03.fbx.meta diff --git a/Assets/Scenes/CaseyTest.unity b/Assets/Scenes/CaseyTest.unity index 23e6479..6999e21 100644 --- a/Assets/Scenes/CaseyTest.unity +++ b/Assets/Scenes/CaseyTest.unity @@ -14,21 +14,21 @@ OcclusionCullingSettings: RenderSettings: m_ObjectHideFlags: 0 serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 + m_Fog: 1 + m_FogColor: {r: 0.4485582, g: 0.80714697, b: 0.9056604, a: 1} + m_FogMode: 1 + m_FogDensity: 0.0004 + m_LinearFogStart: 400 + m_LinearFogEnd: 885 m_AmbientSkyColor: {r: 0, g: 0.15094347, b: 0.4528302, a: 1} m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 + m_SkyboxMaterial: {fileID: 2100000, guid: af2e1b4d899f63e4a855cf81f5577f6f, type: 2} + m_HaloStrength: 0.159 + m_FlareStrength: 0.504 m_FlareFadeSpeed: 3 m_HaloTexture: {fileID: 0} m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 705507994} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_IndirectSpecularColor: {r: 0.21067512, g: 0.45147055, b: 0.75610137, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1224,26 +1224,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &101569190 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: -4473984409997532297, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - m_PrefabInstance: {fileID: 858502496} - m_PrefabAsset: {fileID: 0} ---- !u!64 &101569194 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 101569190} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 5302568919011541938, guid: 80305c126faa4e24d8990b09a91a9867, type: 3} --- !u!1001 &101665559 PrefabInstance: m_ObjectHideFlags: 0 @@ -2295,95 +2275,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: c68704f4614b0a943bb7fb9ea8083e01, type: 3} ---- !u!1001 &288557559 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 639785160} - m_Modifications: - - target: {fileID: -4861924686910468554, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalPosition.x - value: -62.40484 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalPosition.y - value: -7.627367 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalPosition.z - value: 2170.287 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_RootOrder - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -927199367670048503, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_Name - value: SM_Level_Rev01 - objectReference: {fileID: 0} - - target: {fileID: -927199367670048503, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -157825318150610632, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - - target: {fileID: 1318460613128657674, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 4024801bc7168ca469aad4eac4bc4667, type: 3} --- !u!1 &289407213 GameObject: m_ObjectHideFlags: 0 @@ -2417,6 +2308,26 @@ Transform: m_Father: {fileID: 1611611825} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &295983948 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: -8522491534200901873, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + m_PrefabInstance: {fileID: 739820758} + m_PrefabAsset: {fileID: 0} +--- !u!64 &295983950 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 295983948} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 7384198727209796758, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, type: 3} --- !u!1001 &303158688 PrefabInstance: m_ObjectHideFlags: 0 @@ -3258,12 +3169,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 5efa3794de547b04988f66fb110ef963, type: 3} ---- !u!4 &381639344 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - m_PrefabInstance: {fileID: 288557559} - m_PrefabAsset: {fileID: 0} --- !u!4 &390329768 stripped Transform: m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 4163547e129287f4fa90a8c7ae767017, @@ -3578,6 +3483,26 @@ Transform: type: 3} m_PrefabInstance: {fileID: 341840951} m_PrefabAsset: {fileID: 0} +--- !u!1 &421452451 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4608457820613413357, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + m_PrefabInstance: {fileID: 739820758} + m_PrefabAsset: {fileID: 0} +--- !u!64 &421452453 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 421452451} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 6714409032714082515, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, type: 3} --- !u!1001 &422949966 PrefabInstance: m_ObjectHideFlags: 0 @@ -4833,9 +4758,7 @@ Transform: m_LocalPosition: {x: 62.40484, y: 4.969347, z: -2170.287} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 2106868055} - - {fileID: 381639344} - - {fileID: 1022985342} + - {fileID: 1076743700} - {fileID: 498254611} - {fileID: 364179546} m_Father: {fileID: 0} @@ -5039,85 +4962,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1840752242} m_PrefabAsset: {fileID: 0} ---- !u!1001 &695221452 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 639785160} - m_Modifications: - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalPosition.x - value: -91.486435 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalPosition.y - value: -39.969345 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalPosition.z - value: 2104.5522 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -2765112173863953282, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_Enabled - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -927199367670048503, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_Name - value: COL_Level_Rev01 - objectReference: {fileID: 0} - - target: {fileID: -927199367670048503, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 486d136744f3b794d8d321b4cc06d516, type: 3} --- !u!1 &705507993 GameObject: m_ObjectHideFlags: 0 @@ -5440,6 +5284,100 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: a9464dd51bb1eef41b97d9dba3c56cf8, type: 3} +--- !u!1001 &739820758 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 639785160} + m_Modifications: + - target: {fileID: -8808083439544978670, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} + - target: {fileID: -4456891325724128084, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalPosition.x + value: -62.40484 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalPosition.y + value: -7.627367 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalPosition.z + value: 2170.287 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1729376869572821019, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} + - target: {fileID: -927199367670048503, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_Name + value: SM_Level_Rev03 + objectReference: {fileID: 0} + - target: {fileID: 1557152100762663096, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} + - target: {fileID: 6621537855607733510, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, type: 3} --- !u!4 &746405174 stripped Transform: m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 087b46e7dc258f647bf411420c21656c, @@ -5696,26 +5634,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 2047674687} m_PrefabAsset: {fileID: 0} ---- !u!1 &761835697 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: -4326761520034251805, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - m_PrefabInstance: {fileID: 858502496} - m_PrefabAsset: {fileID: 0} ---- !u!64 &761835701 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 761835697} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 2297425034801156755, guid: 80305c126faa4e24d8990b09a91a9867, type: 3} --- !u!1001 &776346270 PrefabInstance: m_ObjectHideFlags: 0 @@ -5881,26 +5799,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 895e7fe25b075874a87fd2efd00aafad, type: 3} ---- !u!1 &813109448 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: -4473984409997532297, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - m_PrefabInstance: {fileID: 288557559} - m_PrefabAsset: {fileID: 0} ---- !u!64 &813109452 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 813109448} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 5302568919011541938, guid: 4024801bc7168ca469aad4eac4bc4667, type: 3} --- !u!1001 &813460962 PrefabInstance: m_ObjectHideFlags: 0 @@ -6105,100 +6003,6 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0cd2ef3ca51fc5541912dbdcd56cd066, type: 3} ---- !u!1001 &858502496 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 639785160} - m_Modifications: - - target: {fileID: -7996341430962460841, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - - target: {fileID: -7671525966661227734, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - - target: {fileID: -4861924686910468554, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalPosition.x - value: -62.40484 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalPosition.y - value: -7.627367 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalPosition.z - value: 2170.287 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_RootOrder - value: 2 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: -927199367670048503, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_Name - value: SM_Level_Rev02 - objectReference: {fileID: 0} - - target: {fileID: -157825318150610632, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - - target: {fileID: 1318460613128657674, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 41dd6c0d44ba4f94ca2ef9c9a117d460, type: 2} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 80305c126faa4e24d8990b09a91a9867, type: 3} --- !u!4 &882608989 stripped Transform: m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 5efa3794de547b04988f66fb110ef963, @@ -6257,7 +6061,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 37.700012, y: 49.899994} + m_AnchoredPosition: {x: 37.700012, y: 49.900024} m_SizeDelta: {x: 701.8, y: 505.5} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &907665125 @@ -7060,7 +6864,7 @@ Camera: m_GameObject: {fileID: 963194225} m_Enabled: 1 serializedVersion: 2 - m_ClearFlags: 2 + m_ClearFlags: 1 m_BackGroundColor: {r: 0.13349947, g: 0.22833352, b: 0.3773585, a: 0} m_projectionMatrixMode: 1 m_GateFitMode: 2 @@ -7728,12 +7532,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1734655005} m_PrefabAsset: {fileID: 0} ---- !u!4 &1022985342 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - m_PrefabInstance: {fileID: 858502496} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1023214385 PrefabInstance: m_ObjectHideFlags: 0 @@ -7959,52 +7757,38 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1257446456} m_PrefabAsset: {fileID: 0} ---- !u!1 &1064074102 stripped +--- !u!1 &1069972784 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 945258828847837932, guid: 486d136744f3b794d8d321b4cc06d516, + m_CorrespondingSourceObject: {fileID: -172663063467594100, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, type: 3} - m_PrefabInstance: {fileID: 695221452} + m_PrefabInstance: {fileID: 739820758} m_PrefabAsset: {fileID: 0} ---- !u!64 &1064074106 +--- !u!64 &1069972786 MeshCollider: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1064074102} + m_GameObject: {fileID: 1069972784} m_Material: {fileID: 0} m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 3 m_Convex: 0 m_CookingOptions: 30 - m_Mesh: {fileID: -135762343853041077, guid: 486d136744f3b794d8d321b4cc06d516, type: 3} + m_Mesh: {fileID: 8883202256173910550, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, type: 3} +--- !u!4 &1076743700 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: f2f5c3ab2df72ee4291515b3a6eb0aea, + type: 3} + m_PrefabInstance: {fileID: 739820758} + m_PrefabAsset: {fileID: 0} --- !u!4 &1079182047 stripped Transform: m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 49b2f5221b1828642853d6a1bc226dee, type: 3} m_PrefabInstance: {fileID: 1038900602} m_PrefabAsset: {fileID: 0} ---- !u!1 &1087244640 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 9101430577481724397, guid: 80305c126faa4e24d8990b09a91a9867, - type: 3} - m_PrefabInstance: {fileID: 858502496} - m_PrefabAsset: {fileID: 0} ---- !u!64 &1087244644 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1087244640} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 3369316746193770658, guid: 80305c126faa4e24d8990b09a91a9867, type: 3} --- !u!4 &1098895408 stripped Transform: m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 4163547e129287f4fa90a8c7ae767017, @@ -12557,26 +12341,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 141958417} m_PrefabAsset: {fileID: 0} ---- !u!1 &1847736263 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 9101430577481724397, guid: 4024801bc7168ca469aad4eac4bc4667, - type: 3} - m_PrefabInstance: {fileID: 288557559} - m_PrefabAsset: {fileID: 0} ---- !u!64 &1847736267 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1847736263} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 3 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 3369316746193770658, guid: 4024801bc7168ca469aad4eac4bc4667, type: 3} --- !u!4 &1848803239 stripped Transform: m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 5efa3794de547b04988f66fb110ef963, @@ -14001,12 +13765,6 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1103788420} m_PrefabAsset: {fileID: 0} ---- !u!4 &2106868055 stripped -Transform: - m_CorrespondingSourceObject: {fileID: -4216859302048453862, guid: 486d136744f3b794d8d321b4cc06d516, - type: 3} - m_PrefabInstance: {fileID: 695221452} - m_PrefabAsset: {fileID: 0} --- !u!1001 &2109092681 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/SkyboxPlus.meta b/Assets/SkyboxPlus.meta new file mode 100644 index 0000000..2a928da --- /dev/null +++ b/Assets/SkyboxPlus.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ee8b1f8a232534f5794208dc2331f425 +folderAsset: yes +timeCreated: 1446300825 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SkyboxPlus/Cubemap.shader b/Assets/SkyboxPlus/Cubemap.shader new file mode 100644 index 0000000..c33e6a6 --- /dev/null +++ b/Assets/SkyboxPlus/Cubemap.shader @@ -0,0 +1,83 @@ +Shader "SkyboxPlus/Cubemap" +{ + Properties + { + [NoScaleOffset] _Tex("-", Cube) = "grey"{} + _Tint("-", Color) = (.5, .5, .5) + + _Euler("-", Vector) = (0, 0, 0) + [HideInInspector] _Rotation1("-", Vector) = (1, 0, 0) + [HideInInspector] _Rotation2("-", Vector) = (0, 1, 0) + [HideInInspector] _Rotation3("-", Vector) = (0, 0, 1) + + [Gamma] _Exposure("-", Range(0, 8)) = 1 + _Saturation("-", Range(0, 2)) = 1 + + [Toggle] _Lod("-", Float) = 0 + _LodLevel("-", Range(0, 10)) = 0 + } + CGINCLUDE + + #pragma shader_feature _LOD_ON + #include "UnityCG.cginc" + + samplerCUBE _Tex; + half4 _Tex_HDR; + + half4 _Tint; + half _Exposure; + half _Saturation; + float _LodLevel; + + float4 _Rotation1; + float4 _Rotation2; + float4 _Rotation3; + + struct appdata_t { + float4 vertex : POSITION; + }; + + struct v2f { + float4 vertex : SV_POSITION; + float3 texcoord : TEXCOORD0; + }; + + v2f vert(appdata_t v) + { + v2f o; + float3x3 m = float3x3(_Rotation1.xyz, _Rotation2.xyz, _Rotation3.xyz); + float4 vp = float4(mul(m, v.vertex.xyz), v.vertex.w); + o.vertex = UnityObjectToClipPos(vp); + o.texcoord = v.vertex.xyz; + return o; + } + + fixed4 frag(v2f i) : SV_Target + { +#ifdef _LOD_ON + half4 tex = texCUBElod(_Tex, float4(i.texcoord, _LodLevel)); +#else + half4 tex = texCUBE(_Tex, i.texcoord); +#endif + half3 c = DecodeHDR(tex, _Tex_HDR); + c *= _Tint.rgb * unity_ColorSpaceDouble.rgb * _Exposure; + c = lerp((half3)Luminance(c), c, _Saturation); + return half4(c, 1); + } + + ENDCG + SubShader + { + Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" } + Cull Off ZWrite Off + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } + } + Fallback Off + CustomEditor "SkyboxPlus.CubemapMaterialEditor" +} diff --git a/Assets/SkyboxPlus/Cubemap.shader.meta b/Assets/SkyboxPlus/Cubemap.shader.meta new file mode 100644 index 0000000..529abfd --- /dev/null +++ b/Assets/SkyboxPlus/Cubemap.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f2a20f3ce17b84e938179dc858a385eb +timeCreated: 1446300852 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SkyboxPlus/Editor.meta b/Assets/SkyboxPlus/Editor.meta new file mode 100644 index 0000000..15ba8f6 --- /dev/null +++ b/Assets/SkyboxPlus/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 442c5816359b942c796d7d60c29c730a +folderAsset: yes +timeCreated: 1446300907 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs b/Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs new file mode 100644 index 0000000..3a0db44 --- /dev/null +++ b/Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs @@ -0,0 +1,79 @@ +using UnityEngine; +using UnityEditor; + +namespace SkyboxPlus +{ + public class CubemapMaterialEditor : ShaderGUI + { + MaterialProperty _cubemap; + MaterialProperty _tint; + MaterialProperty _euler; + MaterialProperty _exposure; + MaterialProperty _saturation; + MaterialProperty _lod; + MaterialProperty _lodLevel; + + static GUIContent _textCubemap = new GUIContent("Cubemap"); + + bool _initial = true; + + void FindProperties(MaterialProperty[] props) + { + _cubemap = FindProperty("_Tex", props); + _tint = FindProperty("_Tint", props); + _euler = FindProperty("_Euler", props); + _exposure = FindProperty("_Exposure", props); + _saturation = FindProperty("_Saturation", props); + _lod = FindProperty("_Lod", props); + _lodLevel = FindProperty("_LodLevel", props); + } + + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) + { + FindProperties(properties); + if (ShaderPropertiesGUI(materialEditor) || _initial) + foreach (Material m in materialEditor.targets) + SetMatrix(m); + _initial = false; + } + + bool ShaderPropertiesGUI(MaterialEditor materialEditor) + { + EditorGUI.BeginChangeCheck(); + + materialEditor.TexturePropertySingleLine(_textCubemap, _cubemap, _tint); + Vector3Property(materialEditor, _euler, "Rotation"); + materialEditor.ShaderProperty(_exposure, "Exposure"); + materialEditor.ShaderProperty(_saturation, "Saturation"); + + materialEditor.ShaderProperty(_lod, "Specify MIP Level"); + if (_lod.hasMixedValue || _lod.floatValue > 0) + { + EditorGUI.indentLevel++; + materialEditor.ShaderProperty(_lodLevel, "Level"); + EditorGUI.indentLevel--; + } + + return EditorGUI.EndChangeCheck(); + } + + static void SetMatrix(Material material) + { + var r = material.GetVector("_Euler"); + var q = Quaternion.Euler(r.x, r.y, r.z); + var m = Matrix4x4.TRS(Vector3.zero, q, Vector3.one); + material.SetVector("_Rotation1", m.GetRow(0)); + material.SetVector("_Rotation2", m.GetRow(1)); + material.SetVector("_Rotation3", m.GetRow(2)); + } + + void Vector3Property(MaterialEditor materialEditor, MaterialProperty prop, string label) + { + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + var newValue = EditorGUILayout.Vector3Field(label, prop.vectorValue); + EditorGUI.showMixedValue = false; + if (EditorGUI.EndChangeCheck()) prop.vectorValue = newValue; + } + } +} diff --git a/Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs.meta b/Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs.meta new file mode 100644 index 0000000..9f6de53 --- /dev/null +++ b/Assets/SkyboxPlus/Editor/CubemapMaterialEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c5fc180a60c2d4b66b4de30169e4b9da +timeCreated: 1446300856 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs b/Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs new file mode 100644 index 0000000..1c73168 --- /dev/null +++ b/Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs @@ -0,0 +1,130 @@ +using UnityEngine; +using UnityEditor; + +namespace SkyboxPlus +{ + public class GradientsMaterialEditor : ShaderGUI + { + MaterialProperty _baseColor; + MaterialProperty _exposure; + + MaterialProperty _switch2; + MaterialProperty _switch3; + MaterialProperty _switch4; + + MaterialProperty _direction1; + MaterialProperty _direction2; + MaterialProperty _direction3; + MaterialProperty _direction4; + + MaterialProperty _color1; + MaterialProperty _color2; + MaterialProperty _color3; + MaterialProperty _color4; + + MaterialProperty _exponent1; + MaterialProperty _exponent2; + MaterialProperty _exponent3; + MaterialProperty _exponent4; + + bool _initial = true; + + void FindProperties(MaterialProperty[] props) + { + _baseColor = FindProperty("_BaseColor", props); + _exposure = FindProperty("_Exposure", props); + + _switch2 = FindProperty("_Switch2", props); + _switch3 = FindProperty("_Switch3", props); + _switch4 = FindProperty("_Switch4", props); + + _direction1 = FindProperty("_Direction1", props); + _direction2 = FindProperty("_Direction2", props); + _direction3 = FindProperty("_Direction3", props); + _direction4 = FindProperty("_Direction4", props); + + _color1 = FindProperty("_Color1", props); + _color2 = FindProperty("_Color2", props); + _color3 = FindProperty("_Color3", props); + _color4 = FindProperty("_Color4", props); + + _exponent1 = FindProperty("_Exponent1", props); + _exponent2 = FindProperty("_Exponent2", props); + _exponent3 = FindProperty("_Exponent3", props); + _exponent4 = FindProperty("_Exponent4", props); + } + + public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) + { + FindProperties(properties); + if (ShaderPropertiesGUI(materialEditor) || _initial) + foreach (Material m in materialEditor.targets) + UpdateMaterial(m); + _initial = false; + } + + bool ShaderPropertiesGUI(MaterialEditor materialEditor) + { + EditorGUI.BeginChangeCheck(); + + materialEditor.ShaderProperty(_baseColor, "Base Color"); + materialEditor.ShaderProperty(_exposure, "Exposure"); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField("Gradient 1"); + Vector3Property(materialEditor, _direction1, "Direction"); + materialEditor.ShaderProperty(_color1, "Color"); + materialEditor.ShaderProperty(_exponent1, "Exponent"); + EditorGUILayout.Space(); + + materialEditor.ShaderProperty(_switch2, "Gradient 2"); + if (_switch2.floatValue > 0) + { + Vector3Property(materialEditor, _direction2, "Direction"); + materialEditor.ShaderProperty(_color2, "Color"); + materialEditor.ShaderProperty(_exponent2, "Exponent"); + EditorGUILayout.Space(); + } + + materialEditor.ShaderProperty(_switch3, "Gradient 3"); + if (_switch3.floatValue > 0) + { + Vector3Property(materialEditor, _direction3, "Direction"); + materialEditor.ShaderProperty(_color3, "Color"); + materialEditor.ShaderProperty(_exponent3, "Exponent"); + EditorGUILayout.Space(); + } + + materialEditor.ShaderProperty(_switch4, "Gradient 4"); + if (_switch4.floatValue > 0) + { + Vector3Property(materialEditor, _direction4, "Direction"); + materialEditor.ShaderProperty(_color4, "Color"); + materialEditor.ShaderProperty(_exponent4, "Exponent"); + } + + return EditorGUI.EndChangeCheck(); + } + + void Vector3Property(MaterialEditor materialEditor, MaterialProperty prop, string label) + { + EditorGUI.BeginChangeCheck(); + EditorGUI.showMixedValue = prop.hasMixedValue; + var newValue = EditorGUILayout.Vector3Field(label, prop.vectorValue); + EditorGUI.showMixedValue = false; + if (EditorGUI.EndChangeCheck()) prop.vectorValue = newValue; + } + + void UpdateMaterial(Material m) + { + Vector3 d1 = m.GetVector("_Direction1"); + Vector3 d2 = m.GetVector("_Direction2"); + Vector3 d3 = m.GetVector("_Direction3"); + Vector3 d4 = m.GetVector("_Direction4"); + m.SetVector("_NormalizedVector1", d1.normalized); + m.SetVector("_NormalizedVector2", d2.normalized); + m.SetVector("_NormalizedVector3", d3.normalized); + m.SetVector("_NormalizedVector4", d4.normalized); + } + } +} diff --git a/Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs.meta b/Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs.meta new file mode 100644 index 0000000..59d3539 --- /dev/null +++ b/Assets/SkyboxPlus/Editor/GradientsMaterialEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9d3208f7d575d46388446348b69a1903 +timeCreated: 1450164102 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SkyboxPlus/Gradients.shader b/Assets/SkyboxPlus/Gradients.shader new file mode 100644 index 0000000..4fe81b2 --- /dev/null +++ b/Assets/SkyboxPlus/Gradients.shader @@ -0,0 +1,109 @@ +Shader "SkyboxPlus/Gradients" +{ + Properties + { + [HDR] _BaseColor("Base Color", Color) = (0.1, 0.1, 0.1) + [Gamma] _Exposure("Exposure", Range(0, 8)) = 1 + + [Toggle] _Switch2("Gradient 2", Float) = 1 + [Toggle] _Switch3("Gradient 3", Float) = 1 + [Toggle] _Switch4("Gradient 4", Float) = 1 + + _Direction1("Direction 1", Vector) = (0, 1, 0) + _Direction2("Direction 2", Vector) = (0.5, 1, 0) + _Direction3("Direction 3", Vector) = (-0.3, -1, -0.2) + _Direction4("Direction 4", Vector) = (0, 1, 0) + + [HDR] _Color1("Color 1", Color) = (0.16, 0.18, 0.19) + [HDR] _Color2("Color 2", Color) = (0.26, 0.28, 0.21) + [HDR] _Color3("Color 3", Color) = (0.15, 0.15, 0.12) + [HDR] _Color4("Color 4", Color) = (1.00, 0.99, 0.95) + + _Exponent1("Exponent 1", Range(1, 20)) = 1 + _Exponent2("Exponent 2", Range(1, 20)) = 1 + _Exponent3("Exponent 3", Range(1, 20)) = 1 + _Exponent4("Exponent 4", Range(1, 20)) = 20 + + [HideInInspector] _NormalizedVector1("-", Vector) = (0, 1, 0) + [HideInInspector] _NormalizedVector2("-", Vector) = (0, 1, 0) + [HideInInspector] _NormalizedVector3("-", Vector) = (0, 1, 0) + [HideInInspector] _NormalizedVector4("-", Vector) = (0, 1, 0) + } + + CGINCLUDE + + #pragma shader_feature _SWITCH2_ON + #pragma shader_feature _SWITCH3_ON + #pragma shader_feature _SWITCH4_ON + + #include "UnityCG.cginc" + + half3 _BaseColor; + half _Exposure; + + half3 _NormalizedVector1; + half3 _NormalizedVector2; + half3 _NormalizedVector3; + half3 _NormalizedVector4; + + half3 _Color1; + half3 _Color2; + half3 _Color3; + half3 _Color4; + + half _Exponent1; + half _Exponent2; + half _Exponent3; + half _Exponent4; + + struct appdata_t { + float4 vertex : POSITION; + }; + + struct v2f { + float4 vertex : SV_POSITION; + float3 texcoord : TEXCOORD0; + }; + + v2f vert(appdata_t v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.texcoord = v.vertex.xyz; + return o; + } + + half4 frag(v2f i) : SV_Target + { + half3 d = normalize(i.texcoord.xyz); + half3 c = _BaseColor; + c += _Color1 * pow((dot(d, _NormalizedVector1) + 1) * 0.5, _Exponent1); + #ifdef _SWITCH2_ON + c += _Color2 * pow((dot(d, _NormalizedVector2) + 1) * 0.5, _Exponent2); + #endif + #ifdef _SWITCH3_ON + c += _Color3 * pow((dot(d, _NormalizedVector3) + 1) * 0.5, _Exponent3); + #endif + #ifdef _SWITCH4_ON + c += _Color4 * pow((dot(d, _NormalizedVector4) + 1) * 0.5, _Exponent4); + #endif + return half4(c * _Exposure, 1); + } + + ENDCG + + SubShader + { + Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" } + Cull Off ZWrite Off + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } + } + Fallback Off + CustomEditor "SkyboxPlus.GradientsMaterialEditor" +} diff --git a/Assets/SkyboxPlus/Gradients.shader.meta b/Assets/SkyboxPlus/Gradients.shader.meta new file mode 100644 index 0000000..298dc6b --- /dev/null +++ b/Assets/SkyboxPlus/Gradients.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1bd21c9be7f6f4549a0817ebff94e8d9 +timeCreated: 1450162157 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/SkyboxPlus/Hemisphere.shader b/Assets/SkyboxPlus/Hemisphere.shader new file mode 100644 index 0000000..7b242c4 --- /dev/null +++ b/Assets/SkyboxPlus/Hemisphere.shader @@ -0,0 +1,58 @@ +Shader "SkyboxPlus/Hemisphere" +{ + Properties + { + [HDR] _TopColor("North Pole", Color) = (0.35, 0.37, 0.42) + [HDR] _MiddleColor("Equator", Color) = (0.15, 0.15, 0.15) + [HDR] _BottomColor("South Pole", Color) = (0.12, 0.13, 0.15) + [Gamma] _Exposure("Exposure", Range(0, 8)) = 1 + } + CGINCLUDE + + #include "UnityCG.cginc" + + half3 _TopColor; + half3 _MiddleColor; + half3 _BottomColor; + half _Exposure; + + struct appdata_t { + float4 vertex : POSITION; + }; + + struct v2f { + float4 vertex : SV_POSITION; + float3 texcoord : TEXCOORD0; + }; + + v2f vert(appdata_t v) + { + v2f o; + o.vertex = UnityObjectToClipPos(v.vertex); + o.texcoord = v.vertex.xyz; + return o; + } + + half4 frag(v2f i) : SV_Target + { + half t1 = max(+i.texcoord.y, 0); + half t2 = max(-i.texcoord.y, 0); + half3 c = lerp(lerp(_MiddleColor, _TopColor, t1), _BottomColor, t2); + return half4(c * _Exposure, 1); + } + + ENDCG + SubShader + { + Tags { "Queue"="Background" "RenderType"="Background" "PreviewType"="Skybox" } + Cull Off ZWrite Off + Pass + { + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + ENDCG + } + } + Fallback Off +} diff --git a/Assets/SkyboxPlus/Hemisphere.shader.meta b/Assets/SkyboxPlus/Hemisphere.shader.meta new file mode 100644 index 0000000..24f65ff --- /dev/null +++ b/Assets/SkyboxPlus/Hemisphere.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b577cc7e2b66f4521979fd57ca0c8417 +timeCreated: 1450155716 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WorldAssets/Materials/Sky01.mat b/Assets/WorldAssets/Materials/Sky01.mat new file mode 100644 index 0000000..4962db6 --- /dev/null +++ b/Assets/WorldAssets/Materials/Sky01.mat @@ -0,0 +1,122 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Sky01 + m_Shader: {fileID: 4800000, guid: 1bd21c9be7f6f4549a0817ebff94e8d9, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BackTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DownTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _FrontTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _LeftTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _RightTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UpTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _Exponent1: 4.8 + - _Exponent2: 1 + - _Exponent3: 1 + - _Exponent4: 20 + - _Exposure: 1.86 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _Switch2: 0 + - _Switch3: 0 + - _Switch4: 0 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.046991818, g: 0.16722535, b: 0.3018868, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color1: {r: 0.25142398, g: 0.32678542, b: 0.4716981, a: 1} + - _Color2: {r: 0, g: 0, b: 0, a: 1} + - _Color3: {r: 0, g: 0, b: 0, a: 1} + - _Color4: {r: 1, g: 0.99, b: 0.95, a: 1} + - _Direction1: {r: 48.9, g: 144.9, b: -886.8, a: 0} + - _Direction2: {r: -8.85, g: 28.86, b: 0, a: 0} + - _Direction3: {r: 0, g: -1.52, b: 493.11, a: 0} + - _Direction4: {r: 0, g: 1, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _NormalizedVector1: {r: 0.054339994, g: 0.16101973, b: -0.9854541, a: 0} + - _NormalizedVector2: {r: -0.29317784, g: 0.9560579, b: 0, a: 0} + - _NormalizedVector3: {r: 0, g: -0.003082462, b: 0.99999523, a: 0} + - _NormalizedVector4: {r: 0, g: 1, b: 0, a: 0} diff --git a/Assets/WorldAssets/Materials/Sky01.mat.meta b/Assets/WorldAssets/Materials/Sky01.mat.meta new file mode 100644 index 0000000..2ec4627 --- /dev/null +++ b/Assets/WorldAssets/Materials/Sky01.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: af2e1b4d899f63e4a855cf81f5577f6f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/WorldAssets/Models/SM_Level_Rev03.fbx b/Assets/WorldAssets/Models/SM_Level_Rev03.fbx new file mode 100644 index 0000000..4b1cf4f --- /dev/null +++ b/Assets/WorldAssets/Models/SM_Level_Rev03.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e58c7e7937ba621f1817479baea66ce88eeb83f2c2e45828c711077ddc43046 +size 280864 diff --git a/Assets/WorldAssets/Models/SM_Level_Rev03.fbx.meta b/Assets/WorldAssets/Models/SM_Level_Rev03.fbx.meta new file mode 100644 index 0000000..1e8ba23 --- /dev/null +++ b/Assets/WorldAssets/Models/SM_Level_Rev03.fbx.meta @@ -0,0 +1,96 @@ +fileFormatVersion: 2 +guid: f2f5c3ab2df72ee4291515b3a6eb0aea +ModelImporter: + serializedVersion: 19300 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 1 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: