diff options
| author | yum <yum.food.vr@gmail.com> | 2026-02-24 19:09:23 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-02-24 19:09:23 -0800 |
| commit | 80d511162ca90e29fd26c9a5893cde7aa9c23332 (patch) | |
| tree | 12c7bd37084b7ded5eb2472ca2b5bcc6d8e8d69b /3ner.cginc | |
| parent | 610607592438452e181eba98f05d58f838975266 (diff) | |
Add outline pass
Diffstat (limited to '3ner.cginc')
| -rwxr-xr-x | 3ner.cginc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -24,6 +24,9 @@ v2f vert(appdata v) { #if defined(SHADOW_CASTER_PASS) && !defined(_SHADOW_CASTER) return (v2f) asfloat(-1); #endif +#if defined(OUTLINES_PASS) && !defined(_OUTLINES) + return (v2f) asfloat(-1); +#endif v2f o; UNITY_SETUP_INSTANCE_ID(v); @@ -33,6 +36,11 @@ v2f vert(appdata v) { impostor_vert(v.vertex.xyz); +#if defined(OUTLINES_PASS) && defined(_OUTLINES) + float thickness = _Outlines_Thickness.SampleLevel(point_repeat_s, v.uv0, 0).r; + v.vertex.xyz += v.normal * _Outlines_Width * thickness; +#endif + #if defined(_VERTEX_DEFORMATION) && ( \ defined(_VERTEX_DEFORMATION_FRAGMENT_NORMALS) || \ defined(_VERTEX_DEFORMATION_TESSELLATION)) || \ |
