aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-02-04 13:55:45 +0900
committernsfisis <nsfisis@gmail.com>2023-02-04 13:55:45 +0900
commit2052cbaaa4bf6248c704431b5700db3d16a41241 (patch)
tree11cc1b6e6167e4ceed76e31ab75175925d23f0fb
parentd3e46dfda0a4d376c4648ecad5012e2302ddcea6 (diff)
downloadRayTracingInOneWeekend.zig-2052cbaaa4bf6248c704431b5700db3d16a41241.tar.gz
RayTracingInOneWeekend.zig-2052cbaaa4bf6248c704431b5700db3d16a41241.tar.zst
RayTracingInOneWeekend.zig-2052cbaaa4bf6248c704431b5700db3d16a41241.zip
5.7
-rw-r--r--src/rtw/texture.zig2
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))));
}
};