summaryrefslogtreecommitdiffstats
path: root/globals.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-03-06 14:49:47 -0800
committeryum <yum.food.vr@gmail.com>2025-03-06 14:49:47 -0800
commit6482b8edd3ecdbf136692e910258dc452f8be71b (patch)
tree69d29e992004263bf699983d4828fde6025eb419 /globals.cginc
parentdfa489b6e6090388186b1d32fb126a11b42d31c5 (diff)
Add basic decal system
Diffstat (limited to 'globals.cginc')
-rw-r--r--globals.cginc24
1 files changed, 24 insertions, 0 deletions
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;