Add lights to the scene
This commit is contained in:
parent
86a9c74c1e
commit
aed523d457
1 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <cstdio>
|
||||
|
||||
#include "basics.h"
|
||||
#include "light.h"
|
||||
#include "object_sphere.h"
|
||||
#include "scene.h"
|
||||
#include "writer_png.h"
|
||||
|
@ -29,6 +30,11 @@ main(int argc,
|
|||
scene.add_shape(s2);
|
||||
scene.add_shape(s3);
|
||||
|
||||
Light *l1 = new Light(Vector3(0.0, 240.0, -100.0), 1.0);
|
||||
Light *l2 = new Light(Vector3(640.0, 240.0, -10000.0), 0.6);
|
||||
scene.add_light(l1);
|
||||
scene.add_light(l2);
|
||||
|
||||
// Render.
|
||||
scene.render();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue