Implement animated flash tiles in Tilemap
Flash tiles start with an alpha of 60, which ramps up to 120 in 16 frames and 4 steps, then ramps down again over the same period.
This commit is contained in:
parent
9e63fb6b64
commit
7a6c05bba0
7 changed files with 70 additions and 6 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "../simple.frag.xxd"
|
||||
#include "../simpleColor.frag.xxd"
|
||||
#include "../simpleAlpha.frag.xxd"
|
||||
#include "../flashMap.frag.xxd"
|
||||
#include "../simple.vert.xxd"
|
||||
#include "../simpleColor.vert.xxd"
|
||||
#include "../sprite.vert.xxd"
|
||||
|
@ -369,6 +370,21 @@ void PlaneShader::setOpacity(float value)
|
|||
}
|
||||
|
||||
|
||||
FlashMapShader::FlashMapShader()
|
||||
{
|
||||
INIT_SHADER(simpleColor, flashMap);
|
||||
|
||||
ShaderBase::init();
|
||||
|
||||
GET_U(alpha);
|
||||
}
|
||||
|
||||
void FlashMapShader::setAlpha(float value)
|
||||
{
|
||||
glUniform1f(u_alpha, value);
|
||||
}
|
||||
|
||||
|
||||
HueShader::HueShader()
|
||||
{
|
||||
INIT_SHADER(simple, hue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue