Skip to content

Commit

Permalink
Fix builtin forward simple shader (fixes atteneder#594)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kushulain committed Apr 11, 2023
1 parent 197f3b7 commit 7591189
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ VertexOutputBaseSimple vertForwardBaseSimple (VertexInput v)
{
UNITY_SETUP_INSTANCE_ID(v);
VertexOutputBaseSimple o;
UNITY_INITIALIZE_OUTPUT(VertexOutputBaseSimple, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);

#ifdef UNITY_COLORSPACE_GAMMA
o.color.rgb = LinearToGammaSpace(v.color.rgb);
o.color.a = v.color.a;
#else
o.color = v.color;
#endif
UNITY_INITIALIZE_OUTPUT(VertexOutputBaseSimple, o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);

float4 posWorld = mul(unity_ObjectToWorld, v.vertex);
o.pos = UnityObjectToClipPos(v.vertex);
Expand Down

0 comments on commit 7591189

Please sign in to comment.