diff --git a/Assets/Kino/Bloom/Editor/BloomGraphDrawer.cs b/Assets/Kino/Bloom/Editor/BloomGraphDrawer.cs index 4c901d3..7a45915 100644 --- a/Assets/Kino/Bloom/Editor/BloomGraphDrawer.cs +++ b/Assets/Kino/Bloom/Editor/BloomGraphDrawer.cs @@ -34,7 +34,11 @@ public class BloomGraphDrawer // Update internal state with a given bloom instance. public void Prepare(Bloom bloom) { + #if UNITY_5_6_OR_NEWER + if (bloom.GetComponent().allowHDR) + #else if (bloom.GetComponent().hdr) + #endif { _rangeX = 6; _rangeY = 1.5f; diff --git a/Assets/Kino/Bloom/Shader/Bloom.cginc b/Assets/Kino/Bloom/Shader/Bloom.cginc index 84e78b2..a50c1e3 100644 --- a/Assets/Kino/Bloom/Shader/Bloom.cginc +++ b/Assets/Kino/Bloom/Shader/Bloom.cginc @@ -153,13 +153,8 @@ half3 UpsampleFilter(float2 uv) v2f_img vert(appdata_img v) { v2f_img o; -#if UNITY_VERSION >= 540 o.pos = UnityObjectToClipPos(v.vertex); o.uv = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); -#else - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); - o.uv = v.texcoord; -#endif return o; } @@ -173,15 +168,9 @@ struct v2f_multitex v2f_multitex vert_multitex(appdata_img v) { v2f_multitex o; -#if UNITY_VERSION >= 540 o.pos = UnityObjectToClipPos(v.vertex); o.uvMain = UnityStereoScreenSpaceUVAdjust(v.texcoord, _MainTex_ST); o.uvBase = UnityStereoScreenSpaceUVAdjust(v.texcoord, _BaseTex_ST); -#else - o.pos = mul(UNITY_MATRIX_MVP, v.vertex); - o.uvMain = v.texcoord; - o.uvBase = v.texcoord; -#endif #if UNITY_UV_STARTS_AT_TOP if (_BaseTex_TexelSize.y < 0.0) o.uvBase.y = 1.0 - v.texcoord.y; diff --git a/Assets/SkyboxPlus/Cubemap.shader b/Assets/SkyboxPlus/Cubemap.shader index 1f791c4..c33e6a6 100644 --- a/Assets/SkyboxPlus/Cubemap.shader +++ b/Assets/SkyboxPlus/Cubemap.shader @@ -47,7 +47,7 @@ Shader "SkyboxPlus/Cubemap" v2f o; float3x3 m = float3x3(_Rotation1.xyz, _Rotation2.xyz, _Rotation3.xyz); float4 vp = float4(mul(m, v.vertex.xyz), v.vertex.w); - o.vertex = mul(UNITY_MATRIX_MVP, vp); + o.vertex = UnityObjectToClipPos(vp); o.texcoord = v.vertex.xyz; return o; } diff --git a/Assets/SkyboxPlus/Gradients.shader b/Assets/SkyboxPlus/Gradients.shader index 4b5fcb6..4fe81b2 100644 --- a/Assets/SkyboxPlus/Gradients.shader +++ b/Assets/SkyboxPlus/Gradients.shader @@ -68,7 +68,7 @@ Shader "SkyboxPlus/Gradients" v2f vert(appdata_t v) { v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + o.vertex = UnityObjectToClipPos(v.vertex); o.texcoord = v.vertex.xyz; return o; } diff --git a/Assets/SkyboxPlus/Hemisphere.shader b/Assets/SkyboxPlus/Hemisphere.shader index 8e6e22d..7b242c4 100644 --- a/Assets/SkyboxPlus/Hemisphere.shader +++ b/Assets/SkyboxPlus/Hemisphere.shader @@ -28,7 +28,7 @@ Shader "SkyboxPlus/Hemisphere" v2f vert(appdata_t v) { v2f o; - o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); + o.vertex = UnityObjectToClipPos(v.vertex); o.texcoord = v.vertex.xyz; return o; }