aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMartin Lehoux <martin@lehoux.net>2020-04-04 19:41:57 -0700
committerMartin Lehoux <martin@lehoux.net>2020-04-04 19:41:57 -0700
commit13be7ded788fe88d5ac8d6759273516652bf1a80 (patch)
tree57d7eabb022e500e8b06089fb935c4a17c7cfbb3 /main.go
parentd233910be5eb6bdf9bb9deb6ffa0fa79f659e902 (diff)
feat - Add Lambertian material
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.go b/main.go
index 291e60f..b8f6335 100644
--- a/main.go
+++ b/main.go
@@ -20,8 +20,11 @@ func main() {
VERTICAL := Vec3D{0.0, 2.0, 0.0}
CAMERA := Camera{LOWER_LEFT_CORNER, ORIGIN, HORIZONTAL, VERTICAL}
- SPHERE := Sphere{Vec3D{0.0, 0.0, -1.0}, 0.5}
- EARTH := Sphere{Vec3D{0.0, -100.5, -1.0}, 100.0}
+ MAT_RED := Lambertian{Color{0.7, 0.3, 0.3}}
+ MAT_GREEN := Lambertian{Color{0.8, 0.8, 0.0}}
+
+ SPHERE := Sphere{Vec3D{0.0, 0.0, -1.0}, 0.5, MAT_RED}
+ EARTH := Sphere{Vec3D{0.0, -100.5, -1.0}, 100.0, MAT_GREEN}
WORLD := HitableList{EARTH, SPHERE}
frame := Frame{}