I think this is better, video echo smoothing

git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1252 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
psperl
2009-08-02 17:30:11 +00:00
parent a1b13e5efd
commit a2061dca65
3 changed files with 6 additions and 15 deletions

View File

@ -33,24 +33,21 @@ void PipelineMerger::mergePipelines(const Pipeline & a, const Pipeline & b, Pipe
out.drawables.push_back(*pos);
}
if (ratio < 0.5)
{
for (std::vector<RenderItem*>::const_iterator pos = a.compositeDrawables.begin();
pos != a.compositeDrawables.end(); ++pos)
{
//(*pos)->masterAlpha = invratio;
(*pos)->masterAlpha = invratio;
out.compositeDrawables.push_back(*pos);
}
}
else
{
for (std::vector<RenderItem*>::const_iterator pos = b.compositeDrawables.begin();
pos != b.compositeDrawables.end();++pos)
{
//(*pos)->masterAlpha = ratio;
(*pos)->masterAlpha = ratio;
out.compositeDrawables.push_back(*pos);
}
}
/*
for (RenderItemMatchList::iterator pos = results.matches.begin(); pos != results.matches.end(); ++pos) {

View File

@ -59,7 +59,7 @@ void VideoEcho::Draw(RenderContext &context)
glMatrixMode(GL_TEXTURE);
//draw video echo
glColor4f(1.0, 1.0, 1.0, a);
glColor4f(1.0, 1.0, 1.0, a * masterAlpha);
glTranslatef(.5, .5, 0);
glScalef(1.0/zoom, 1.0/zoom, 1);
glTranslatef(-.5, -.5, 0);

View File

@ -382,7 +382,6 @@ static void *thread_callback(void *prjm) {
m_activePreset2->pipeline(), pipeline, _matcher->matchResults(),
*_merger, timeKeeper->SmoothRatio());
/// @bug not sure if this is correct
renderer->RenderFrame(pipeline, pipelineContext());
for (int i = 0; i < _matcher->matchResults().matches.size(); i++) {
@ -400,12 +399,7 @@ static void *thread_callback(void *prjm) {
}
//printf("Normal\n");
m_activePreset->Render(*beatDetect, pipelineContext());
// m_activePreset->evaluateFrame();
// m_activePreset->presetOutputs().Render(*beatDetect,presetInputs);
renderer->RenderFrame (m_activePreset->pipeline(), pipelineContext());
}