Experimental: High-Framerate Frame-Blending
- ShoterXX
- Topic Author
Simply put, my monitor only goes as far as 76Hz, but games like PSO2 go well over that.
This simply blends frames together, but unlike Motion Blur, it only blends the last frame with the current one.
So yeah, less frames wasted. Note that disabling "Blend All Frames" makes it so that only 1 every 2 frames updates the screen, meaning that if you have 120 FPS, you'll only get 60 FPS effectively. Enabling it makes things smoother, but blurrier.
Also, for obvious reasons, this doesn't work well with V-Sync. And no, this does not replace a 144Hz monitor, lol.
Might develop this a bit more, but not sure if it's worth it.
Old Versions:
v0.01:
- Initial release.
v0.02:
- Fixed flipped bitwise operators for DX10+;
- Restructured code, reducing a single fetch.
v0.03:
- This shader should work with OpenGL, removed #error preprocess command;
- Added alternative version, "FrameBlur": it's significantly faster, but blurs every single frame together, effectively making it a regular motion blur.
v0.04:
- Added "Target Framerate" field. When your framerate drops below this value, it disables the effect, preventing stuttering and awkward bluring;
- Added "Blur Strength" field, which determines how much it retains from the previous frames (only works with "FrameBlur");
- Something else, forgot what.
v0.05:
- Added a "Frame Drop Threshold", allowing for adjusting how much the framerate can dip without dropping a blurred frame. Default is 33% of target framerate;
- Frametime is now the average of 2 frames, reducing the number of needlessly dropped frames;
- Fixed issue where FrameBlend was showing a 1-frame-old image. Oops;
- Added debug mode that shows when the effect is dropping frames;
- Minor miscelaneous changes.
v0.06:
- Only FrameBlend exists now, but it's a much more comprehensive effect, blending up to 255 previously unused frames for silk-smoothness (good luck reaching 60*255 = 15300 FPS), based on your set framerate;
- Fixed random black frames/severe stutter (report if you still find any);
- Removed debug mode because it's not really useful anymore;
- Minor changes;
Some actual screenshots:
Please Log in or Create an account to join the conversation.
- Scorpio82CO
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
Scorpio82CO wrote: I can´t made it work in OpenGL
Yeah, it's currently disabled, because OpenGL often requires extra work, and often goes unused, but I can take a look at it tomorrow.
Please Log in or Create an account to join the conversation.
- crosire
That should not be the case. If it is, then that is a bug and I would like to know about it.ShoterXX wrote: OpenGL often requires extra work, and often goes unused
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
crosire wrote:
That should not be the case. If it is, then that is a bug and I would like to know about it.ShoterXX wrote: OpenGL often requires extra work, and often goes unused
For example, just now:
DX9 cannot use bitwise operations, so I use modulo. However, with OGL, it'll complain about implicit cast between unsigned integer and boolean. Fortunately, the way I had it was already OK, so all I need to do is remove the #error command. But IIRC, modulo doesn't work the same between OGL and DX either.
Then again, it's been a while since I last used OGL, so things most likely have changed,
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
Please Log in or Create an account to join the conversation.
- Michael35699
Please Log in or Create an account to join the conversation.
- crosire
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
And I'll probably need some help finding a bug causing some games to flicker like mad.
Please Log in or Create an account to join the conversation.
- Michael35699
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
Please Log in or Create an account to join the conversation.
- AndreyRGW
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
Lesson learned, unsigned integers in logic can be dangerous.
Please Log in or Create an account to join the conversation.
- Sami 1999
Please Log in or Create an account to join the conversation.
- reter
Please Log in or Create an account to join the conversation.
- lowenz
More kind of decimation.reter wrote: Wait, is that similar to frame interpolation?
Please Log in or Create an account to join the conversation.
- DaInferno
Please Log in or Create an account to join the conversation.
- ShoterXX
- Topic Author
As for being worked on... not really. Performance-wise, I don't see a significant way to improve it. I tried messing with ways to blur in-between frames, but the performance hit and quality were not good enough.
Please Log in or Create an account to join the conversation.
- DaInferno
Please Log in or Create an account to join the conversation.