Working transparency in most common cases.

Transparency check is automatically set if the alpha color value is under 1
This commit is contained in:
Tleety
2016-01-27 12:59:44 +01:00
parent cbb17d22d4
commit 8102f3a2ea
4 changed files with 127 additions and 157 deletions
+7
View File
@@ -98,6 +98,10 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& opaqueJobs,
fillColor,
fillPercentage
));
if(explosionEffectJob->Color.a != 1.f || explosionEffectJob->EndColor.a != 1.f || explosionEffectJob->DiffuseColor.a != 1.f) {
modelComponent["Transparent"] = true;
}
if (modelComponent["Transparent"]) {
transparentJobs.push_back(explosionEffectJob);
} else {
@@ -114,6 +118,9 @@ void RenderSystem::fillModels(std::list<std::shared_ptr<RenderJob>>& opaqueJobs,
fillColor,
fillPercentage
));
if (modelJob->Color.a != 1.f || modelJob->DiffuseColor.a != 1.f) {
modelComponent["Transparent"] = true;
}
if (modelComponent["Transparent"]) {
transparentJobs.push_back(modelJob);
} else {