VOGONS

Common searches


First post, by krom

User metadata
Rank Newbie
Rank
Newbie

Hello everyone, I want to talk about hq2x but this is my first post and at first I would like to thank you for Dosbox! the dosbox developpers and contributors are my heroes ! 😀 (sorry for my mistakes in english)

I love the hq2x scaler result, but I don't really understand why there is a such difference between hq2x native dosbox version (0.73 or 0.74) and hq2x Gulikoza's version (direct3d setting version with .fx files) :
- In HQ2x Gulikoza's version, implementation is based on the Mtrooper's D3D port from Moe for original OpenGL implementation. And the hq2x result is wonderful. 😀
- In the official hq2x dosbox version with hq2x with ddraw the result is just correct 😐 . Why a such difference ? (I play in fullscreen)

May be the algo implementations of hq2x are not the same, I would like to understand why. I remember an old version of dosbox (a Moe's patch maybe) with the possibilities to make settings about hq2x it was very nice. May be this is not the official hq2x implementation. 😕

Is it possible to have the same hq2x result in official version ?

Reply 2 of 9, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

What exactly do you mean by "the result is just correct"?

In essence, yes, those are 2 very different algorithms. Moe has done a tremendous job designing a shader version of the HQ algorithm (the OpenGL and D3D versions are not limited to x2 scaling, they will both scale to arbitrary sizes). It is different because of the limitations of the programs that run on the GPU and so the algorithm is optimized for that. So it is not surprising that they will produce different results than the software version. The D3D version is really just a port, so it should look the same as OpenGL-HQ. The software version is (AFAIK) optimized for x2 or x3 scaling (depends if you select hq2x or hq3x) so it does not look as good with different scaling (if you for example run a 320x200 game in fullscreen @1920x1200 then the scaling will be x6)

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

Reply 3 of 9, by krom

User metadata
Rank Newbie
Rank
Newbie

Thank you 😀 I understand, but it is sad that the wonderfull Moe's work is not included in the official version :'(

I've made some screenshots with zoom to compare the hq2x result quality :

hq2xdosboxcompar.png

My dosbox 0.74 config :

[dosbox]
language=
machine=svga_s3
captures=capture
memsize=16

[sdl]
fullscreen=true
fulldouble=false
fullresolution=1280x800
windowresolution=original
output=ddraw
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper-0.74.map
usescancodes=true

[render]
frameskip=0
aspect=true
scaler=hq2x

My config in pre-compiled version that includes direct3d.diff (last version => DOSBoxcvs-090704.zip) :

language=
machine=svga_s3
captures=capture
memsize=16

[sdl]
fullscreen=1
fulldouble=1
fullresolution=1280x800
windowresolution=true
output=direct3d
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper.txt
pixelshader=HQ2x.fx
usescancodes=false

[render]
frameskip=0
aspect=true
scaler=hardware3x

Reply 4 of 9, by krom

User metadata
Rank Newbie
Rank
Newbie

With hq3x scaler in 0.74 the result is better, but your prebuild version Gulikoza with Moe and Mtrooper work is still better in quality result as you can sen below (and for speed too) .

So in my opinion that's why if you use dosbox under windows, Guilokza's prebuild version is THE "must have" dosbox version. Maybe that will change with a hq4x or hq5x implementation in the official version (but not for speed).

So for me (a windows vista user) it is strange that the official version, is not the real "good version" 😒

hq3xdosboxcompar.png

Reply 5 of 9, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Yes this is quite expected. As I've said, the scaler version only scales x2 or x3. With ddraw output, the result is then bilinearly scaled to fullresolution (if the game is 320x200, hq2x will enlarge it to 640x400, hq3x to 960x600, the result is then bilinearly scaled to 1280x800). The only alternative is to use surface mode, but you will get black bars around the image. This is because the scaler system does not take into account the final size of the image. On the other hand, the D3D and OpenGL versions do know the final size of the image so the scaling occurs in one step from 320x200 directly to 1280x800. The D3D pixelshader is incorrectly named hq2x (the name implies only x2 scaling is possible) but will infact work as hq3x, hq4x...hqNx depending on the final image size.

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

Reply 6 of 9, by robertmo

User metadata
Rank l33t++
Rank
l33t++

does it do hqn.nx too? (as you can type any resolution for the window) or it just uses hqnx and then upscales to match window resolution?)

are there any other incorrectly named D3D pixelshaders?

Reply 7 of 9, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Yes it does arbitrary scaling, going from source to destination size in one step. All D3D shaders work this way, but not all are optimized for every x.x factor. I simply named it hq2x because it has a familiar ring to it 😀

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

Reply 8 of 9, by krom

User metadata
Rank Newbie
Rank
Newbie

Is there any chance that OpenGL/Direct3D hqNx scaler will be in a future official dosbox version ? 🙄
It is a huge graphic improvement, and the feature already works, so is there any problematic for that ? I don't want to be critical in all cases 😀 I just want to understand the dev problematics about what could be official or what won't.

Reply 9 of 9, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I would welcome it for OpenGL, not so much for Direct3D, since that is Windows only...

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