diff options
| author | yum <yum.food.vr@gmail.com> | 2024-04-25 15:52:24 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-04-25 15:52:24 -0700 |
| commit | 6eed98ff4e57326ebf7a41f0c180635a7bcac626 (patch) | |
| tree | 67f5e269bafb49608cab8a6b22534d83fd09b58b /tooner_outline_pass.cginc | |
| parent | b9671b47df8b17fa3143d4b0dbdecf9b77cc7607 (diff) | |
Add LTCGI
Also begin trying to fix fallback shaders.
Diffstat (limited to 'tooner_outline_pass.cginc')
| -rw-r--r-- | tooner_outline_pass.cginc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tooner_outline_pass.cginc b/tooner_outline_pass.cginc index eba7470..a2b222b 100644 --- a/tooner_outline_pass.cginc +++ b/tooner_outline_pass.cginc @@ -25,7 +25,7 @@ struct tess_factors { v2f vert(appdata v) { - float outline_mask = _Outline_Mask.SampleLevel(linear_repeat_s, v.uv, /*lod=*/1); + float outline_mask = _Outline_Mask.SampleLevel(linear_repeat_s, v.uv0.xy, /*lod=*/1); outline_mask = _Outline_Mask_Invert > 1E-6 ? 1 - outline_mask : outline_mask; float4 position = v.vertex; @@ -63,14 +63,17 @@ v2f vert(appdata v) o.worldPos = mul(unity_ObjectToWorld, v.vertex); o.clipPos = UnityObjectToClipPos(v.vertex); o.normal = normal; - o.uv = v.uv; + o.uv = v.uv0.xy; + #if defined(LIGHTMAP_ON) + o.lmuv = v.uv1 * unity_LightmapST.xy + unity_LightmapST.zw + #endif return o; } tess_data hull_vertex(appdata v) { - float outline_mask = _Outline_Mask.SampleLevel(linear_repeat_s, v.uv, /*lod=*/3); + float outline_mask = _Outline_Mask.SampleLevel(linear_repeat_s, v.uv0.xy, /*lod=*/3); outline_mask = _Outline_Mask_Invert > 1E-6 ? 1 - outline_mask : outline_mask; float4 position = v.vertex; @@ -95,7 +98,7 @@ tess_data hull_vertex(appdata v) tess_data o; o.vertex = v.vertex; o.normal = normal; - o.uv = v.uv; + o.uv = v.uv0.xy; return o; } |
