summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-01-18 08:52:18 -0800
committeryum <yum.food.vr@gmail.com>2026-01-18 08:52:18 -0800
commit50e451441f628aa3a28241af118700ae12147583 (patch)
tree8a815e419b1f1d8667a5323e7fec289c8be60cfa /pbr.cginc
parentb925b4b1bf79e3d6f930a4d799a7194673b62bde (diff)
Impostors: begin optimization work
Diffstat (limited to 'pbr.cginc')
-rwxr-xr-x[-rw-r--r--]pbr.cginc4
1 files changed, 3 insertions, 1 deletions
diff --git a/pbr.cginc b/pbr.cginc
index 076cf65..b7392f7 100644..100755
--- a/pbr.cginc
+++ b/pbr.cginc
@@ -24,7 +24,7 @@ struct Pbr {
float cl_strength;
float3 cl_color;
#endif
-#if defined(_IMPOSTORS)
+#if defined(_IMPOSTORS_DEPTH)
float3 objPos;
float debug; // TODO rm
#endif
@@ -170,8 +170,10 @@ Pbr getPbr(v2f i) {
pbr.normal = imp.normal;
pbr.smoothness = imp.smoothness;
pbr.metallic = imp.metallic;
+#if defined(_IMPOSTORS_DEPTH)
pbr.objPos = imp.objPos;
pbr.debug = imp.debug;
+#endif
#else
pbr.albedo = _MainTex.Sample(aniso16_trilinear_repeat_s, uv_parallax * _MainTex_ST.xy + _MainTex_ST.zw);
pbr.albedo *= _Color;