I check unanswered posts periodically, and this one caught my eye because I've just done a bit of work playing around with Invisibility myself, for my Dark Priest class.
So, I got curious and took a look into things.
A couple notes:
It's easy to understand the mix-up, given the similar names, but the object that lets you activate Invisibility is actually Death's Embrace (armor), not Ethereal Embrace (cloak). The character did have both equipped, and both had been through the vault. Just wanted to clarify that, first.
I took at peek at the Phantasm spell and Death's Embrace, and I'm guessing part of the problem is how the power is calculated for the armor's effect.
It uses the formula '10 + Magic/6 + Cunning/6', which could easily lead to an irrational result, possibly many decimals in length (actually, double-checking, the character has 60 Cunning and 71 magic, so the power would be 31.8333333etc). I can't say for certain, as I don't know enough about exactly how everything works, but I'm guessing that when the power is being removed from the Invisibility timed-effect wearing off, it is subtracting a tiny fraction more than the initial power value due to some rounding along the way (possibly when the power is combined with that of the Phantasm sustain).
I think that rounding off the result of the power calculation used by the armor would likely prevent this from happening.
That is only part of it, though.
Looking at mod/class/Player, it appears that updateMainShader() checks for both the invisibility attribute
and if the attribute is greater than zero, when determining whether or not to apply the colorization.
Code: Select all
...-- Colorize shader
if self:attr("stealth") and self:attr("stealth") > 0 then game.fbo_shader:setUniform("colorize", {0.9,0.9,0.9,0.6})
elseif self:attr("invisible") and self:attr("invisible") > 0 then game.fbo_shader:setUniform("colorize", {0.3,0.4,0.9,0.8})
...
However, when determining if it should apply the motion blur, it checks for the attribute, but
not its value.
Code: Select all
...-- Moving Blur shader
if pf.motionblur and pf.motionblur.shad then
if self:attr("invisible") then pf.motionblur.shad:uniMotionblur(3) effects[pf.motionblur.shad] = true
...
If it were checking for a value greater than zero here, the blur would not persist in the case of this character, I believe, as the Invis power listed on the character sheet is "-0.0" (which is probably actually something like -0.0000067).
Adding the same check for the motion blur as the colorization, and rounding off the power from the item, both seem like straight-forward and simple actions that could be taken toward correcting this error.
(As a side note, on Invisibility in general, the motion blur really is more than just an annoyance. Looking at it for too long gave me a headache and made me feel queasy, which is what lead me to digging into how the visual effects were being applied in the first place. It bothered me so much that I wound up super-loading the parts of the function shown above to use much more mild shaders if the player had my effect as well as the invisibility attribute, which is the only reason I knew where to look in this case. Personally, I would not be unhappy if both the motion blur and colorization for this attribute were toned down a fair bit.)