From fc99d4650fe124ab8bd91bc3b5a80e01fd4ffc61 Mon Sep 17 00:00:00 2001 From: Robert Cupisz Date: Sun, 6 Nov 2016 00:21:11 +0100 Subject: [PATCH] An example of handling transparent objects. --- .../StandardAlphaBlended-VolumetricFog.mat | 34 + ...tandardAlphaBlended-VolumetricFog.mat.meta | 8 + .../StandardAlphaBlended-VolumetricFog.shader | 102 ++ ...dardAlphaBlended-VolumetricFog.shader.meta | 9 + .../Transparency and point lights.unity | 1278 +++++++++++++++++ .../Transparency and point lights.unity.meta | 8 + README.md | 11 +- 7 files changed, 1448 insertions(+), 2 deletions(-) create mode 100644 Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat create mode 100644 Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat.meta create mode 100644 Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader create mode 100644 Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader.meta create mode 100644 Assets/Scenes/Transparency and point lights.unity create mode 100644 Assets/Scenes/Transparency and point lights.unity.meta diff --git a/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat new file mode 100644 index 0000000..07ebf1f --- /dev/null +++ b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: StandardAlphaBlended-VolumetricFog + m_Shader: {fileID: 4800000, guid: 9dca33cc83d85fd409e8d3dfc9db5676, type: 3} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + - first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - first: + name: _Glossiness + second: 0.667 + - first: + name: _Metallic + second: 0 + m_Colors: + - first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 0} diff --git a/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat.meta b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat.meta new file mode 100644 index 0000000..3d5596b --- /dev/null +++ b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b92b0577b1e30bf4ab3b04c3e6a74994 +timeCreated: 1478261393 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader new file mode 100644 index 0000000..5e142f3 --- /dev/null +++ b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader @@ -0,0 +1,102 @@ +Shader "Custom/StandardAlphaBlended-VolumetricFog" +{ + Properties + { + _Color ("Color", Color) = (1,1,1,1) + _MainTex ("Albedo (RGB)", 2D) = "white" {} + _Glossiness ("Smoothness", Range(0,1)) = 0.5 + _Metallic ("Metallic", Range(0,1)) = 0.0 + } + SubShader + { + Tags {"Queue" = "Transparent" "RenderType"="Transparent" } + LOD 200 + + CGPROGRAM + + #pragma surface surf Standard fullforwardshadows alpha finalcolor:ApplyFog + #pragma target 3.0 + #pragma multi_compile _ VOLUMETRIC_FOG + + #if VOLUMETRIC_FOG + #include "../../VolumetricFog/Shaders/VolumetricFog.cginc" + #endif + + sampler2D _MainTex; + sampler2D _CameraDepthTexture; + + struct Input { + float2 uv_MainTex; + float4 screenPos; + }; + + void ApplyFog(Input IN, SurfaceOutputStandard o, inout fixed4 color) + { + #if VOLUMETRIC_FOG + half3 uvscreen = IN.screenPos.xyz/IN.screenPos.w; + half linear01Depth = Linear01Depth(uvscreen.z); + fixed4 fog = Fog(linear01Depth, uvscreen.xy); + + // Always apply fog attenuation - also in the forward add pass. + color.rgb *= fog.a; + + // Alpha premultiply mode (used with alpha and Standard lighting function, or explicitly alpha:premul) + // uses source blend factor of One instead of SrcAlpha. `color` is compensated for it, so we need to compensate + // the amount of inscattering too. A note on why this works: below. + #if _ALPHAPREMULTIPLY_ON + fog.rgb *= o.Alpha; + #endif + + // Add inscattering only once, so in forward base, but not forward add. + #ifndef UNITY_PASS_FORWARDADD + color.rgb += fog.rgb; + #endif + + // So why does multiplying the inscattered light by alpha work? + // In other words: how did fog ever work, if opaque objects add all of the inscattered light + // between them and the camera, and then the transparencies add even more? + // + // This is our scene initially: + // scene |---is0---------------------------------------> camera + // + // And that's with the transparent object added in between the opaque stuff and the camera: + // scene |---is1---> transparent |---is2---------------> camera + // + // When rendering, we start with the opaque part of the scene and add all the light inscattered between that and the camera: is0. + // Then we add the transparent object. It does two things (let's consider the alpha premultiply version): + // - Dims whatever was behind it (including is0) by OneMinusSrcAlpha + // - Adds light inscattered in front of it (is2), multiplied by Alpha + // + // So all in all we end up with this much inscattered light: + // is0 * OneMinusSrcAlpha + is2 * Alpha + // + // Judging by the diagram, though, the correct amount should be: + // is1 * OneMinusSrcAlpha + is2 + // + // Turns out the two expressions are equal - who would've thunk? + // is1 = is0 - is2 + // (is0 - is2) * OneMinusSrcAlpha + is2 + // is0 * OneMinusSrcAlpha - is2 * (1 - Alpha) + is2 + // is0 * OneMinusSrcAlpha - is2 + is2 * Alpha + is2 + // is0 * OneMinusSrcAlpha + is2 * Alpha + + // I leave figuring out if the fog attenuation is correct as an exercise to the reader ;) + #endif + } + + half _Glossiness; + half _Metallic; + fixed4 _Color; + + void surf (Input IN, inout SurfaceOutputStandard o) + { + fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; + o.Albedo = c.rgb; + o.Metallic = _Metallic; + o.Smoothness = _Glossiness; + o.Alpha = c.a; + } + ENDCG + } + FallBack "Standard" +} \ No newline at end of file diff --git a/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader.meta b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader.meta new file mode 100644 index 0000000..3842971 --- /dev/null +++ b/Assets/Scenes/Materials/StandardAlphaBlended-VolumetricFog.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9dca33cc83d85fd409e8d3dfc9db5676 +timeCreated: 1478225190 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Transparency and point lights.unity b/Assets/Scenes/Transparency and point lights.unity new file mode 100644 index 0000000..deeb8e6 --- /dev/null +++ b/Assets/Scenes/Transparency and point lights.unity @@ -0,0 +1,1278 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0, g: 0, b: 0, 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: 3 + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 4 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_DirectLightInLightProbes: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666667 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &214918139 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 214918143} + - 33: {fileID: 214918142} + - 135: {fileID: 214918141} + - 23: {fileID: 214918140} + m_Layer: 0 + m_Name: Sphere - transparent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &214918140 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 214918139} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: b92b0577b1e30bf4ab3b04c3e6a74994, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &214918141 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 214918139} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &214918142 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 214918139} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &214918143 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 214918139} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.5700002, y: -0.09000015, z: 4.23} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 10 +--- !u!1 &229278251 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 229278255} + - 33: {fileID: 229278254} + - 135: {fileID: 229278253} + - 23: {fileID: 229278252} + m_Layer: 0 + m_Name: Sphere - transparent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &229278252 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229278251} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: b92b0577b1e30bf4ab3b04c3e6a74994, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &229278253 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229278251} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &229278254 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229278251} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &229278255 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 229278251} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.6400003, y: -0.09000015, z: 4.4} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 9 +--- !u!1 &564235807 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 564235811} + - 33: {fileID: 564235810} + - 64: {fileID: 564235809} + - 23: {fileID: 564235808} + m_Layer: 0 + m_Name: Plane (3) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &564235808 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 564235807} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &564235809 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 564235807} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &564235810 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 564235807} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &564235811 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 564235807} + m_LocalRotation: {x: -0.5, y: 0.5, z: 0.5, w: 0.5} + m_LocalPosition: {x: 7.7599993, y: 8.780001, z: 3.8100002} + m_LocalScale: {x: 1.953109, y: 1.9531087, z: 1.9531087} + m_LocalEulerAnglesHint: {x: -90, y: 90, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 5 +--- !u!1 &775353824 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 775353828} + - 33: {fileID: 775353827} + - 65: {fileID: 775353826} + - 23: {fileID: 775353825} + m_Layer: 0 + m_Name: Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &775353825 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 775353824} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &775353826 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 775353824} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &775353827 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 775353824} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &775353828 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 775353824} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.5159998, y: -0.63999987, z: 3.6027324} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 1 +--- !u!1 &849426266 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 849426270} + - 33: {fileID: 849426269} + - 64: {fileID: 849426268} + - 23: {fileID: 849426267} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &849426267 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 849426266} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &849426268 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 849426266} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &849426269 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 849426266} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &849426270 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 849426266} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -1.7578278, y: -0.98770285, z: 3.6027324} + m_LocalScale: {x: 1.953109, y: 1.9531087, z: 1.9531087} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 0 +--- !u!1 &1147608811 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1147608812} + m_Layer: 0 + m_Name: Meshes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1147608812 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1147608811} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 9.88, y: 7.06, z: -5.59} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 849426270} + - {fileID: 775353828} + - {fileID: 2116681704} + - {fileID: 2137368265} + - {fileID: 1865025248} + - {fileID: 564235811} + - {fileID: 1301331062} + - {fileID: 1280021154} + - {fileID: 1906959832} + - {fileID: 229278255} + - {fileID: 214918143} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1 &1186076949 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1186076954} + - 20: {fileID: 1186076953} + - 81: {fileID: 1186076950} + - 114: {fileID: 1186076951} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1186076950 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186076949} + m_Enabled: 1 +--- !u!114 &1186076951 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186076949} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f35c02a2c6230584391703bf32006791, type: 3} + m_Name: + m_EditorClassIdentifier: + m_DebugShader: {fileID: 4800000, guid: 91e29ad407521e447a7254f5c1ea9b54, type: 3} + m_ShadowmapShader: {fileID: 4800000, guid: 2c4cd42b134f7864fa579350e9cf6896, type: 3} + m_InjectLightingAndDensity: {fileID: 7200000, guid: 55812fd61bd54104aa23612fc28bfeb8, + type: 3} + m_Scatter: {fileID: 7200000, guid: 2a7c01c2354d03a4e9c31096bf130b6a, type: 3} + m_ApplyToOpaqueShader: {fileID: 4800000, guid: 6f73df8e11615074dbf62a3a384af521, + type: 3} + m_BlurShadowmapShader: {fileID: 4800000, guid: 701192b62a7678549918bc87434699fe, + type: 3} + m_Noise: {fileID: 2800000, guid: 35eb47181d630134c97488476efbda59, type: 3} + m_Debug: 0 + m_Z: 1 + m_NearClip: 0.3 + m_FarClipMax: 100 + m_GlobalDensityMult: 1 + m_ConstantFog: 100 + m_HeightFogAmount: 0 + m_HeightFogExponent: 1 + m_HeightFogOffset: 0 + m_NoiseFogAmount: 0 + m_NoiseFogScale: 1 + m_Wind: {fileID: 0} + m_Anisotropy: 0.5 + m_GlobalIntensityMult: 1 + m_AmbientLightIntensity: 0 + m_AmbientLightColor: {r: 1, g: 1, b: 1, a: 1} + m_BlurShadowmap: 0 + m_ShadowmapDownsample: 1 + m_BlurSize: 3 + m_BlurIterations: 2 +--- !u!20 &1186076953 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186076949} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 20 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &1186076954 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1186076949} + m_LocalRotation: {x: -0.012010404, y: 0.8968499, z: -0.024396954, w: -0.44149846} + m_LocalPosition: {x: 11.12, y: 6.87, z: 0.88} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 3.0860002, y: -127.84601, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1 &1268034914 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1268034915} + m_Layer: 0 + m_Name: Lights + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1268034915 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1268034914} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 9.88, y: 7.06, z: -5.59} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1315593249} + - {fileID: 1619603707} + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!1 &1280021150 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1280021154} + - 33: {fileID: 1280021153} + - 64: {fileID: 1280021152} + - 23: {fileID: 1280021151} + m_Layer: 0 + m_Name: Plane (5) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1280021151 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1280021150} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &1280021152 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1280021150} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1280021153 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1280021150} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1280021154 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1280021150} + m_LocalRotation: {x: 1, y: -0, z: -0, w: 0} + m_LocalPosition: {x: -1.7578278, y: 11.960001, z: 3.6027324} + m_LocalScale: {x: 1.953109, y: 1.9531087, z: 1.9531087} + m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 7 +--- !u!1 &1301331058 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1301331062} + - 33: {fileID: 1301331061} + - 64: {fileID: 1301331060} + - 23: {fileID: 1301331059} + m_Layer: 0 + m_Name: Plane (4) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1301331059 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1301331058} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &1301331060 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1301331058} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1301331061 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1301331058} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1301331062 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1301331058} + m_LocalRotation: {x: -0.5, y: -0.5, z: -0.5, w: 0.5} + m_LocalPosition: {x: -11.54, y: 8.690001, z: 3.6600003} + m_LocalScale: {x: 1.953109, y: 1.9531087, z: 1.9531087} + m_LocalEulerAnglesHint: {x: -90, y: -90, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 6 +--- !u!1001 &1315593248 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1268034915} + m_Modifications: + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalPosition.x + value: -18.808472 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalPosition.y + value: -3.632953 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalPosition.z + value: 5.376822 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: a81286e4a5a12aa41825352231edaae9, type: 2} + m_IsPrefabParent: 0 +--- !u!4 &1315593249 stripped +Transform: + m_PrefabParentObject: {fileID: 4000012687929690, guid: a81286e4a5a12aa41825352231edaae9, + type: 2} + m_PrefabInternal: {fileID: 1315593248} +--- !u!1 &1619603704 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1619603707} + - 108: {fileID: 1619603706} + - 114: {fileID: 1619603705} + m_Layer: 0 + m_Name: Point light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1619603705 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1619603704} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 097385f2a510795498370c4d62e61572, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IntensityMult: 1 + m_RangeMult: 1 + m_BlurShadowmapShader: {fileID: 4800000, guid: 701192b62a7678549918bc87434699fe, + type: 3} + m_CopyShadowParamsShader: {fileID: 4800000, guid: 33fc45db43408764c8dd7647b877e561, + type: 3} + m_ForceOnForFog: 0 + m_Shadows: 0 + m_ShadowmapRes: 256 + m_BlurIterations: 0 + m_BlurSize: 1 + m_ESMExponent: 40 + m_Bounded: 1 +--- !u!108 &1619603706 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1619603704} + m_Enabled: 1 + serializedVersion: 7 + m_Type: 2 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1619603707 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1619603704} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.3000002, y: 1.3399997, z: 5.4700003} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1268034915} + m_RootOrder: 1 +--- !u!1 &1865025244 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1865025248} + - 33: {fileID: 1865025247} + - 64: {fileID: 1865025246} + - 23: {fileID: 1865025245} + m_Layer: 0 + m_Name: Plane (2) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1865025245 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1865025244} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &1865025246 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1865025244} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &1865025247 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1865025244} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1865025248 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1865025244} + m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -1.7578278, y: 8.780001, z: 13} + m_LocalScale: {x: 1.953109, y: 1.9531096, z: 1.9531096} + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 4 +--- !u!1 &1906959828 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1906959832} + - 33: {fileID: 1906959831} + - 135: {fileID: 1906959830} + - 23: {fileID: 1906959829} + m_Layer: 0 + m_Name: Sphere (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1906959829 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1906959828} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &1906959830 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1906959828} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1906959831 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1906959828} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1906959832 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1906959828} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -3.92, y: -1.0679998, z: 4.7200003} + m_LocalScale: {x: 1.9221464, y: 1.9221447, z: 1.9221447} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 8 +--- !u!1 &2116681700 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2116681704} + - 33: {fileID: 2116681703} + - 135: {fileID: 2116681702} + - 23: {fileID: 2116681701} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2116681701 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2116681700} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!135 &2116681702 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2116681700} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &2116681703 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2116681700} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2116681704 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2116681700} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -2.48, y: 0.2670002, z: 2.9220002} + m_LocalScale: {x: 1.9221464, y: 1.9221447, z: 1.9221447} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 2 +--- !u!1 &2137368261 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 2137368265} + - 33: {fileID: 2137368264} + - 64: {fileID: 2137368263} + - 23: {fileID: 2137368262} + m_Layer: 0 + m_Name: Plane (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2137368262 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2137368261} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 407b0765066496e4da88d97aa9205037, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!64 &2137368263 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2137368261} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Convex: 0 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &2137368264 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2137368261} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2137368265 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2137368261} + m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068} + m_LocalPosition: {x: -1.7578278, y: 8.780001, z: -5.9300003} + m_LocalScale: {x: 1.953109, y: 1.9531096, z: 1.9531096} + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 1147608812} + m_RootOrder: 3 diff --git a/Assets/Scenes/Transparency and point lights.unity.meta b/Assets/Scenes/Transparency and point lights.unity.meta new file mode 100644 index 0000000..d3e623f --- /dev/null +++ b/Assets/Scenes/Transparency and point lights.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 915ed33d3a042174eb51699251f87c5b +timeCreated: 1478261417 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md index 8315066..07b2895 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,21 @@ This repository contains some of the lighting effects implemented for the [Unity ##### Test scenes ![area light](http://i.imgur.com/HxwAefB.png) +Area light with shadows. + ![tube light](http://i.imgur.com/MxS8Jus.png) +Two tube lights with some locally controlled fog density. + ![tube light](http://i.imgur.com/ZSXoCYX.png) +Tube light with a shadow plane and global fog noise + wind. + +![transparency](http://i.imgur.com/Yr8Zj2S.png) +Transparent spheres and a point light. System requirements ------------------- - DX11 -- Tested in Unity 5.4.1, 5.4.2 and 5.5b10 +- Unity 5.4.1 Usage notes ----------- @@ -42,7 +50,6 @@ Usage notes Known issues and missing functionality -------------------------------------- - Directional light support disabled for now, but should be added soon. -- The fog can properly affect transparencies, but the standard shader requires a small patch for this to work. An example will be added soon. - The froxel resolution is currently hardcoded and larger view distances will cause undersampling issues along the view axis. Should be fixed soon. In the meantime use the *Far Clip Max* setting to limit how far the volumetrics are calculated. - The lights only work in deferred rendering and won't affect any objects rendered in forward. - No scaling via the transform component - currently the size and shape of the lights can only be changed via the properties of the light component. Changing the scale in the transform component doesn't work.