From c6727a2be7d39323e0be050090114415d969bb49 Mon Sep 17 00:00:00 2001 From: yum Date: Sun, 15 Mar 2026 14:42:28 -0700 Subject: Begin overhauling marble --- pbr.cginc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'pbr.cginc') diff --git a/pbr.cginc b/pbr.cginc index be1be5a..f172a98 100755 --- a/pbr.cginc +++ b/pbr.cginc @@ -125,15 +125,8 @@ void propagateSmoothness(inout Pbr pbr) { void apply_marble(float3 world_pos, inout float3 albedo) { #if defined(_MARBLE) float3 uvw = world_pos * _Marble_Scale; - float noise_r = sin_noise_3d_fbm(uvw + _Time[0], _Marble_Octaves, 2.0f, _Marble_Strength); - float noise_g = sin_noise_3d_fbm(uvw+3.1 + _Time[0], _Marble_Octaves, 2.0f, _Marble_Strength); - float noise_b = sin_noise_3d_fbm(uvw+3.7 + _Time[0], _Marble_Octaves, 2.0f, _Marble_Strength); - - float3 r = _Marble_U_Ramp.Sample(linear_repeat_s, float2(noise_r, 0)); - float3 g = _Marble_V_Ramp.Sample(linear_repeat_s, float2(noise_g, 0)); - float3 b = _Marble_W_Ramp.Sample(linear_repeat_s, float2(noise_b, 0)); - - albedo = r + g + b; + float3 noise = _Marble_Noise.Sample(aniso4_trilinear_repeat_s, uvw).rgb; + albedo = noise.x; #endif } -- cgit v1.2.3