Commit 87f4f53b authored by Martin Flöser's avatar Martin Flöser
Browse files

Fade in/out cube caps during start/stop animation.

parent 82c51400
......@@ -900,7 +900,13 @@ void CubeEffect::paintCap(bool frontFirst, float zOffset)
if (ShaderManager::instance()->isValid() && m_capShader->isValid()) {
capShader = true;
ShaderManager::instance()->pushShader(m_capShader);
m_capShader->setUniform("u_opacity", cubeOpacity);
float opacity = cubeOpacity;
if (start) {
opacity *= timeLine.value();
} else if (stop) {
opacity *= (1.0 - timeLine.value());
}
m_capShader->setUniform("u_opacity", opacity);
m_capShader->setUniform("u_mirror", 1);
if (reflectionPainting) {
m_capShader->setUniform("screenTransformation", m_reflectionMatrix*m_rotationMatrix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment