Graphics/Material: Fix missing reflection initialization
This commit is contained in:
parent
8dab3bf341
commit
786a11fc78
|
|
@ -212,7 +212,7 @@ namespace Nz
|
||||||
bool m_shadowCastingEnabled;
|
bool m_shadowCastingEnabled;
|
||||||
float m_alphaThreshold;
|
float m_alphaThreshold;
|
||||||
float m_shininess;
|
float m_shininess;
|
||||||
unsigned int m_reflectionSize;
|
unsigned int m_reflectionSize;
|
||||||
|
|
||||||
static std::array<int, TextureMap_Max + 1> s_textureUnits;
|
static std::array<int, TextureMap_Max + 1> s_textureUnits;
|
||||||
static MaterialLibrary::LibraryMap s_library;
|
static MaterialLibrary::LibraryMap s_library;
|
||||||
|
|
|
||||||
|
|
@ -1258,7 +1258,7 @@ namespace Nz
|
||||||
/*!
|
/*!
|
||||||
* \brief Changes reflection mode of the material
|
* \brief Changes reflection mode of the material
|
||||||
*
|
*
|
||||||
* When reflections are enable, the material will render reflections from the object environment according to the reflection mode.
|
* When reflections are enabled, the material will render reflections from the object environment according to the reflection mode.
|
||||||
* This function does change the reflection mode used by the material.
|
* This function does change the reflection mode used by the material.
|
||||||
*
|
*
|
||||||
* Skyboxes reflections are the cheapest but are static and thus can't reflect other objects.
|
* Skyboxes reflections are the cheapest but are static and thus can't reflect other objects.
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,7 @@ namespace Nz
|
||||||
m_ambientColor = Color(128, 128, 128);
|
m_ambientColor = Color(128, 128, 128);
|
||||||
m_diffuseColor = Color::White;
|
m_diffuseColor = Color::White;
|
||||||
m_diffuseSampler = TextureSampler();
|
m_diffuseSampler = TextureSampler();
|
||||||
|
m_reflectionMode = ReflectionMode_Skybox;
|
||||||
m_shadowCastingEnabled = true;
|
m_shadowCastingEnabled = true;
|
||||||
m_shininess = 50.f;
|
m_shininess = 50.f;
|
||||||
m_specularColor = Color::White;
|
m_specularColor = Color::White;
|
||||||
|
|
@ -394,6 +395,7 @@ namespace Nz
|
||||||
m_pipelineInfo = MaterialPipelineInfo();
|
m_pipelineInfo = MaterialPipelineInfo();
|
||||||
m_pipelineInfo.depthBuffer = true;
|
m_pipelineInfo.depthBuffer = true;
|
||||||
m_pipelineInfo.faceCulling = true;
|
m_pipelineInfo.faceCulling = true;
|
||||||
|
m_reflectionSize = 256;
|
||||||
|
|
||||||
SetShader("Basic");
|
SetShader("Basic");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue