diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-15 14:42:28 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-15 14:42:30 -0700 |
| commit | c6727a2be7d39323e0be050090114415d969bb49 (patch) | |
| tree | 40cd79dc90f0a28d912c6b452a492fb8f2d3515d /pbr.cginc | |
| parent | 51e625816b01773577a5f54b7504548ce1af9acd (diff) | |
Begin overhauling marble
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 } |
