VOGONS

Common searches


SCALER xBRZ (SDL1)

Topic actions

Reply 60 of 109, by 2mg

User metadata
Rank Member
Rank
Member
truth5678 wrote:

Probably best to stay on-topic to this thread so others can easily read the above posts for related information. I guess it's also a courtesy to the developer(s) who worked on the patch.

In that case, I guess I'll have to use xBRZ Zenju provided in his download link on pg. 1 and copy it to DAUM 😀 I'll try to find out if that one is newer compared to one on Gulikoza's page. I've read that DAUM supports it under special configuration.

PS: Zenju implemented it into another emulator, but I still think DOSBox could use shader/filter support.
( http://www.snes9x.com/phpbb3/viewtopic.php?t=15191 )

Reply 63 of 109, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Please let this be the final bump on the whole forum. We do not like bumps.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 64 of 109, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

I read this topic, however I failed to find a specific question/issue I could answer to. There have been a few suggestions already, so I was waiting to see what happens...

As far as the D3D patch is concerned, surely it'd be possible to add support for other shader formats. But the patch as it is now was targeted for the fx (HLSL) format and heavily modified for the hq2x shader specifically so supporting other formats would mean a substantial rewrite. Unfortunately I don't have the time to take on such a project at the moment...
Since there is no (official) interest to look into adding OpenGL shader support, I don't see this moving forward much.

http://www.si-gamer.net/gulikoza

Reply 65 of 109, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

If I was a better programmer, I'd be willing to put the work into it. But I just don't understand things enough to do it 🙁 From what I've been reading, though, OpenGL "should" be fairly straight forward in implementing. But everything I've tried in my other project comes out all wrong. Not sure how to type this out, but everything I tried to scale OpenGL output ends up with the image the same size, just bands of background added in... I really should have taken some screen shots to show you.... I'll try with text...

Original image...

xxxxxxx
xxxxxxx
xxxxxxx

After scaling

x x x x x x x

x x x x x x x

x x x x x x x

Notice the spaces added in? The individual "pixels" stay the same (the x's), but background (the spaces,) are added in to produce the new size. If the size is doubled, it adds in single background pixels. If tripled, it adds them in pairs, etc... When partials are needed, then every few pixels will have an "extra" background pixel added in. I eventually gave up (on my other project,) and just upgraded to SDL2 and used it's HW rendering routine for the fine tuning with straight pixel multiplication for the integer scaling. Crude and time consuming, but it gets the job done.

Feeding Dragon

Reply 66 of 109, by 2mg

User metadata
Rank Member
Rank
Member
gulikoza wrote:

I read this topic, however I failed to find a specific question/issue I could answer to. There have been a few suggestions already, so I was waiting to see what happens...

As far as the D3D patch is concerned, surely it'd be possible to add support for other shader formats. But the patch as it is now was targeted for the fx (HLSL) format and heavily modified for the hq2x shader specifically so supporting other formats would mean a substantial rewrite. Unfortunately I don't have the time to take on such a project at the moment...
Since there is no (official) interest to look into adding OpenGL shader support, I don't see this moving forward much.

You should check libretro on GitHub to see what they are trying to implement - AFAIK it's a cross platform cross API(unsure?) type of shaders and filters. They also offer a converter, but I'm not sure for what shader formats. And perhaps what the OP posted, about xBRZ itself, at least coding it in .fx format, since you're shaders pack offers xBR (btw, are they up to date?).

FeedingDragon wrote:

If I was a better programmer, I'd be willing to put the work into it. But I just don't understand things enough to do it 🙁 From what I've been reading, though, OpenGL "should" be fairly straight forward in implementing. But everything I've tried in my other project comes out all wrong. Not sure how to type this out, but everything I tried to scale OpenGL output ends up with the image the same size, just bands of background added in... I really should have taken some screen shots to show you.... I'll try with text...

...

Notice the spaces added in? The individual "pixels" stay the same (the x's), but background (the spaces,) are added in to produce the new size. If the size is doubled, it adds in single background pixels. If tripled, it adds them in pairs, etc... When partials are needed, then every few pixels will have an "extra" background pixel added in. I eventually gave up (on my other project,) and just upgraded to SDL2 and used it's HW rendering routine for the fine tuning with straight pixel multiplication for the integer scaling. Crude and time consuming, but it gets the job done.

I think there are sharpeners and upscalers and resizers that try what I believe is exactly what you are doing - scaling but staying true to image that was upscaled and leave it as true and pixely as possible, see libretro on GitHub. Or RetroArch, you should ask there for help.

Reply 68 of 109, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie
2mg wrote:

You should check libretro on GitHub to see what they are trying to implement - AFAIK it's a cross platform cross API(unsure?) type of shaders and filters. They also offer a converter, but I'm not sure for what shader formats. And perhaps what the OP posted, about xBRZ itself, at least coding it in .fx format, since you're shaders pack offers xBR (btw, are they up to date?).

Most shaders on my page have been contributed by another user...I don't know all of them 😀

What shader would you like to be converted? https://github.com/libretro/common-shaders/bl … l/5xbr-v3.7a.cg is already HLSL, it would need only a few adjustments to make it work, would that be ok?

http://www.si-gamer.net/gulikoza

Reply 69 of 109, by 2mg

User metadata
Rank Member
Rank
Member
gulikoza wrote:
2mg wrote:

You should check libretro on GitHub to see what they are trying to implement - AFAIK it's a cross platform cross API(unsure?) type of shaders and filters. They also offer a converter, but I'm not sure for what shader formats. And perhaps what the OP posted, about xBRZ itself, at least coding it in .fx format, since you're shaders pack offers xBR (btw, are they up to date?).

Most shaders on my page have been contributed by another user...I don't know all of them 😀

What shader would you like to be converted? https://github.com/libretro/common-shaders/bl … l/5xbr-v3.7a.cg is already HLSL, it would need only a few adjustments to make it work, would that be ok?

Posts like these make my day 😘

Actually, in order of what I'd like to see is xBRZ MultiThreaded > xBRZ > xBR. Your pick mate!

PS: and of course, a DOSBox patch for .cg support, or maybe a .fx <-> .cg converter? I'm not asking, I'm merely suggesting!

Reply 71 of 109, by 2mg

User metadata
Rank Member
Rank
Member
gulikoza wrote:

Please give me an exact link to the shader...I can't search the forums for the latest version and I don't have the time to port C code...

http://sourceforge.net/projects/hqmame/files/ … RZ.zip/download - latest xBRZ source

download/file.php?id=11430 - modified Zenju's DOSBox+xBRZ from 1st page, if you need to see that implementation

http://board.byuu.org/viewtopic.php?f=10&t=2248 - xBR thread

http://hqmame.sourceforge.net/ScalerTest.zip - scaler comparison executable+unscaled test images, see why xBR and xBRZ are awesome

And ofcourse, libretro shader repositories on github for .cg implementation and converter:
https://github.com/libretro/common-shaders

Reply 72 of 109, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

See, that's the problem. The first link is C implementation. Can't use that... the second one as well, I assume.
Third link is a 27 page thread on the forum...don't have time to read it all. Fourth link is just a zip with images and a dll.

Fifth link has shaders, but none of them are xBRZ and 50+ different files with xbr in the name. Which one do I use?

http://www.si-gamer.net/gulikoza

Reply 73 of 109, by kolano

User metadata
Rank Oldbie
Rank
Oldbie
gulikoza wrote:

See, that's the problem. The first link is C implementation. Can't use that... the second one as well, I assume.
Third link is a 27 page thread on the forum...don't have time to read it all. Fourth link is just a zip with images and a dll.

Fifth link has shaders, but none of them are xBRZ and 50+ different files with xbr in the name. Which one do I use?

I thought we had already explained that xBRZ is a CPU implementation, not a shader one. It's unclear if it can be implemented as a shader. Though it may be possible, I don't think any shader based implementation of it exists today.

Eyecandy: Turn your computer into an expensive lava lamp.

Reply 75 of 109, by 2mg

User metadata
Rank Member
Rank
Member

Because I know squat about coding, and that problem didn't even cross my mind 🙁

I also suspected that your shaders.zip used old implementations of xBR - which worried me performance-wise how much FPS are they eating away. And also, perhaps making some .cg vs .fx compatibility with DOSBox patch?

And the fact that xBRZ looks so fine, tried it on another emulator...

I contacted Zenju to check this thread again...

PS: Zenju also described how it would be possible to implement it on the 1st page I believe (again, I'm not a coder).

Tnx for replying so far!

Reply 76 of 109, by truth_deleted

User metadata

I've (exclusively) used "5xbr-v3.7a.cg" in RetroArch and consider it one of the best, if the not best, 'shader' for producing a good image which is upscaled from much lower resolution. That would be a wonderful addition to your extensive list of available shaders.

I believe I had tried the xBRZ patch from this thread and it did show merely fair performance in SimCity2k, so I instead used the OpenGL-HQ patch to upscale the image.

Reply 77 of 109, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

There you go 😀

Not much testing has been done beyond a simple check if the shader displays something, so if somebody can doublecheck the results...

Attachments

  • Filename
    5xbr-v3.7a.zip
    File size
    2.58 KiB
    Downloads
    88 downloads
    File license
    Fair use/fair dealing exception

http://www.si-gamer.net/gulikoza

Reply 79 of 109, by truth_deleted

User metadata

Thanks! The 5xbr shader produces very good results for SimCity2k. The performance is also very good. To run, I used Ykhwong's build (7/25/13) which includes your d3d patch and d3dx9_43.dll, added 5xbr-v3.7a.fx to a shaders/ directory, edited line in dosbox.conf so pixelshader=5xbr-v3.7a.fx forced, but also added the required Scaling.inc file to shaders/.