Graphics v0.0.0
A simple abstraction layer for the modern graphics APIs.
载入中...
搜索中...
未找到
Material.h
1// Copyright 2022 ShenMian
2// License(Apache-2.0)
3
4#pragma once
5
6#include "Texture.h"
7#include <string>
8
17{
18 struct PBR
19 {
20 enum Workflow : int
21 {
22 MetallicRoughness = 0,
23 SpecularGlossiness = 1
24 };
25
26 std::shared_ptr<Texture> albedo;
27 std::shared_ptr<Texture> normals;
28 std::shared_ptr<Texture> metallic;
29 std::shared_ptr<Texture> roughness;
30 std::shared_ptr<Texture> emissive;
31 std::shared_ptr<Texture> occlusion;
32
33 float albedoFactor = 1.0f;
34 float metallicFactor = 1.0f;
35 float roughnessFactor = 1.0f;
36 float emissiveFactor = 1.0f;
37 float occlusionFactor = 1.0f;
38
39 Workflow workflow;
40 };
41
42 std::string name;
43
44 PBR pbr;
45
46 std::shared_ptr<Texture> diffuse;
47 std::shared_ptr<Texture> specular;
48 std::shared_ptr<Texture> ambient;
49 std::shared_ptr<Texture> emissive;
50 std::shared_ptr<Texture> height;
51 std::shared_ptr<Texture> normals;
52 std::shared_ptr<Texture> shininess;
53 std::shared_ptr<Texture> opacity;
54};
55
Definition: Material.h:19
std::shared_ptr< Texture > roughness
粗糙.
Definition: Material.h:29
std::shared_ptr< Texture > occlusion
环境光遮蔽.
Definition: Material.h:31
std::shared_ptr< Texture > metallic
金属.
Definition: Material.h:28
std::shared_ptr< Texture > normals
法线.
Definition: Material.h:27
材质.
Definition: Material.h:17
std::shared_ptr< Texture > normals
法线.
Definition: Material.h:51
std::shared_ptr< Texture > shininess
镜面反射指数.
Definition: Material.h:52
std::shared_ptr< Texture > specular
镜面反射.
Definition: Material.h:47
std::shared_ptr< Texture > diffuse
漫反射.
Definition: Material.h:46
std::shared_ptr< Texture > ambient
环境光.
Definition: Material.h:48