Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…witching-tool

# Conflicts:
#	Assets/Scenes/Lighting1.unity
#	Assets/Scenes/Lighting1/LightingData.asset
#	Assets/Scenes/Lighting1/LightingData.asset.meta
#	Assets/Scenes/Lighting1/Lightmap-0_comp_dir.png
#	Assets/Scenes/Lighting1/Lightmap-0_comp_light.exr
#	Assets/Scenes/Lighting1/ReflectionProbe-0.exr
#	Assets/Scenes/Lighting1/ReflectionProbe-0.exr.meta
#	Assets/Scenes/Lighting2.unity
#	Assets/Scenes/Lighting2/LightingData.asset
#	Assets/Scenes/Lighting2/LightingData.asset.meta
#	Assets/Scenes/Lighting2/Lightmap-0_comp_dir.png
#	Assets/Scenes/Lighting2/Lightmap-0_comp_light.exr
#	Assets/Scenes/Lighting2/ReflectionProbe-0.exr
#	Assets/Scenes/Lighting2/ReflectionProbe-0.exr.meta
#	Assets/Scenes/Lighting3.unity
#	Assets/Scenes/Lighting3/LightingData.asset
#	Assets/Scenes/Lighting3/LightingData.asset.meta
#	Assets/Scenes/Lighting3/Lightmap-0_comp_dir.png
#	Assets/Scenes/Lighting3/Lightmap-0_comp_light.exr
#	Assets/Scenes/Lighting3/ReflectionProbe-0.exr
#	Assets/Scenes/Lighting3/ReflectionProbe-0.exr.meta
#	Assets/Scenes/StaticGeometry.unity
#	ProjectSettings/ProjectSettings.asset
#	ProjectSettings/ProjectVersion.txt
  • Loading branch information
laurenth committed Dec 4, 2018
2 parents 35fdc89 + e53b701 commit c488a01
Show file tree
Hide file tree
Showing 12 changed files with 347 additions and 0 deletions.
76 changes: 76 additions & 0 deletions Assets/Materials/Mirror.mat
@@ -0,0 +1,76 @@
%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: Mirror
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 1
- _GlossyReflections: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
8 changes: 8 additions & 0 deletions Assets/Materials/Mirror.mat.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Scenes/Lighting1/ReflectionProbe-1.exr
Binary file not shown.
78 changes: 78 additions & 0 deletions Assets/Scenes/Lighting1/ReflectionProbe-1.exr.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Assets/Scenes/Lighting2/Lightmap-0_comp_shadowmask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/Scenes/Lighting2/ReflectionProbe-1.exr
Binary file not shown.
78 changes: 78 additions & 0 deletions Assets/Scenes/Lighting2/ReflectionProbe-1.exr.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Scenes/Lighting3/ReflectionProbe-1.exr
Binary file not shown.
78 changes: 78 additions & 0 deletions Assets/Scenes/Lighting3/ReflectionProbe-1.exr.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Laurent Harduin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions ProjectSettings/PresetManager.asset
@@ -0,0 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1386491679 &1
PresetManager:
m_ObjectHideFlags: 0
m_DefaultList: []
2 changes: 2 additions & 0 deletions readme.md
@@ -1,4 +1,5 @@
Tool intended for switching pre-baked lightmaps and realtime lighting on a static scene at runtime.
Depending on the platform or depending on the content the switch might not be instant but take some seconds, this script just allows you avoid duplicating your scene if you just want to change the lighting.

This version is compatible with unity 2017.1 and above, check previous releases for unity 5.5 - 5.6 version.

Expand All @@ -23,3 +24,4 @@ How it works :
NEW :

- Mixed lighting mode are supported (tested only "baked indirect" and "shadowmask")
- Reflection probes supported, they need to be placed in the lighting scenes.

0 comments on commit c488a01

Please sign in to comment.