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
"
8
#include "
Rendering/RenderTypes.h
"
9
10
class
Material
;
11
class
DeviceContext
;
12
class
Texture
;
13
21
class
22
MaterialInstance
{
23
public
:
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
48
private
:
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
;
56
MaterialParams
m_params
;
57
};
58
59
Prerequisites.h
Declara la API de Prerequisites dentro del subsistema Core.
RenderTypes.h
Declara la API de RenderTypes dentro del subsistema Rendering.
DeviceContext
Definition
DeviceContext.h:10
MaterialInstance
Agrupa un material base con sus texturas y parametros concretos.
Definition
MaterialInstance.h:22
MaterialInstance::setNormal
void setNormal(Texture *texture)
Definition
MaterialInstance.h:26
MaterialInstance::setMaterial
void setMaterial(Material *material)
Definition
MaterialInstance.h:24
MaterialInstance::m_params
MaterialParams m_params
Definition
MaterialInstance.h:56
MaterialInstance::setEmissive
void setEmissive(Texture *texture)
Definition
MaterialInstance.h:30
MaterialInstance::getAO
Texture * getAO() const
Definition
MaterialInstance.h:37
MaterialInstance::getAlbedo
Texture * getAlbedo() const
Definition
MaterialInstance.h:33
MaterialInstance::getMaterial
Material * getMaterial() const
Definition
MaterialInstance.h:32
MaterialInstance::getParams
const MaterialParams & getParams() const
Definition
MaterialInstance.h:41
MaterialInstance::setRoughness
void setRoughness(Texture *texture)
Definition
MaterialInstance.h:28
MaterialInstance::getRoughness
Texture * getRoughness() const
Definition
MaterialInstance.h:36
MaterialInstance::setAlbedo
void setAlbedo(Texture *texture)
Definition
MaterialInstance.h:25
MaterialInstance::getNormal
Texture * getNormal() const
Definition
MaterialInstance.h:34
MaterialInstance::getMetallic
Texture * getMetallic() const
Definition
MaterialInstance.h:35
MaterialInstance::setAO
void setAO(Texture *texture)
Definition
MaterialInstance.h:29
MaterialInstance::setMetallic
void setMetallic(Texture *texture)
Definition
MaterialInstance.h:27
MaterialInstance::getParams
MaterialParams & getParams()
Definition
MaterialInstance.h:40
MaterialInstance::getEmissive
Texture * getEmissive() const
Definition
MaterialInstance.h:38
Material
Describe el estado fijo compartido por una o mas instancias de material.
Definition
Material.h:23
Texture
Encapsula una textura 2D en Direct3D 11, incluyendo su recurso y vista como Shader Resource.
Definition
Texture.h:24
MaterialParams
Definition
RenderTypes.h:57
include
Rendering
MaterialInstance.h
Generado por
1.9.8