From e3a6302979fc0813f6a0cfe2463a30a79929607d Mon Sep 17 00:00:00 2001 From: yum Date: Mon, 2 Jun 2025 23:10:32 -0700 Subject: Begin work on `custom30` world Add vertex colors --- 2ner.cginc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to '2ner.cginc') diff --git a/2ner.cginc b/2ner.cginc index bac9ee6..ba8b6c8 100644 --- a/2ner.cginc +++ b/2ner.cginc @@ -4,6 +4,7 @@ #include "UnityCG.cginc" #include "UnityLightingCommon.cginc" +#include "custom30.cginc" #include "eyes.cginc" #include "face_me.cginc" #include "false_color_visualization.cginc" @@ -159,11 +160,14 @@ v2f vert(appdata v) { #if defined(SHADOW_CASTER_PASS) TRANSFER_SHADOW_CASTER_NORMALOFFSET(o); #endif + + // Vertex color + o.color = v.color; return o; } float4 frag(v2f i, uint facing : SV_IsFrontFace -#if defined(_HARNACK_TRACING) || defined(_SHATTER_WAVE) || defined(_VERTEX_DOMAIN_WARPING) +#if defined(_HARNACK_TRACING) || defined(_SHATTER_WAVE) || defined(_VERTEX_DOMAIN_WARPING) || defined(_CUSTOM30) , out float depth : SV_DepthLessEqual #endif ) : SV_Target { @@ -213,6 +217,20 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace i.uv01.xy = eye_effect_00.uv; #endif +#if defined(_CUSTOM30_BASICCUBE) + Custom30Output basic_cube_output = BasicCube(i); + i.pos = UnityObjectToClipPos(basic_cube_output.objPos); + i.normal = basic_cube_output.normal; + depth = basic_cube_output.depth; +#endif + +#if defined(_CUSTOM30_BASICWEDGE) + Custom30Output basic_wedge_output = BasicWedge(i); + i.pos = UnityObjectToClipPos(basic_wedge_output.objPos); + i.normal = basic_wedge_output.normal; + depth = basic_wedge_output.depth; +#endif + YumPbr pbr = GetYumPbr(i); #if defined(_HARNACK_TRACING) -- cgit v1.2.3