Add improvements from auria and devee

This commit is contained in:
Benau 2016-10-17 09:13:07 +08:00
parent af223ddf24
commit caf095ed60
3 changed files with 3 additions and 2 deletions

View File

@ -1563,6 +1563,7 @@ void IrrDriver::renderTransparent()
glEnable(GL_BLEND);
glBlendEquation(GL_FUNC_ADD);
glEnable(GL_CULL_FACE);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
renderTransparenPass<Shaders::TransparentShader, video::EVT_STANDARD, 3, 2, 1>(
TexUnits(RenderGeometry::TexUnit(0, true)),
ListGhostKart::getInstance());

View File

@ -207,7 +207,7 @@ void STKMeshSceneNode::updateNoGL()
GLMesh &mesh = GLmeshes[i];
Material* material = material_manager->getMaterialFor(mb->getMaterial().getTexture(0), mb);
if (mesh.m_render_info != NULL && mesh.m_render_info->isTransparent())
if (mesh.m_render_info != NULL && mesh.m_render_info->isTransparent() && !rnd->isTransparent())
{
assert(!immediate_draw);
if (mesh.VAOType == video::EVT_TANGENTS)

View File

@ -351,7 +351,7 @@ handleSTKCommon(scene::ISceneNode *Node, std::vector<scene::ISceneNode *> *Immed
{
const video::SColor& c = World::getWorld()->getTrack()->getSunColor();
float y = 0.2126f * c.getRed() + 0.7152f * c.getGreen() + 0.0722f * c.getBlue();
custom_alpha = y > 128.0f ? 0.5f : 0.2f;
custom_alpha = y > 128.0f ? 0.5f : 0.35f;
}
for (GLMesh *mesh : node->TransparentMesh[TM_GHOST_KART])