1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-11 00:29:53 +00:00

Re-introduce AfterEffect shader functonality, part 1.

This repairs pixel/vertex shader code that was seemingly
experimented with during testing, but it was never used and no
shaders ever made it to the data files.
This commit is contained in:
fgenesis 2013-05-10 22:22:35 +02:00
parent 45821d15ff
commit c62d9f2370
8 changed files with 216 additions and 256 deletions

View file

@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "ScriptedEntity.h"
#include "Shot.h"
Shader Entity::blurShader;
//Shader Entity::blurShader;
void Entity::stopPull()
{
@ -1080,7 +1080,7 @@ void Entity::onFHScale()
copySkel.alpha.interpolateTo(0, 0.5);
*/
//skeletalSprite.alpha.interpolateTo(1,sct);
blurShaderAnim.interpolateTo(Vector(blurMin,0,0), sct);
//blurShaderAnim.interpolateTo(Vector(blurMin,0,0), sct);
fhScale = 0;
}
@ -1105,8 +1105,8 @@ void Entity::onFH()
flipScale.interpolateTo(Vector(0.6, 1), sct);
blurShaderAnim = Vector(blurMin);
blurShaderAnim.interpolateTo(Vector(blurMax,0,0), sct/2);
//blurShaderAnim = Vector(blurMin);
//blurShaderAnim.interpolateTo(Vector(blurMax,0,0), sct/2);
fhScale = 1;
}
@ -1681,7 +1681,7 @@ void Entity::onUpdate(float dt)
break;
}
blurShaderAnim.update(dt);
//blurShaderAnim.update(dt);
}
@ -2832,23 +2832,18 @@ void Entity::render()
// HACK: need to multiply base + etc
skeletalSprite.setColorMult(this->color, this->alpha.x);
bool set=false;
/*bool set=false;
if (beautyFlip && blurShader.isLoaded() && flipScale.isInterpolating() && dsq->user.video.blur)
{
/*
std::ostringstream os;
os << "blurShaderAnim: " << blurShaderAnim.x;
debugLog(os.str());
*/
//swizzle
blurShader.setValue(color.x, color.y, color.z, blurShaderAnim.x);
blurShader.bind();
set = true;
}
}*/
Quad::render();
//if (beautyFlip && blurShader.isLoaded() && flipScale.isInterpolating())
if (set)
blurShader.unbind();
//if (set)
// blurShader.unbind();
renderBorder = false;
skeletalSprite.clearColorMult();
color = bcolor;