diff options
| author | yum <yum.food.vr@gmail.com> | 2026-04-13 23:13:16 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-04-13 23:13:16 -0700 |
| commit | 07f8f3db17354c3e77aa9cb67338d451de6572d3 (patch) | |
| tree | d526eef93d3091ace08fd12d5a3a0b9737cad0c6 /pbr.cginc | |
| parent | 2791567370385c9c8d7a5aeaa64c4588346e1779 (diff) | |
Diffstat (limited to 'pbr.cginc')
| -rwxr-xr-x | pbr.cginc | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -228,8 +228,18 @@ void apply_burley_tiling(inout Pbr pbr, inout float3 normal_tangent) { void apply_zebra(float2 uv, inout float3 albedo) { #if defined(_ZEBRA) - float mask = 2.0f * voronoi_d_2d(uv * _Zebra_Scale); - albedo = lerp(albedo, 0, mask); + //float theta = 0.25 * PI; + //float theta = _Time[1]; + float theta = _Zebra_Angle * TAU; + uv.x *= _Zebra_X_Scale; + float st, ct; + sincos(theta, st, ct); + float4 phacelle = phacelle_noise_2d(uv * _Zebra_Scale, float2(ct, st)); + float2 dir = phacelle.xy; + float2 ortho_dir = phacelle.zw; + float mask = dot(dir, float2(0, 1)); + float mask_fw = fwidth(mask); + albedo = smoothstep(-mask_fw * 0.5, mask_fw * 0.5, mask); #endif } |
