diff --git a/game/modules/tome/data/gfx/shaders/runicshield.frag b/game/modules/tome/data/gfx/shaders/runicshield.frag index f9f688f108e8b097b2b874208085d8a287334e79..43711a0a56660eaea00d9cf1e82aa409d31fd98e 100644 --- a/game/modules/tome/data/gfx/shaders/runicshield.frag +++ b/game/modules/tome/data/gfx/shaders/runicshield.frag @@ -1,5 +1,6 @@ uniform sampler2D tex; uniform float tick; +uniform float tick_start; uniform float aadjust; uniform vec4 bubbleColor; uniform vec4 auraColor; @@ -230,7 +231,7 @@ void main(void) vec2 sphericalProjectedCoord = vec2(0.5, 0.5) + radius * (alpha / (3.141592 / 2.0)) / radiusLen; - shieldColorSample = texture2D(tex, (sphericalProjectedCoord * 0.3 + vec2(scrollingSpeed * tick / time_factor, 0.0))); + shieldColorSample = texture2D(tex, (sphericalProjectedCoord * 0.3 + vec2(scrollingSpeed * (tick - tick_start) / time_factor, 0.0))); shieldColorSample.a = 1.0 - exp(-shieldColorSample.a * shieldIntensity / cos(alpha)); //impact adjusts resulting transperency shieldColorSample.a *= aadjust; @@ -241,7 +242,7 @@ void main(void) vec4 auraColorSample = vec4(0.0, 0.0, 0.0, 0.0); if(length(radius) > innerRadius && length(radius) < outerRadius) { - auraColorSample = GetFireRingColor(tick / time_factor, radius, 5.0, 50.0, 1.0, 2.0, innerRadius, outerRadius, 0.1, 0.25) * auraColor; + auraColorSample = GetFireRingColor((tick - tick_start) / time_factor, radius, 5.0, 50.0, 1.0, 2.0, innerRadius, outerRadius, 0.1, 0.25) * auraColor; } float ratio = (radiusLen - innerRadius) / (shieldRadius - innerRadius); diff --git a/game/modules/tome/data/gfx/shaders/runicshield.lua b/game/modules/tome/data/gfx/shaders/runicshield.lua index 57ccebea66a9eaf14c0d9dab9a3e092b6f728b4a..94d2f76b76557c7ea66296983ede3e2ee682a40f 100644 --- a/game/modules/tome/data/gfx/shaders/runicshield.lua +++ b/game/modules/tome/data/gfx/shaders/runicshield.lua @@ -40,5 +40,8 @@ return { scrollingSpeed = scrollingSpeed or 1.0, auraWidth = auraWidth or 0.1, }, + resetargs = { + tick_start = function() return core.game.getFrameTime() end, + }, clone = false, }