diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-14 23:00:42 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-14 23:00:42 -0800 |
| commit | d1eb208ecbeba1ab7bf894d9f14d2652739bc63e (patch) | |
| tree | f80778fef335ea69fb1cb8892e908a56be0fef1b /pbr.cginc | |
| parent | f0d753b1cfa07079886abe0c3c5fc7ee75b426fd (diff) | |
Impostors: integrate into 3ner
Diffstat (limited to 'pbr.cginc')
| -rw-r--r-- | pbr.cginc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -6,6 +6,7 @@ #include "instancing.cginc" #include "interpolators.cginc" #include "texture_utils.cginc" +#include "impostor.cginc" struct Pbr { float4 albedo; @@ -159,9 +160,14 @@ Pbr getPbr(v2f i) { float2 uv_parallax = i.uv01.xy; #endif // _PARALLAX_HEIGHTMAP +#if defined(_IMPOSTORS) + pbr.albedo = impostor_frag(i.worldPos); + pbr.albedo *= _Color; +#else pbr.albedo = _MainTex.Sample(aniso16_trilinear_repeat_s, uv_parallax * _MainTex_ST.xy + _MainTex_ST.zw); pbr.albedo *= _Color; apply_marble(i.worldPos, pbr.albedo.xyz); +#endif float3 normal_tangent = UnpackNormal(_BumpMap.Sample(aniso16_trilinear_repeat_s, uv_parallax * _BumpMap_ST.xy)); normal_tangent.xy *= _BumpScale; |
