diff options
Diffstat (limited to 'pbr.cginc')
| -rwxr-xr-x | pbr.cginc | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -132,8 +132,19 @@ void apply_marble(float3 world_pos, inout float3 albedo) { uvw += offset; +#if 1 float3 noise = domain_warp_procedural(uvw, _Marble_Strength, _Marble_Octaves, _Marble_Lacunarity, _Marble_Gain); +#elif 1 + float3 noise = hash31_fast(uvw*32); +#elif 0 + float3 noise = value_noise3(uvw); +#elif 0 + float3 noise = value_noise_3d_tex(_Marble_Noise, trilinear_repeat_s, uvw); +#else + float3 noise = domain_warp_3d_tex(_Marble_Noise, trilinear_repeat_s, uvw, + _Marble_Strength, _Marble_Octaves, _Marble_Lacunarity, _Marble_Gain); +#endif noise = _Marble_Post_Ramp.Sample(linear_clamp_s, float2(noise.x, 0)); @@ -153,12 +164,7 @@ void apply_kintsugi(float3 world_pos, inout float3 albedo, inout float smoothnes uvw += warp; #endif -#if defined(_KINTSUGI_PROCEDURAL) float mask = voronoi_edge_distance(uvw) + 0.5f; -#else - float mask = _Kintsugi_Noise.Sample(aniso4_trilinear_repeat_s, uvw); -#endif - float width = max(fwidth(mask) * 0.5f, _Kintsugi_Width); float threshold = _Kintsugi_Threshold; mask = smoothstep(threshold - width, threshold + width, mask); |
