-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaterial.h
More file actions
29 lines (27 loc) · 900 Bytes
/
material.h
File metadata and controls
29 lines (27 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once
#include "vector.h"
class Material {
public:
Vector3 color = Vector3(1, 1, 1);
double roughness = 1;
double emissive_strength = 0;
Vector3 emission_color = Vector3(1, 1, 1);
double specular_probability = 0;
Vector3 specular_color = Vector3(1, 1, 1);
double refraction = 0;
double refractive_index = 1;
Vector3** texture = nullptr;
Vector3** roughness_map = nullptr;
Vector3** emission_map = nullptr;
Vector3** specular_map = nullptr;
Vector3** refraction_map = nullptr;
bool has_texture = false;
bool has_roughness_map = false;
bool has_emission_map = false;
bool has_specular_map = false;
bool has_refraction_map = false;
int textures_width = 0;
int textures_height = 0;
Material() : color(1, 1, 1), roughness(1) {}
Material(const Vector3& col, double rough) : color(col), roughness(rough) {}
};