* Chances of triggering effects (#27056) * electrocution * slippery * flashibg * Update SlipperyComponent.cs * Update SlipperySystem.cs * Flash buff (#25730) * flash buff * oops! * bool * 3 -> 1.5 seconds * okay fix * sluth * Flash overlay rework and bugfixes (#27369) * fix mapping door access (#27784) Co-authored-by: deltanedas <@deltanedas:kde.org> * - fix: Errors. * - fix: Incorporeal. --------- Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com> Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
19 lines
770 B
Plaintext
19 lines
770 B
Plaintext
uniform highp float percentComplete;
|
|
const highp float fadeFalloffExp = 8.0;
|
|
|
|
void fragment() {
|
|
// Higher exponent -> stronger blinding effect
|
|
highp float remaining = -pow(percentComplete, fadeFalloffExp) + 1.0;
|
|
|
|
// Two ghost textures that spin around the character
|
|
highp vec4 tex1 = zTexture(vec2(UV.x + (0.02) * sin(TIME * 3.0), UV.y + (0.02) * cos(TIME * 3.0)));
|
|
highp vec4 tex2 = zTexture(vec2(UV.x + (0.01) * sin(TIME * 2.0), UV.y + (0.01) * cos(TIME * 2.0)));
|
|
|
|
highp vec4 textureMix = mix(tex1, tex2, 0.5);
|
|
|
|
// Gradually mixes between the texture mix and a full-black texture, causing the "blinding" effect
|
|
highp vec4 mixed = mix(vec4(0.0, 0.0, 0.0, 1.0), textureMix, percentComplete);
|
|
|
|
COLOR = vec4(mixed.rgb, remaining);
|
|
}
|