From caf02458737f93b20978f41613ad5b56e074e154 Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 12 Feb 2025 01:24:49 -0800 Subject: Add a bunch of features * stereo instancing * outlines * shadows (casting & receiving) * unity fog * blend modes * wrapped lighting (generalized half lambertian) * diffuse & specular have independent knobs Also: * fix bug where shadow caster wouldn't clip in cutout mode. * remove a bunch of unused params * use ifex to minimize size of locked materials (more to be done probably) * improve formatting --- interpolators.cginc | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'interpolators.cginc') diff --git a/interpolators.cginc b/interpolators.cginc index f3c18aa..56b5f60 100644 --- a/interpolators.cginc +++ b/interpolators.cginc @@ -4,20 +4,27 @@ #include "AutoLight.cginc" struct appdata { - float4 vertex : POSITION; - float2 uv : TEXCOORD0; - float3 normal : NORMAL; - float4 tangent : TANGENT; + float4 vertex : POSITION; + float2 uv : TEXCOORD0; + float2 uv1 : TEXCOORD1; + float3 normal : NORMAL; + float4 tangent : TANGENT; + + UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { - float2 uv : TEXCOORD0; - float4 pos : SV_POSITION; - float3 worldPos : TEXCOORD1; - float3 normal : TEXCOORD2; - float3 tangent : TEXCOORD3; + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float3 worldPos : TEXCOORD1; + float3 normal : TEXCOORD2; + float3 tangent : TEXCOORD3; float3 bitangent : TEXCOORD4; - SHADOW_COORDS(5) + float4 eyeVec : TEXCOORD5; // eyeVec.xyz | fogCoord + UNITY_LIGHTING_COORDS(6,7) + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO }; #endif // __INTERPOLATORS_INC -- cgit v1.2.3