Hello, I found a bug with the default add/subtract effect.
I'm currently making a racing game that takes place at night, so I used the subtract effect to make a small but efficient lighting (and it worked like a charm - screenshots below).
But then, I had another idea.
THE IDEA: Make the game adapt/fit to any window resolution without "resizing" itself.
WHAT I DID: I used the Window Control Object to resize the frame to the current window resolution whenever I press a key (it also resizes all of the other effects (zoom, vignette, etc) to fit the screen).
THE PROBLEM: When the window is resized, as soon as it changes the frame's resolution (even by only 1 pixel) - making it different from the original size in the frame's properties - the subtract effect breaks and won't work correctly anymore, even when set back to it's original size. Note: all of the other effects still work, it's only the subtract effect.
Screenshots of the problem:
Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.Please login to see this attachment.
And here is a video of it: Please login to see this media element.
WHAT I TRIED: I tried using the add effect instead (same problem). I tried resizing the game window only - not the frame - (that kinda worked but wouldn't do what I wanted and won't work in fullscreen). I even spent hours trying to make my own subtract effect by using the official guide and ChatGPT (it's really complicated and didn't work).
SOLUTION ?: My only solution as of right now is to make multiple builds of the game with different resolutions, for example one with the standard 1920 x 1080 resolution, another build in 3840 x 2160, etc.
I would really like to know if there's a solution so there would be only one build that would adapt to any monitor size. I'd be grateful if someone could help me find a solution. Maybe use another similar effect/shader for lighting ? Maybe there's a fix ? Or should I really try to make my own effect ?
Thank you for reading and for your time. Have a nice day/night !
(Apologies if I made any mistakes or if you didn't understand something - English isn't my native language)