From a57eca5f6f8756209018d034a12e0d75f9ee1ef5 Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 29 Jun 2024 03:17:55 -0700 Subject: Add basic decals Also add polar masking rim lighting. Polar masking calculates the angle of the matcap UV (theta) and evalutes this function: m_{polar} = 1 / (1 + length(theta - theta_{configured}) It then masks the rim lighting effect using m_{polar}. Quantization applies to this effect. --- feature_macros.cginc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'feature_macros.cginc') diff --git a/feature_macros.cginc b/feature_macros.cginc index 231cd5d..885ffad 100644 --- a/feature_macros.cginc +++ b/feature_macros.cginc @@ -24,9 +24,11 @@ #pragma shader_feature_local _ _RIM_LIGHTING0 #pragma shader_feature_local _ _RIM_LIGHTING0_MASK #pragma shader_feature_local _ _RIM_LIGHTING0_GLITTER +#pragma shader_feature_local _ _RIM_LIGHTING0_POLAR_MASK #pragma shader_feature_local _ _RIM_LIGHTING1 #pragma shader_feature_local _ _RIM_LIGHTING1_MASK #pragma shader_feature_local _ _RIM_LIGHTING1_GLITTER +#pragma shader_feature_local _ _RIM_LIGHTING1_POLAR_MASK #pragma shader_feature_local _ _OKLAB #pragma shader_feature_local _ _CLONES #pragma shader_feature_local _ _PBR_OVERLAY0 @@ -73,6 +75,10 @@ #pragma shader_feature_local _ _PBR_OVERLAY3_MIX_ADD #pragma shader_feature_local _ _PBR_OVERLAY3_MIX_MIN #pragma shader_feature_local _ _PBR_OVERLAY3_MIX_MAX +#pragma shader_feature_local _ _DECAL0 +#pragma shader_feature_local _ _DECAL1 +#pragma shader_feature_local _ _DECAL2 +#pragma shader_feature_local _ _DECAL3 #pragma shader_feature_local _ _LTCGI #pragma shader_feature_local _ _TESSELLATION #pragma shader_feature_local _ _MATCAP0_DISTORTION0 -- cgit v1.2.3