Skip to content

Commit

Permalink
Fix TF shader (support single instance stereo)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlavik1 committed Aug 10, 2023
1 parent 2ebba86 commit 094b669
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Shaders/TransferFunctionShader.shader
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@

struct appdata
{
UNITY_VERTEX_INPUT_INSTANCE_ID
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};

struct v2f
{
UNITY_VERTEX_OUTPUT_STEREO
float2 uv : TEXCOORD0;
UNITY_FOG_COORDS(1)
float4 vertex : SV_POSITION;
Expand All @@ -41,6 +43,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 = v.uv;
UNITY_TRANSFER_FOG(o,o.vertex);
Expand Down

0 comments on commit 094b669

Please sign in to comment.