diff options
| author | yum <yum.food.vr@gmail.com> | 2024-08-17 16:06:54 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-08-17 16:06:54 -0700 |
| commit | 12d09b4bc3269a4db14b5c26fc7426cbdb6b9979 (patch) | |
| tree | 647d6eda63c8ff12c9c90d09ec180b325e19966c | |
| parent | 5b12b1708adce43915e3db703ac4f67058d28229 (diff) | |
Unity 2022.3.22f1 bugfix: instance id must be declared in tess_data
| -rw-r--r-- | tooner_lighting.cginc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc index 0bc067e..60853c6 100644 --- a/tooner_lighting.cginc +++ b/tooner_lighting.cginc @@ -32,6 +32,9 @@ struct tess_data #if defined(VERTEXLIGHT_ON) float3 vertexLightColor : TEXCOORD4; #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO }; struct tess_factors { @@ -222,10 +225,10 @@ tess_data hull_vertex(appdata v) { tess_data o; - UNITY_SETUP_INSTANCE_ID(v); UNITY_INITIALIZE_OUTPUT(tess_data, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); + UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.pos = v.vertex; //o.vertex = UnityObjectToClipPos(v.vertex); |
