File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ Change Log -- Ray Tracing in One Weekend
34
34
- Change: Broad rewrite of time management for moving objects, primarily ` camera ` and
35
35
` moving_sphere ` , but also impacting the API for ` hittable::bounding_box() ` (#799 )
36
36
- Fix: Fixed ` bvh_node ` constructor definition signature (#872 )
37
+ - Fix: Fixed scaling for final Perlin noise texture (#896 ).
37
38
38
39
### The Rest of Your Life
39
40
- Fix: Added missing functionality for ` isotropic ` (#664 )
Original file line number Diff line number Diff line change 2195
2195
2196
2196
color value(double u, double v, const point3& p) const override {
2197
2197
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
2198
- return color(1,1,1) * noise.turb(scale * p);
2198
+ auto s = scale * p;
2199
+ return color(1,1,1) * noise.turb(s);
2199
2200
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
2200
2201
}
2201
2202
2232
2233
2233
2234
color value(double u, double v, const point3& p) const override {
2234
2235
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
2235
- return color(1,1,1) * 0.5 * (1 + sin(scale*p.z() + 10*noise.turb(p)));
2236
+ auto s = scale * p;
2237
+ return color(1,1,1) * 0.5 * (1 + sin(s.z() + 10*noise.turb(s)));
2236
2238
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
2237
2239
}
2238
2240
Original file line number Diff line number Diff line change 32
32
- Dan Drummond
33
33
- [David Chambers](https://github.com/dafhi)
34
34
- David Hart
35
+ - [Dmitry Lomov](https://github.com/mu-lambda)
35
36
- [Eric Haines](https://github.com/erich666)
36
37
- Fabio Sancinetti
37
38
- Filipe Scur
Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ class noise_texture : public texture {
78
78
noise_texture (double sc) : scale(sc) {}
79
79
80
80
color value (double u, double v, const point3& p) const override {
81
- return color (1 ,1 ,1 )*0.5 *(1 + sin (scale*p.z () + 10 *noise.turb (p)));
81
+ auto s = scale * p;
82
+ return color (1 ,1 ,1 )*0.5 *(1 + sin (s.z () + 10 *noise.turb (s)));
82
83
}
83
84
84
85
public:
You can’t perform that action at this time.
0 commit comments