"4xBRz" Filter

More
2 years 3 months ago - 2 years 3 months ago #1 by spiderh
"4xBRz" Filter was created by spiderh
Hi!

I ported 4xBRz shader from " https://github.com/libretro/common-shaders/blob/master/xbrz/shaders/4xbrz.cg "

If you want more sharpen result, use with "AdaptiveSharpen" filter.

Have fun!..

.
.
Last edit: 2 years 3 months ago by spiderh.
The following user(s) said Thank You: Tom Yum 72, du, acknowledge, qdclonman, thalixte, Sin_7

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #2 by NesQEdits
Replied by NesQEdits on topic "4xBRz" Filter
Hey man!
I will try the shader later when i am back home, thank you!
But what exactly does the shader do? The edges smoother?
Greetings

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #3 by spiderh
Replied by spiderh on topic "4xBRz" Filter
Yes. For pixelated games, this shader smooth sharp pixel transitions.

This technique actually used effectively on C/C++. With shader technique we get reasonable result, but this is as good as not to be.

5x and 6x techniques (on shader) not work with DirectX 9. And 6x technique is slow. Because mostly use LERP (Linear Interpolation). But on C/C++ 6x technique is generate more sharpen and quality results and exactly more fast.
Last edit: 2 years 3 months ago by spiderh.
The following user(s) said Thank You: NesQEdits

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #4 by NesQEdits
Replied by NesQEdits on topic "4xBRz" Filter
Sounds great! i will try it out for CSGO cause this game needs to be a little smoother on some parts.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #5 by Uncle Crassius
Replied by Uncle Crassius on topic "4xBRz" Filter

NesQEdits wrote: Sounds great! i will try it out for CSGO cause this game needs to be a little smoother on some parts.


Before you get your hopes up: 4xBRz has been made mainly to smoothen lowres pixel graphics. So if you're not playing CSGO in 320x240 it will probably not look too hot. ;)

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #6 by NesQEdits
Replied by NesQEdits on topic "4xBRz" Filter
Haha no i am not :D Thank you!

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #7 by spiderh
Replied by spiderh on topic "4xBRz" Filter
xBR, xBRZ, HQ etc. filters only work with 2D pixelated games. Example: Mugen, Mame, old 2D platform games, 2D Playstation 1 games etc.

Reshade only work with actual viewport. This shader is upscaler. For this reason, this shader first downscale, after upscale render target. If you use this shader with 3D games, then result will be blurry.
Last edit: 2 years 3 months ago by spiderh.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #8 by psychic5
Replied by psychic5 on topic "4xBRz" Filter
Just tried your "4xBRz" filter with the following Windows 2d games: Super Hydora, Freedom Planet, Momodora: Reverie Under The Moonlight, Axiom Verge, Aggelos. It works great and I'm really pleased we finally have a good shader for 2d pixel games! Thank your for your valuable contribution!
I noticed in some games there is tearing when the screen scrolls with 4xBRz activated. Is there a way to avoid that?

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #9 by spiderh
Replied by spiderh on topic "4xBRz" Filter
Yes. Some games not have standard resolution. Change "Strength" value a little bit, but only little bit.

Try this formula:

STRENGTH = HEIGHT / ORIGINAL HEIGHT.

Example, in MAME emulator, some games have 384x224 resolution and MAME upscale this games to 1920x1080.

STRENGTH = 1080 / 224 = 4.8214

For 320x240 games (original resolution):

STRENGTH = 1080 / 240 = 4.5

For 320x240 games to upscaled 1280x1024 resolution:

STRENGTH = 1024 / 240 = 4.2666
.

If this shader works as internal shader for games, then I know original resolution and I can calculate this values automatically, but Reshade is external shader and I never know what original resolution have a game.
Last edit: 2 years 3 months ago by spiderh.
The following user(s) said Thank You: acknowledge

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #10 by psychic5
Replied by psychic5 on topic "4xBRz" Filter
Thank you for your help!

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #11 by v00d00m4n
Replied by v00d00m4n on topic "4xBRz" Filter
Maybe it would be good idea to use native game resolution settings and calculate streght automatically based on current display and game native resolution?
The following user(s) said Thank You: OtisInf

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago - 2 years 3 months ago #12 by spiderh
Replied by spiderh on topic "4xBRz" Filter
How do that? How I know game's native resolution? Also how Reshade programmers know this?
Last edit: 2 years 3 months ago by spiderh.

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #13 by qdclonman
Replied by qdclonman on topic "4xBRz" Filter
Can you make Bilinear Interpolation for reshade ??? thanks you~~ :P :P :P

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #14 by spiderh
Replied by spiderh on topic "4xBRz" Filter
What do you do Bilinear interpolation?

Reshade never be a rescaler? Reshade only works on final Render Target...

If you want Bilinear Interpolation, then use "Gaussian Blur" filter or like this...
The following user(s) said Thank You: qdclonman

Please Log in or Create an account to join the conversation.

More
2 years 3 months ago #15 by qdclonman
Replied by qdclonman on topic "4xBRz" Filter
I know this ,but I want this effect,please,thanks!! :P :P :P :P

Please Log in or Create an account to join the conversation.

More
2 years 14 hours ago #16 by ArkBlitz
Replied by ArkBlitz on topic "4xBRz" Filter
Hello, first of all thank you very much for making this filter, it makes pixel-art games look much better. However, there is still an issue with the filter, and it's that it sometimes makes the elements on screen become too blurry, in particular when they're in movement or when there's text with shadowing. Currently testing on Rivals of Aether at 1080p.

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #17 by nhjnhj
Replied by nhjnhj on topic "4xBRz" Filter
needs deepbuffer?

Please Log in or Create an account to join the conversation.

More
1 year 8 months ago #18 by Tokon
Replied by Tokon on topic "4xBRz" Filter
Thank you very much!
I use this on Wargroove (setting 3) and it looks fantastic, so much better than hq4x.
Hopefully this will get included as a standard ReShade shader in the future.
My fps drop a bit but that's not much of a problem.

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #19 by Sh1nRa358
Replied by Sh1nRa358 on topic "4xBRz" Filter
This doesn't work as intended at all :(

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #20 by jas01
Replied by jas01 on topic "4xBRz" Filter

Sh1nRa358 wrote: This doesn't work as intended at all :(


You can try this cool shader - reshade.me/forum/shader-presentation/560...g-shader-for-reshade

Please Log in or Create an account to join the conversation.