summaryrefslogtreecommitdiffstats
path: root/pbr.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'pbr.cginc')
-rwxr-xr-xpbr.cginc16
1 files changed, 11 insertions, 5 deletions
diff --git a/pbr.cginc b/pbr.cginc
index e0cf64f..dac9e1f 100755
--- a/pbr.cginc
+++ b/pbr.cginc
@@ -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);