diff options
Diffstat (limited to 'pbr.cginc')
| -rwxr-xr-x | pbr.cginc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -180,8 +180,8 @@ void apply_kintsugi(float3 world_pos, inout float3 albedo, inout float smoothnes Pbr getPbr(v2f i) { Pbr pbr = (Pbr) 0; - float3 n = normalize(i.normal); - float3 t = normalize(i.tangent.xyz); + float3 n = i.normal; + float3 t = i.tangent.xyz; t = normalize(t - n * dot(n, t)); // Gram-Schmidt to avoid skew float3 b = normalize(cross(n, t)) * i.tangent.w; pbr.tbn = float3x3(t, b, n); |
