Pixi Js Scan line effect accumulated float point errors and screen refresh problems. Weird problem looking for help.

Hey everyone, here with another weird esoteric problem. I am using casper's pixi filter plugin to create a crt scanline effect
(https://casper-gaming.itch.io/cgmz-pixi-filters). If the game runs for x amount of time slanted errors in the scanline appear which destroys the aesthetic and is hard on the eyes. This is a common issue with scanline effects in PixiJS and can occur due to floating-point precision errors accumulating over time or synchronization issues between the scanline animation and the game's refresh rate. Anyone have any ideas, refresh rate edits? Maybe just reimplementing the plugin command IE turning off and back on every map refresh(I wouldn't know where to begin).
Screenshot (3336).png
After discussing with the author I'm going to try periodically resetting the effect with a simple parallel process common event, but I am still looking for hard code fixes for the float point error if anyone has any ideas.
My brain is fried from working too much, this is actually the plugin I am using to leverage Pixi JS.

Are you talking about the crt filter?
I don't see anything like the screenshot you posted.
How do you set the parameters?
Double-post notice: @cronenbuilder
Double-post notice: @cronenbuilder
I apologize, I'll be sure to just edit my posts in the future. I'm sorry, I know I must have double posted before, I don't want to be a bother for the admins or users... I'll have to avoid late night brain drains.
Are you talking about the crt filter?
I don't see anything like the screenshot you posted.
How do you set the parameters?
Hi, I am talking about the crt filter specifically. The slanted lines accumulate after random time intervals. My parameters are as such in this photo. Though, I have found that this is an acceptable workaround in the meantime: (see second and third photo). U Tunnels, you have helped me so much, If you are interested in seeing some pre alpha footage of my project I would be thrilled to share it with you. I don't know this post is appropriate to share links but lmk and I will link you to my youtube. Thank you for your time.



After extensive testing I can report my work around does not in fact work, back to the drawing board.
It's no trouble. I think it is fun to solve strange problems. lol
I tried your setup and add a crt filter to the parallax.
But it looks different from your first screenshot. I didn't see the slanted lines.
Do I have to let the game run for some minutes or even longer?

Edit*
Maybe you are talking about the noise effect?
You can turn it off to see if the slanted lines still appear.
1739243261246.png
I see, Ill have to try that. the noise reduction I mean. Also this has been so weird, depending on other factors, it seems upwards 15 minutes will recreate the bug, but I think I might have some unique to my game redundancies that I haven't caught which are effecting this. I'm totally losing focus so forgive my fragmentary explanation here.

So I did just switch to using Casper's crt from his pix plugin and At first I created the filter, Then I redundantly added the filter controller mz to activate the plugin, which you do not have to do with caspers plugin. Also I forgot the self switch and in this use case I obviously started accumulating error which would probably blow my pc up, but it also caused the crt effect to constantly initialize and created the slanted striations after 20 whole minutes. Cant believe my pc isn't on fire. So I got rid of the filter controller command as it wasn't needed and fixed the self switch and now we are about 3o minuets in. I can just barley see float point striations but I cant tell if its going to get any worse. So... A:The problem could be compatibility combined with erroneous use of the Filter controller MZ command, Or B: I've finally gone mad lol, but more likely it has to do with noise.

I cant remember who helped me, Its on the forum here somewhere But I originally had this same problem with the crt effect from the moment it was initialized but changing a parameter , I believe it was in the plugin itself fixed it. --- Ive just checked, it was you hahaha
@cronenbuilder You can have multiple filters using this plugin right? So maybe you can create two displacement filters?
The crt filters should have several arguments you can change. The last two should be the noise effect you are talking about. You can adjust them to see how they work.
JavaScript:
_updateFilterHandler["crt"] = function(filter, cp) {
filter.curvature = cp[0];
filter.lineWidth = cp[1];
filter.lineContrast = cp[2];
filter.noise = cp[3];
filter.noiseSize = cp[4];

filter.seed = Math.random()*3;
filter.time = this._time;
};

so yeah, I'm going to investigate this avenue of attack and see if we cant get to the bottom of this. Thank you again!!!
t's no trouble. I think it is fun to solve strange problems. lol
I tried your setup and add a crt filter to the parallax.
But it looks different from your first screenshot. I didn't see the slanted lines.
Do I have to let the game run for some minutes or even longer?

Edit*
Maybe you are talking about the noise effect?
You can turn it off to see if the slanted lines still appear.

It appears my casper crt effect does in fact have noise set to 0

Original thread: https://forums.rpgmakerweb.com/threads/pixi-js-scan-line-effect-accumulated-float-point-errors-and-screen-refresh-problems-weird-problem-looking-for-help.175315/