summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-01-16 15:35:54 -0800
committeryum <yum.food.vr@gmail.com>2026-01-16 15:35:54 -0800
commit02c32fcc30e753da96f0aa072ed1d74ca300979c (patch)
treea580f5ec83ea23ec3b6b1c5e9c94266e531bb9e6 /pbr.cginc
parent5731b075b2ffa40b4f059a01ec0c105e681bf43e (diff)
Impostors: fix bounding sphere scale
Diffstat (limited to 'pbr.cginc')
-rw-r--r--pbr.cginc4
1 files changed, 4 insertions, 0 deletions
diff --git a/pbr.cginc b/pbr.cginc
index 6a14655..2aa6be7 100644
--- a/pbr.cginc
+++ b/pbr.cginc
@@ -24,6 +24,9 @@ struct Pbr {
float cl_strength;
float3 cl_color;
#endif
+#if defined(_IMPOSTORS)
+ float3 objPos;
+#endif
};
#define MIN_PERCEPTUAL_ROUGHNESS 5e-2f
@@ -166,6 +169,7 @@ Pbr getPbr(v2f i) {
pbr.normal = imp.normal;
pbr.smoothness = imp.smoothness;
pbr.metallic = imp.metallic;
+ pbr.objPos = imp.objPos;
#else
pbr.albedo = _MainTex.Sample(aniso16_trilinear_repeat_s, uv_parallax * _MainTex_ST.xy + _MainTex_ST.zw);
pbr.albedo *= _Color;