Wildvine Engine
Referencia Doxygen del codigo propio de Wildvine Engine.
Cargando...
Buscando...
Nada coincide
MaterialInstance.h
Ir a la documentación de este archivo.
1
6#pragma once
7#include "Prerequisites.h"
9
10class Material;
11class DeviceContext;
12class Texture;
13
21class
23public:
24 void setMaterial(Material* material) { m_material = material; }
25 void setAlbedo(Texture* texture) { m_albedo = texture; }
26 void setNormal(Texture* texture) { m_normal = texture; }
27 void setMetallic(Texture* texture) { m_metallic = texture; }
28 void setRoughness(Texture* texture) { m_roughness = texture; }
29 void setAO(Texture* texture) { m_ao = texture; }
30 void setEmissive(Texture* texture) { m_emissive = texture; }
31
32 Material* getMaterial() const { return m_material; }
33 Texture* getAlbedo() const { return m_albedo; }
34 Texture* getNormal() const { return m_normal; }
35 Texture* getMetallic() const { return m_metallic; }
36 Texture* getRoughness() const { return m_roughness; }
37 Texture* getAO() const { return m_ao; }
38 Texture* getEmissive() const { return m_emissive; }
39
40 MaterialParams& getParams() { return m_params; }
41 const MaterialParams& getParams() const { return m_params; }
42
46 void bindTextures(DeviceContext& deviceContext) const;
47
48private:
49 Material* m_material = nullptr;
50 Texture* m_albedo = nullptr;
51 Texture* m_normal = nullptr;
52 Texture* m_metallic = nullptr;
53 Texture* m_roughness = nullptr;
54 Texture* m_ao = nullptr;
55 Texture* m_emissive = nullptr;
57};
58
59
Declara la API de Prerequisites dentro del subsistema Core.
Declara la API de RenderTypes dentro del subsistema Rendering.
Agrupa un material base con sus texturas y parametros concretos.
void setNormal(Texture *texture)
void setMaterial(Material *material)
MaterialParams m_params
void setEmissive(Texture *texture)
Texture * getAO() const
Texture * getAlbedo() const
Material * getMaterial() const
const MaterialParams & getParams() const
void setRoughness(Texture *texture)
Texture * getRoughness() const
void setAlbedo(Texture *texture)
Texture * getNormal() const
Texture * getMetallic() const
void setAO(Texture *texture)
void setMetallic(Texture *texture)
MaterialParams & getParams()
Texture * getEmissive() const
Describe el estado fijo compartido por una o mas instancias de material.
Definition Material.h:23
Encapsula una textura 2D en Direct3D 11, incluyendo su recurso y vista como Shader Resource.
Definition Texture.h:24