diff --git a/Assets/Depth Renderer.mat b/Assets/Depth Renderer.mat new file mode 100644 index 0000000..0e01ff8 --- /dev/null +++ b/Assets/Depth Renderer.mat @@ -0,0 +1,36 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Depth Renderer + m_Shader: {fileID: 4800000, guid: 2f8a66720f8c7d74eabeab17a9170ebf, type: 3} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _DepthStart + second: 0 + data: + first: + name: _DepthEnd + second: 100 + m_Colors: + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Depth Renderer.mat.meta b/Assets/Depth Renderer.mat.meta new file mode 100644 index 0000000..b47a7f9 --- /dev/null +++ b/Assets/Depth Renderer.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: ef43153a5cd66dd4599c71b66560acca +NativeFormatImporter: + userData: diff --git a/Assets/Depth.unity b/Assets/Depth.unity index 8e74971..c823f33 100644 --- a/Assets/Depth.unity +++ b/Assets/Depth.unity @@ -105,9 +105,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 28c82ae3b791c4d45bf86c95a48eb9c0, type: 3} m_Name: m_EditorClassIdentifier: - depthCalculator: {fileID: 4800000, guid: 2f8a66720f8c7d74eabeab17a9170ebf, type: 3} - start: 6 - end: 15 + depthRenderer: {fileID: 4800000, guid: 2f8a66720f8c7d74eabeab17a9170ebf, type: 3} + start: 0 + end: 25 toggle: 0 --- !u!81 &118528835 AudioListener: diff --git a/Assets/DepthRenderer.cs b/Assets/DepthRenderer.cs index ad5a1f2..8037670 100644 --- a/Assets/DepthRenderer.cs +++ b/Assets/DepthRenderer.cs @@ -2,10 +2,11 @@ using System.Collections; using System.Collections.Generic; +[RequireComponent(typeof(Camera))] [ExecuteInEditMode] public class DepthRenderer : MonoBehaviour { - public Shader depthCalculator; + public Shader depthRenderer; public float start; public float end; @@ -16,8 +17,11 @@ public class DepthRenderer : MonoBehaviour { void LateUpdate() { - Shader.SetGlobalFloat("_DepthStart", start); - Shader.SetGlobalFloat("_DepthEnd", end); + if (activated) + { + Shader.SetGlobalFloat("_DepthStart", start); + Shader.SetGlobalFloat("_DepthEnd", end); + } if (toggle) { toggle = false; @@ -30,12 +34,12 @@ public void SetDepthRenderer(bool active, float start, float end) if (active && !activated) { activated = true; - Camera.main.SetReplacementShader(depthCalculator, ""); + camera.SetReplacementShader(depthRenderer, ""); } else if (!active && activated) { activated = false; - Camera.main.ResetReplacementShader(); + camera.ResetReplacementShader(); } } diff --git a/Assets/Iris.unity b/Assets/Iris.unity index 9aae457..f571ab4 100644 --- a/Assets/Iris.unity +++ b/Assets/Iris.unity @@ -31395,8 +31395,8 @@ Transform: m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1229397836} - m_LocalRotation: {x: 0, y: 1, z: 0, w: -1.62920685e-07} - m_LocalPosition: {x: 0, y: -11.2599993, z: -10.2399998} + m_LocalRotation: {x: -.707106829, y: 0, z: 0, w: .707106829} + m_LocalPosition: {x: .5, y: -55.8699989, z: -10.6000004} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -37287,7 +37287,7 @@ Transform: m_PrefabInternal: {fileID: 0} m_GameObject: {fileID: 1395794158} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: .5} + m_LocalPosition: {x: -0, y: 0, z: .50999999} m_LocalScale: {x: 1.06416547, y: 1, z: 1} m_Children: [] m_Father: {fileID: 876576019} @@ -43384,7 +43384,7 @@ Camera: m_CullingMask: serializedVersion: 2 m_Bits: 4294967295 - m_RenderingPath: -1 + m_RenderingPath: 2 m_TargetTexture: {fileID: 0} m_TargetDisplay: 0 m_HDR: 0 @@ -43497,7 +43497,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 28c82ae3b791c4d45bf86c95a48eb9c0, type: 3} m_Name: m_EditorClassIdentifier: - blackMaterial: {fileID: 2100000, guid: 03d14de929668fd4e94e279c189f5411, type: 2} + depthRenderer: {fileID: 4800000, guid: 2f8a66720f8c7d74eabeab17a9170ebf, type: 3} start: 0 end: 100 toggle: 0 diff --git a/Assets/Scripts/Utils/Tiny/Screenshotter.cs b/Assets/Scripts/Utils/Tiny/Screenshotter.cs index 72aa325..b3733a2 100644 --- a/Assets/Scripts/Utils/Tiny/Screenshotter.cs +++ b/Assets/Scripts/Utils/Tiny/Screenshotter.cs @@ -23,6 +23,7 @@ void Update () { string path = Path.GetFullPath(folder + filename); Application.CaptureScreenshot(path, screenshotScale); SubtitlesManager.ShowSubtitle(3f, "Iris", "Screenshot saved at \n\n" + path); + Debug.Log("Screenshot saved at \n\n" + path); /* the below script doesnt work... why? if (File.Exists(path)) diff --git a/Legend of Iris (742 x 627) 2015-03-14 11.36.07.png b/Legend of Iris (742 x 627) 2015-03-14 11.36.07.png new file mode 100644 index 0000000..c94346a Binary files /dev/null and b/Legend of Iris (742 x 627) 2015-03-14 11.36.07.png differ diff --git a/Legend of Iris (742 x 627) 2015-03-14 11.36.32.png b/Legend of Iris (742 x 627) 2015-03-14 11.36.32.png new file mode 100644 index 0000000..c94346a Binary files /dev/null and b/Legend of Iris (742 x 627) 2015-03-14 11.36.32.png differ diff --git a/Legend of Iris (742 x 627) 2015-03-14 11.36.39.png b/Legend of Iris (742 x 627) 2015-03-14 11.36.39.png new file mode 100644 index 0000000..c283263 Binary files /dev/null and b/Legend of Iris (742 x 627) 2015-03-14 11.36.39.png differ