Skip to content

Commit

Permalink
Fix some shader compilation errors
Browse files Browse the repository at this point in the history
[CI BUILD]
  • Loading branch information
andybak committed Dec 6, 2023
1 parent f5b9b33 commit 2566c26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -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;
Expand All @@ -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 {
Expand All @@ -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);
}
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 2566c26

Please sign in to comment.