diff --git a/Assets/Resources/Brushes/Shared/Shaders/DiffuseSingleSided.shader b/Assets/Resources/Brushes/Shared/Shaders/DiffuseSingleSided.shader index 140077bfc0..013c7d769d 100644 --- a/Assets/Resources/Brushes/Shared/Shaders/DiffuseSingleSided.shader +++ b/Assets/Resources/Brushes/Shared/Shaders/DiffuseSingleSided.shader @@ -93,6 +93,7 @@ SubShader { CGPROGRAM #pragma surface surf Lambert vertex:vert alphatest:_Cutoff #pragma multi_compile __ ODS_RENDER ODS_RENDER_CM +#pragma target 4.0 #include "Assets/Shaders/Include/Brush.cginc" sampler2D _MainTex; @@ -106,7 +107,9 @@ struct Input { float2 uv_MainTex; float4 color : COLOR; uint id : SV_VertexID; + float4 vertex : POSITION; float4 screenPos; + fixed vface : VFACE; }; struct appdata_full_plus_id { @@ -123,7 +126,7 @@ struct appdata_full_plus_id { }; void vert (inout appdata_full_plus_id v, out Input o) { - UNITY_INITIALIZE_OUTPUT(Input, v); + UNITY_INITIALIZE_OUTPUT(Input, o); PrepForOds(v.vertex); v.color = TbVertToNative(v.color); } diff --git a/Assets/Resources/Brushes/Shared/Shaders/StandardDoubleSided.shader b/Assets/Resources/Brushes/Shared/Shaders/StandardDoubleSided.shader index 3938da22f5..ae5b3b2611 100644 --- a/Assets/Resources/Brushes/Shared/Shaders/StandardDoubleSided.shader +++ b/Assets/Resources/Brushes/Shared/Shaders/StandardDoubleSided.shader @@ -181,7 +181,7 @@ Properties { fixed4 frag (v2f i, fixed vface : VFACE) : SV_Target { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Opacity < 1 && Dither8x8(i.vertex.xy) >= _Opacity) discard; + if (_Opacity < 1 && Dither8x8(i.pos.xy) >= _Opacity) discard; fixed4 col = i.color; col.a = tex2D(_MainTex, i.uv).a * col.a; @@ -501,7 +501,7 @@ Properties { fixed4 frag (v2f i, fixed vface : VFACE) : SV_Target { if (_ClipEnd > 0 && !(i.id.x > _ClipStart && i.id.x < _ClipEnd)) discard; - if (_Opacity < 1 && Dither8x8(i.vertex.xy) >= _Opacity) discard; + if (_Opacity < 1 && Dither8x8(i.pos.xy) >= _Opacity) discard; fixed4 col = i.color; col.a *= tex2D(_MainTex, i.uv).a;