mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-04 14:35:10 +00:00
sigmoid function to smooth preset transitions even further
git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1251 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
@ -5,6 +5,11 @@
|
||||
void PipelineMerger::mergePipelines(const Pipeline & a, const Pipeline & b, Pipeline & out, RenderItemMatcher::MatchResults & results, RenderItemMergeFunction & mergeFunction, float ratio)
|
||||
{
|
||||
|
||||
double s = 0.5;
|
||||
double e = 2.71828182845904523536;
|
||||
double x = (ratio - 0.5) * 20;
|
||||
double sigmoid = 1.0 / (1.0 + e - s * x);
|
||||
|
||||
double invratio = 1.0 - ratio;
|
||||
|
||||
out.textureWrap = (ratio < 0.5) ? a.textureWrap : b.textureWrap;
|
||||
|
||||
Reference in New Issue
Block a user