tweak lights to make scene more interesting
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/main.cpp
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/main.cpp
									
									
									
									
									
								
							@@ -11,8 +11,8 @@
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
 | 
			
		||||
static std::vector<Renderable*> lights {
 | 
			
		||||
    new Light(v3{0, 0, 19}, 2, v3{1, 1, 1}),
 | 
			
		||||
    new Light(v3{-7, 15, 0}, 2, v3{1, 1, 1}),
 | 
			
		||||
    new Light(v3{0, 0, 19}, 2, v3{2, 1, 1}),
 | 
			
		||||
    new Light(v3{-7, 15, 0}, 2, v3{1, 2, 2}),
 | 
			
		||||
    new Light(v3{17, -9, 16}, 2, v3{1, 1, 1}),
 | 
			
		||||
 | 
			
		||||
    // new Light(v3{0, 0, 19}, 2, v3{0.8, 0.8, 0.9}),
 | 
			
		||||
@@ -22,17 +22,17 @@ static std::vector<Renderable*> lights {
 | 
			
		||||
 | 
			
		||||
static const Material PLANE_MAT = {
 | 
			
		||||
    .specular = 0.12,
 | 
			
		||||
    .roughness = 0.55,
 | 
			
		||||
    .roughness = 0.75,
 | 
			
		||||
    .ior = 2,
 | 
			
		||||
    .transparency = 0,
 | 
			
		||||
    .colour = {1, 1, 1},
 | 
			
		||||
    .colour = {1, 0, 1},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static const Material SPHERE_MAT_TRANS = {
 | 
			
		||||
    .specular = 0.85,
 | 
			
		||||
    .roughness = 0.5,
 | 
			
		||||
    .ior = 1.2,
 | 
			
		||||
    .transparency = 0.95,
 | 
			
		||||
    .transparency = 0.75,
 | 
			
		||||
    .colour = {0, 1, 0},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -60,8 +60,6 @@ static std::vector<Renderable*> objects
 | 
			
		||||
 | 
			
		||||
static std::vector<Renderable*> scene;
 | 
			
		||||
 | 
			
		||||
// static constexpr int W = 294*2, H = 82*2;
 | 
			
		||||
// static constexpr int W = 2 * 640 * 2.9 * 1.8, H = 2 * 480 * 1.5 * 2.5;
 | 
			
		||||
static constexpr int W = 2*80, H = 2*24;
 | 
			
		||||
static constexpr choice_t ASPECT_RATIO = W/(H * 1.9);
 | 
			
		||||
 | 
			
		||||
@@ -152,7 +150,8 @@ int main()
 | 
			
		||||
	    camera.zoom /= 1.015;
 | 
			
		||||
	    break;
 | 
			
		||||
	case 'p':
 | 
			
		||||
	    printf("pos: " V3_FMT "\nrot: " V3_FMT, V3_ARG(camera.pos), V3_ARG(camera.rotation));
 | 
			
		||||
	    printf("pos: " V3_FMT, V3_ARG(camera.pos));
 | 
			
		||||
	    printf("\nrot: " V3_FMT, V3_ARG(camera.rotation));
 | 
			
		||||
	    break;
 | 
			
		||||
	case '\n':
 | 
			
		||||
	case 'q':
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user