diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-11 22:30:03 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-11 22:30:03 -0800 |
| commit | cbc299f489d6bdc38cce30d74040c54197efe125 (patch) | |
| tree | c5968e39e99ab521e6922316729a5120ff230734 /pbr.cginc | |
| parent | d2d4b8897ded5f399378ca447474f51eaefbf1a5 (diff) | |
Implement distance-based culling for instances
Diffstat (limited to 'pbr.cginc')
| -rw-r--r-- | pbr.cginc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3,6 +3,7 @@ #include "filamented.cginc" #include "globals.cginc" +#include "instancing.cginc" #include "interpolators.cginc" #include "texture_utils.cginc" @@ -140,6 +141,8 @@ void apply_marble(float3 world_pos, inout float3 albedo) { Pbr getPbr(v2f i) { Pbr pbr = (Pbr) 0; + instancing_frag(i); + float3 n = normalize(i.normal); float3 t = normalize(i.tangent.xyz); t = normalize(t - n * dot(n, t)); // Gram-Schmidt to avoid skew |
