Open kvark opened 9 years ago
struct Texture; type Color = [f32; 3]; type Vector = [f32; 3]; type Scalar = f32; enum MaybeTexture<T> { Texture(Texture), Value(T), } struct Phong { diffuse: MaybeTexture<Color>, specular: MaybeTexture<Color>, normal: MaybeTexture<Vector>, glossiness: Scalar, } struct Metal { albedo: Color, reflection: Texture, glossiness: MaybeTexture<Scalar>, normal: Texture, } struct Dielectric { albedo: Texture, reflectivity: Scalar, transparency: Scalar, normal: Texture, }
Relevant info: https://disney-animation.s3.amazonaws.com/library/s2012_pbs_disney_brdf_notes_v2.pdf http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf http://www.frostbite.com/2014/11/moving-frostbite-to-pbr/