diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-02-04 13:55:45 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-02-04 13:55:45 +0900 |
| commit | 2052cbaaa4bf6248c704431b5700db3d16a41241 (patch) | |
| tree | 11cc1b6e6167e4ceed76e31ab75175925d23f0fb | |
| parent | d3e46dfda0a4d376c4648ecad5012e2302ddcea6 (diff) | |
| download | RayTracingInOneWeekend.zig-2052cbaaa4bf6248c704431b5700db3d16a41241.tar.gz RayTracingInOneWeekend.zig-2052cbaaa4bf6248c704431b5700db3d16a41241.tar.zst RayTracingInOneWeekend.zig-2052cbaaa4bf6248c704431b5700db3d16a41241.zip | |
5.7
| -rw-r--r-- | src/rtw/texture.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rtw/texture.zig b/src/rtw/texture.zig index 6322ac0..ae24265 100644 --- a/src/rtw/texture.zig +++ b/src/rtw/texture.zig @@ -99,6 +99,6 @@ pub const NoiseTexture = struct { fn value(tx: NoiseTexture, u: f64, v: f64, p: Vec3) Color { _ = u; _ = v; - return rgb(1, 1, 1).mul(tx.perlin.turb(p.mul(tx.scale), 7)); + return rgb(1, 1, 1).mul(0.5 * (1.0 + @sin(tx.scale * p.z + 10.0 * tx.perlin.turb(p, 7)))); } }; |
