diff options
| author | yum <yum.food.vr@gmail.com> | 2024-10-26 18:39:36 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2024-10-26 18:39:36 -0700 |
| commit | 8d9d6e374a3dfb5d639034dbd9bb6310c329f147 (patch) | |
| tree | 61b99b4244ab762e91cfa4b769d7704b1b2410d8 /interpolators.cginc | |
| parent | 07b1aca3f096a520cbae1d4cca18692fc69d2944 (diff) | |
Begin optimizing gerstner demo
Diffstat (limited to 'interpolators.cginc')
| -rw-r--r-- | interpolators.cginc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/interpolators.cginc b/interpolators.cginc index 43e69e9..709b29b 100644 --- a/interpolators.cginc +++ b/interpolators.cginc @@ -1,4 +1,6 @@ #include "AutoLight.cginc" +#include "feature_macros.cginc" +#define _OPTIMIZE_INTERPOLATORS #ifndef __INTERPOLATORS_INC #define __INTERPOLATORS_INC @@ -10,6 +12,7 @@ struct appdata float4 vertex : POSITION; float3 normal : NORMAL; float2 uv0 : TEXCOORD0; +#if !defined(_OPTIMIZE_INTERPOLATORS) float2 uv1 : TEXCOORD1; float2 uv2 : TEXCOORD2; float2 uv3 : TEXCOORD3; @@ -17,6 +20,7 @@ struct appdata float2 uv5 : TEXCOORD5; float2 uv6 : TEXCOORD6; float2 uv7 : TEXCOORD7; +#endif UNITY_VERTEX_INPUT_INSTANCE_ID }; @@ -25,6 +29,7 @@ struct v2f { linear noperspective centroid float4 pos : SV_POSITION; float2 uv0 : TEXCOORD0; +#if !defined(_OPTIMIZE_INTERPOLATORS) float2 uv1 : TEXCOORD1; float2 uv2 : TEXCOORD2; #if defined(LIGHTMAP_ON) @@ -36,6 +41,7 @@ struct v2f float2 uv6 : TEXCOORD6; float2 uv7 : TEXCOORD7; #endif +#endif float2 fogCoord: TEXCOORD8; SHADOW_COORDS(9) float3 worldPos : TEXCOORD10; @@ -55,6 +61,7 @@ struct appdata { float4 vertex : POSITION; float2 uv0 : TEXCOORD0; +#if !defined(_OPTIMIZE_INTERPOLATORS) float2 uv1 : TEXCOORD1; float2 uv2 : TEXCOORD2; float2 uv3 : TEXCOORD3; @@ -62,6 +69,7 @@ struct appdata float2 uv5 : TEXCOORD5; float2 uv6 : TEXCOORD6; float2 uv7 : TEXCOORD7; +#endif float3 normal : NORMAL; float4 tangent : TANGENT; @@ -72,6 +80,7 @@ struct v2f { linear noperspective centroid float4 pos : SV_POSITION; float2 uv0 : TEXCOORD0; +#if !defined(_OPTIMIZE_INTERPOLATORS) float2 uv1 : TEXCOORD1; float2 uv2 : TEXCOORD2; #if defined(LIGHTMAP_ON) @@ -83,6 +92,7 @@ struct v2f float2 uv6 : TEXCOORD6; float2 uv7 : TEXCOORD7; #endif +#endif float2 fogCoord: TEXCOORD8; #if !defined(LIGHTMAP_ON) unityShadowCoord4 _ShadowCoord : TEXCOORD9; |
