Splatmapping now working.

Rendering pipleline now support 3 different types of Material:
Basic: a material with a single color on every property (diffuse, specular, ect).
SingleTextures: a material with a single texture in all or any property. Have a single color on the rest.
SplatMapping: has a SplatMap and 0 to 5 different textures to every property. Properties with o texture uses a single color insted.

All materials with a texture has a UVRepeat, telling how many time to till in U and in V.

modelJobs now uses ShadeID, ModelID and TextureID for the Hash insted of only Texture

MayaExported exports 3 differnt types of material, the same as the piplen now supports.
This commit is contained in:
Teejoon
2016-02-07 13:39:13 +01:00
parent ceab837e27
commit 92ab22e779
20 changed files with 971 additions and 309 deletions
+4 -1
View File
@@ -113,6 +113,7 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& opaqueJobs,
if (cModel["Transparent"]) {
transparentJobs.push_back(explosionEffectJob);
} else {
explosionEffectJob->CalculateHash();
opaqueJobs.push_back(explosionEffectJob);
}
} else {
@@ -132,6 +133,7 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& opaqueJobs,
if (cModel["Transparent"]) {
transparentJobs.push_back(modelJob);
} else {
modelJob->CalculateHash();
opaqueJobs.push_back(modelJob);
}
}
@@ -196,7 +198,7 @@ void RenderSystem::fillText(std::list<std::shared_ptr<RenderJob>>& jobs, World*
if (texts == nullptr) {
return;
}
for (auto& textComponent : *texts) {
bool visible = textComponent["Visible"];
if (!visible) {
@@ -252,6 +254,7 @@ void RenderSystem::Update(double dt)
}
fillModels(scene.OpaqueObjects, scene.TransparentObjects);
scene.OpaqueObjects.sort();
fillPointLights(scene.PointLightJobs, m_World);
fillDirectionalLights(scene.DirectionalLightJobs, m_World);
fillText(scene.TextJobs, m_World);