mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 14:33:06 +02:00
Stop using the emissive color for glow.
This commit is contained in:
parent
b1bd9a27be
commit
4c617c6d55
1 changed files with 1 additions and 5 deletions
|
@ -1335,11 +1335,7 @@ void Model::renderMeshes(RenderMode mode, bool translucent, float alphaThreshold
|
||||||
} else {
|
} else {
|
||||||
glm::vec4 diffuse = glm::vec4(part.diffuseColor, part.opacity);
|
glm::vec4 diffuse = glm::vec4(part.diffuseColor, part.opacity);
|
||||||
if (!(translucent && alphaThreshold == 0.0f)) {
|
if (!(translucent && alphaThreshold == 0.0f)) {
|
||||||
float emissive = (part.emissiveColor.r + part.emissiveColor.g + part.emissiveColor.b) / 3.0f;
|
glAlphaFunc(GL_EQUAL, diffuse.a = Application::getInstance()->getGlowEffect()->getIntensity());
|
||||||
diffuse.a = qMax(Application::getInstance()->getGlowEffect()->getIntensity(), emissive);
|
|
||||||
glAlphaFunc(GL_EQUAL, diffuse.a);
|
|
||||||
diffuse = glm::vec4(qMax(diffuse.r, part.emissiveColor.r), qMax(diffuse.g, part.emissiveColor.g),
|
|
||||||
qMax(diffuse.b, part.emissiveColor.b), diffuse.a);
|
|
||||||
}
|
}
|
||||||
glm::vec4 specular = glm::vec4(part.specularColor, 1.0f);
|
glm::vec4 specular = glm::vec4(part.specularColor, 1.0f);
|
||||||
glMaterialfv(GL_FRONT, GL_AMBIENT, (const float*)&diffuse);
|
glMaterialfv(GL_FRONT, GL_AMBIENT, (const float*)&diffuse);
|
||||||
|
|
Loading…
Reference in a new issue