Currently GZDoom supports the following screen wipe styles:
* Melt
* Burn
* Crossfade
* None
How about fizzlefade:
https://jacopretorius.net/2017/09/wolfe ... rithm.html
Fizzlefade screen wipe style
Moderator: GZDoom Developers
-
- Posts: 12
- Joined: Mon Mar 25, 2024 6:40 pm
- Graphics Processor: Not Listed
-
- Posts: 12
- Joined: Mon Mar 25, 2024 6:40 pm
- Graphics Processor: Not Listed
Re: Fizzlefade screen wipe style
The screen wipes are implemented in src\common\2d\wipe.cpp
-
-
- Posts: 17465
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Fizzlefade screen wipe style
Ultimately what I'd like to eventually see is the wipe system moved to shaders, so that users can easily add their own.
-
- Posts: 12
- Joined: Mon Mar 25, 2024 6:40 pm
- Graphics Processor: Not Listed
Re: Fizzlefade screen wipe style
Would you merge a fizzlefade pull request in the meantime?
-
- Posts: 13794
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Fizzlefade screen wipe style
Honestly, it feels a bit pointless to work on coding for the old system if we want to refactor it. Plus, it's high time we gave the fade system a bit of a makeover, not just for user shaders but because it needs it anyway in order to be more flexible.
That being said, if you can make your PR on the existing shader system (it should already be possible by looking at how the burn and melt styles are done) then sure, we can merge it.
To be quite frank, I wouldn't spend too much time on the algorithm part. It seems smarter to use a custom texture, where the brightness of each pixel marks the moment it transitions to the new image. This way, the shader simply checks if it's time to switch from the old image to the new one based on the pixel's brightness. The shader can compare the timer value with the brightness of the texture's pixel to figure out whether to place the current pixel from the old screen or to the new screen. This might get a little tricky with trilinear filtering, but you can use some form of a "floor" function on the texture coordinates to fix that.
That being said, if you can make your PR on the existing shader system (it should already be possible by looking at how the burn and melt styles are done) then sure, we can merge it.
To be quite frank, I wouldn't spend too much time on the algorithm part. It seems smarter to use a custom texture, where the brightness of each pixel marks the moment it transitions to the new image. This way, the shader simply checks if it's time to switch from the old image to the new one based on the pixel's brightness. The shader can compare the timer value with the brightness of the texture's pixel to figure out whether to place the current pixel from the old screen or to the new screen. This might get a little tricky with trilinear filtering, but you can use some form of a "floor" function on the texture coordinates to fix that.
-
- Posts: 12
- Joined: Mon Mar 25, 2024 6:40 pm
- Graphics Processor: Not Listed
Re: Fizzlefade screen wipe style
Well I was trying to keep the memory requirements lean by using an LFSR. Monitor resolutions are increasing and if we use a 4k texture that's going to bloat the download size. Unless we want that generated at runtime?
-
- Posts: 13794
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Fizzlefade screen wipe style
I think it would make more sense to use a lower resolution texture and swap out pixel blocks for higher resolutions. The effect still looks the same, that way.
-
-
- Posts: 17934
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Fizzlefade screen wipe style
If you don't want pixel blocks, you can probably just cover a small areas and tile it. So say you're fizzling a 512x512 square, and simultaneously fizzling in the same way any other square that may exist to its left and under it, as dictated by screen resolution.
-
- Posts: 12
- Joined: Mon Mar 25, 2024 6:40 pm
- Graphics Processor: Not Listed