Skip to content

Commit

Permalink
Updated with 5.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
keijiro committed Apr 16, 2017
1 parent 465a920 commit 78bf70b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
4 changes: 4 additions & 0 deletions Assets/Kino/Bloom/Editor/BloomGraphDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Camera>().allowHDR)
#else
if (bloom.GetComponent<Camera>().hdr)
#endif
{
_rangeX = 6;
_rangeY = 1.5f;
Expand Down
11 changes: 0 additions & 11 deletions Assets/Kino/Bloom/Shader/Bloom.cginc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Assets/SkyboxPlus/Cubemap.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/SkyboxPlus/Gradients.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/SkyboxPlus/Hemisphere.shader
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 78bf70b

Please sign in to comment.