mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-01 04:55:03 +00:00
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:
@ -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) {
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user