diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-30 16:31:49 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-30 16:53:14 -0700 |
| commit | 46265149d719c0ebb61b0b72d9884f8bb5a76f4b (patch) | |
| tree | a61da0218c810aefb9e65f4ebc225d72a5b4f281 /pbr.cginc | |
| parent | 789ffb5a24550e24b540484a1d84b82cddc3a571 (diff) | |
Add tangent space normal debug view; rename gaussianize.py
Diffstat (limited to 'pbr.cginc')
| -rwxr-xr-x | pbr.cginc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -42,6 +42,7 @@ float2 parallax_offset(float2 uv, float3 view_dir_world, float3x3 tbn) { float prev_depth = cur_depth; float prev_height = cur_height; + [loop] for (int i = 0; i < (int)step_count; i++) { bool was_inside = cur_depth < cur_height; if (was_inside != inside) break; @@ -401,6 +402,10 @@ Pbr getPbr(v2f i) { pbr.normal = normalize(mul(normal_tangent, pbr.tbn)); +#if defined(_DEBUG_VIEW_TANGENT_SPACE_NORMALS) + pbr.tangent_normal = normal_tangent; +#endif + #if defined(_BENT_NORMALS) float3 bent_ts = UnpackNormal(_Bent_Normals_Map.Sample( aniso4_trilinear_repeat_s, uv_parallax * _Bent_Normals_Map_ST.xy + |
