cgv
Loading...
Searching...
No Matches
surface_material.h
1#pragma once
2
3#include <complex>
4#include <cgv/media/color.h>
5
6#include "lib_begin.h"
7
8namespace cgv {
9 namespace media {
10 namespace illum {
11
13enum BrdfType {
14 BT_LAMBERTIAN = 0, // use lambertian for diffuse part
15 BT_OREN_NAYAR = 1, // use oren nayar for diffuse part
16 BT_STRAUSS_DIFFUSE = 2, // use diffuse part of strauss model for diffuse part
17 // reserve one more diffuse models for future use
18 BT_PHONG = 4, // shininess in range [1,128] is computed roughness
19 BT_BLINN = 8, // shininess in range [1,128] is computed roughness
20 BT_COOK_TORRANCE = 12,
21 BT_STRAUSS = 16
22};
23
25struct CGV_API surface_material {
26 using color_type = cgv::rgb;
28 BrdfType brdf_type = BrdfType(BT_STRAUSS_DIFFUSE + BT_STRAUSS);
30 color_type diffuse_reflectance = { 0.5f };
32 float roughness = 0.5f;
34 float metalness = 0.0f;
36 float ambient_occlusion = 1.0f;
38 color_type emission = { 0.0f };
40 float transparency = 0.0f;
42 std::complex<float> propagation_slow_down = { 1.5f, 0.0f };
44 float roughness_anisotropy = 0.0f;
46 float roughness_orientation = 0.0f;
48 color_type specular_reflectance = { 1.0f };
49};
50
51 }
52 }
53}
54
55#include <cgv/config/lib_end.h>
the cgv namespace
Definition print.h:11
cgv::media::color< float, cgv::media::RGB > rgb
declare rgb color type with 32 bit components
Definition color.h:891
Stores properties of a surface material.