add Lambertian material
This commit is contained in:
parent
3296ea3e81
commit
b3c47a914f
7 changed files with 85 additions and 19 deletions
|
@ -30,7 +30,7 @@ pub const Camera = struct {
|
|||
pub fn getRay(self: Camera, u: f32, v: f32) Ray {
|
||||
return Ray{
|
||||
.origin = self.origin,
|
||||
.direction = self.lowerLeftCorner.add(self.horizontal.mul(u)).add(self.vertical.mul(v)).sub(self.origin),
|
||||
.direction = self.lowerLeftCorner.add(self.horizontal.mul_s(u)).add(self.vertical.mul_s(v)).sub(self.origin),
|
||||
};
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue