diff options
Diffstat (limited to 'pbr.cginc')
| -rwxr-xr-x | pbr.cginc | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -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 } |
