* Flash component, overlay and shader Add BeginDraw method to Overlay.cs * Add flash icons, sounds * Progress * Multiple overlays without enums * This is probably the worst way to do this IDK * Remove nullable reference type * Add AttackEventArgs as parameter to OnHitEntities MeleeWeaponComponent.Attack now continues when OnHitEntities returns true (it hit something) Add OverlayType enum so client and server can agree on overlay ids Move IConfigurable to its own file Add AoE flash with shorter duration Flashing someone slows them down * Add arc to flash Set item size to something reasonable Remove chat log message when flash burns out * Remove unused interface
19 lines
726 B
Plaintext
19 lines
726 B
Plaintext
uniform float percentComplete;
|
|
uniform float fadeFalloffExp = 8;
|
|
|
|
void fragment() {
|
|
// Higher exponent -> stronger blinding effect
|
|
float remaining = -pow(percentComplete, fadeFalloffExp) + 1;
|
|
|
|
// Two ghost textures that spin around the character
|
|
vec4 tex1 = texture(TEXTURE, vec2(UV.x + (0.02) * sin(TIME * 3), UV.y + (0.02) * cos(TIME * 3)));
|
|
vec4 tex2 = texture(TEXTURE, vec2(UV.x + (0.01) * sin(TIME * 2), UV.y + (0.01) * cos(TIME * 2)));
|
|
|
|
vec4 textureMix = mix(tex1, tex2, 0.5);
|
|
|
|
// Gradually mixes between the texture mix and a full-white texture, causing the "blinding" effect
|
|
vec4 mixed = mix(vec4(1, 1, 1, 1), textureMix, percentComplete);
|
|
|
|
COLOR = vec4(mixed.rgb, remaining);
|
|
}
|