summaryrefslogtreecommitdiffstats
path: root/geometry.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-10-12 16:28:53 -0700
committeryum <yum.food.vr@gmail.com>2025-10-12 16:28:53 -0700
commita4bf31470f7e2855f13d922e3e7ad1c7767d9afd (patch)
treeeeefe31633142978c609c2dd2b4d6890349526a6 /geometry.cginc
parent6ac3da1b0bd363d70c2f6e4b7b921f2f929dedac (diff)
add geometry shader
Diffstat (limited to 'geometry.cginc')
-rw-r--r--geometry.cginc16
1 files changed, 16 insertions, 0 deletions
diff --git a/geometry.cginc b/geometry.cginc
new file mode 100644
index 0000000..9ddb011
--- /dev/null
+++ b/geometry.cginc
@@ -0,0 +1,16 @@
+#ifndef __GEOMETRY_INC
+#define __GEOMETRY_INC
+
+#include "interpolators.cginc"
+#include "globals.cginc"
+
+#if defined(_CENTER_OFFSET)
+float center_offset(float2 uv) {
+ float height = _Center_Offset_Heightmap.SampleLevel(point_repeat_s,
+ uv * _Center_Offset_Heightmap_ST.xy + _Center_Offset_Heightmap_ST.zw, 0).r;
+ return height * _Center_Offset_Factor;
+}
+#endif // _CENTER_OFFSET
+
+
+#endif // __GEOMETRY_INC