From 6482b8edd3ecdbf136692e910258dc452f8be71b Mon Sep 17 00:00:00 2001 From: yum Date: Thu, 6 Mar 2025 14:49:47 -0800 Subject: Add basic decal system --- globals.cginc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'globals.cginc') diff --git a/globals.cginc b/globals.cginc index 67fb1a5..79e25f4 100644 --- a/globals.cginc +++ b/globals.cginc @@ -4,6 +4,7 @@ #include "features.cginc" SamplerState linear_repeat_s; +SamplerState linear_clamp_s; sampler2D _MainTex; float4 _MainTex_ST; @@ -216,6 +217,29 @@ float _Rim_Lighting3_Quantization_Steps; #endif #endif +#define DECAL_TILING_MODE_CLAMP 0 +#define DECAL_TILING_MODE_TILE 1 + +#if defined(_DECAL0) +texture2D _Decal0_MainTex; +float4 _Decal0_MainTex_ST; +float4 _Decal0_Color; +float _Decal0_Opacity; +float _Decal0_Angle; +float _Decal0_Tiling_Mode; +#if defined(_DECAL0_NORMAL) +texture2D _Decal0_Normal; +float4 _Decal0_Normal_ST; +float _Decal0_Normal_Scale; +#endif +#if defined(_DECAL0_REFLECTIONS) +texture2D _Decal0_MetallicGlossMap; +float4 _Decal0_MetallicGlossMap_ST; +float _Decal0_Smoothness; +float _Decal0_Metallic; +#endif +#endif + #if defined(_VERTEX_DOMAIN_WARPING) float _Vertex_Domain_Warping_Spatial_Strength; float _Vertex_Domain_Warping_Spatial_Scale; -- cgit v1.2.3