Skip to content

Commit

Permalink
Merge pull request vrm-c#826 from amamagi/fix/single-pass-instanced-i…
Browse files Browse the repository at this point in the history
…ssue

Add support for single pass instanced stereo rendering to UniUnlit shader
  • Loading branch information
ousttrue authored and Santarh committed Jul 1, 2021
1 parent 1663fd8 commit e2a355f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/VRMShaders/UniUnlit/Resources/UniUnlit.shader
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#if defined(_VERTEXCOL_MUL)
fixed4 color : COLOR;
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
};

struct v2f
Expand All @@ -54,6 +55,7 @@
#if defined(_VERTEXCOL_MUL)
fixed4 color : COLOR;
#endif
UNITY_VERTEX_OUTPUT_STEREO
};

sampler2D _MainTex;
Expand All @@ -64,6 +66,8 @@
v2f vert (appdata v)
{
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
UNITY_TRANSFER_FOG(o,o.vertex);
Expand Down

0 comments on commit e2a355f

Please sign in to comment.