VOGONS


Reply 20 of 32, by Dege

User metadata
Rank l33t
Rank
l33t

Ok, thanks, I see the problem. The cause didn't come to my mind...

dgVoodoo's scaling process isn't really designed for downscaling.
The problem with it is the same as texture mipmapping were invented because of (sampling frequency <= 2x of the original (meaning image sizes are >= 2x of the original), causing information loss).
For downscaling dgVoodoo should render the most appropriate mipmap first, and then do the resampling on that.
I could implement it, but I don't know how important it is. I mean, as a general question, is downsampling needed in dgVoodoo in general?

Reply 21 of 32, by ZellSF

User metadata
Rank l33t
Rank
l33t
Dege wrote:
Ok, thanks, I see the problem. The cause didn't come to my mind... […]
Show full quote

Ok, thanks, I see the problem. The cause didn't come to my mind...

dgVoodoo's scaling process isn't really designed for downscaling.
The problem with it is the same as texture mipmapping were invented because of (sampling frequency <= 2x of the original (meaning image sizes are >= 2x of the original), causing information loss).
For downscaling dgVoodoo should render the most appropriate mipmap first, and then do the resampling on that.
I could implement it, but I don't know how important it is. I mean, as a general question, is downsampling needed in dgVoodoo in general?

Well it's only relevant for games that don't support MSAA, but supports resolution forcing or has native high resolution support. I don't think there are many, but there are some.

Even then it's only relevant for people with lower resolution displays. The higher your resolution is, the better post-processing anti-aliasing works (less blur/distortion). Though post-processing anti-aliasing doesn't fix all the aliasing downsampling would.

And even then, GPU drivers do support it (though Nvidia's support breaks custom resolutions so I would never use it).

As someone who has a main monitor resolution of 3840x2160, I don't really care that much.

Reply 22 of 32, by willow

User metadata
Rank Member
Rank
Member
Dege wrote:
Ok, thanks, I see the problem. The cause didn't come to my mind... […]
Show full quote

Ok, thanks, I see the problem. The cause didn't come to my mind...

dgVoodoo's scaling process isn't really designed for downscaling.
The problem with it is the same as texture mipmapping were invented because of (sampling frequency <= 2x of the original (meaning image sizes are >= 2x of the original), causing information loss).
For downscaling dgVoodoo should render the most appropriate mipmap first, and then do the resampling on that.
I could implement it, but I don't know how important it is. I mean, as a general question, is downsampling needed in dgVoodoo in general?

It's needed for eliminate aliasing in game where msaa doens't work or is insufficient. There are many dx8 and dx9 games in this case.

Reply 23 of 32, by ZellSF

User metadata
Rank l33t
Rank
l33t

That was some of the scaling weirdness I was referring to btw, Dege. I've only seen it with downsampling myself.

If you want a way to reproduce, install Dark Reign 2, set dgVoodoo2 to 3x resolution forcing, desktopresolution to 1920x1080 and set Dark Reign 2's resolution to 1280x720 (and obviously set dgVoodoo2 to use one of its own internal scaling modes). Then just go ingame and look at the UI in the top right and you should see it:

Filename
darkreign2.png
File size
10.57 KiB
Downloads
No downloads
File license
Fair use/fair dealing exception

Reply 24 of 32, by Dege

User metadata
Rank l33t
Rank
l33t

Ok, I see the logic. 720 * 3 == 2160 == 1080 * 2.
So, dgVoodoo renders the frame in 2160p, then seeing it's larger than 1080p of the output, it calculates the first-level mipmap which perfectly fits into the output.

I reproduced it myself with 480 * 3 == 1440 == 720 * 2 (my monitor is only 1440p).
The original image rendered at 3x resolution:
dr2-3x.png
The first-level mipmap calulcated from that (see a pixelated magnification of it to see the problematic pixels):
dr2-3x-mipmap.png

I made the mipmap with Paint.NET (image resize to 50% with bilinear resampling, this is equivalent to averaging 2x2 pixel blocks into one pixel).
The texts look really bad. If you look at the 'C' and 'G' letters I marked on the image, you can see that even lines with the same thickness can look different after the resampling.
It depends on what coordinates (even-odd) the lines are at because the method is based on averaging on 2x2 blocks.

Reply 25 of 32, by ZellSF

User metadata
Rank l33t
Rank
l33t
Dege wrote:
Ok, I see the logic. 720 * 3 == 2160 == 1080 * 2. So, dgVoodoo renders the frame in 2160p, then seeing it's larger than 1080p of […]
Show full quote

Ok, I see the logic. 720 * 3 == 2160 == 1080 * 2.
So, dgVoodoo renders the frame in 2160p, then seeing it's larger than 1080p of the output, it calculates the first-level mipmap which perfectly fits into the output.

I reproduced it myself with 480 * 3 == 1440 == 720 * 2 (my monitor is only 1440p).
The original image rendered at 3x resolution:
dr2-3x.png
The first-level mipmap calulcated from that (see a pixelated magnification of it to see the problematic pixels):
dr2-3x-mipmap.png

I made the mipmap with Paint.NET (image resize to 50% with bilinear resampling, this is equivalent to averaging 2x2 pixel blocks into one pixel).
The texts look really bad. If you look at the 'C' and 'G' letters I marked on the image, you can see that even lines with the same thickness can look different after the resampling.
It depends on what coordinates (even-odd) the lines are at because the method is based on averaging on 2x2 blocks.

Uh? I was strictly referring to the diagonal lines Dreadmoth was talking about (this was split from another topic). I know the text scaling can't be perfect, because that seems obvious to me (not really sure why), what I wanted you to see in that screenshot was:

darkreign2.png
Filename
darkreign2.png
File size
23.07 KiB
Views
967 views
File license
Fair use/fair dealing exception

Reply 28 of 32, by ZellSF

User metadata
Rank l33t
Rank
l33t
Drifter82 wrote:

Hi Dege, is it possible to push the upscaling algo to a WIP build?

Zell, as horrific a visage as that seam is, I think you've used the wrong picture there?

Dege's already uploaded a WIP build with the upscaling changes.

And no I didn't upload the wrong picture, don't worry if you can't follow that particular conversation; it's not important.

Reply 29 of 32, by Drifter82

User metadata
Rank Newbie
Rank
Newbie

Ah, I found it.

I follow the conversation, all the math from this stuff is from signal processing and is freely available if you care to read it. It's also a very poor habit to assume people do not have knowledge.

However,

a) it requires it's own thread
b) the image you posted isn't from any of your previous screenshots, so I have no idea what it's supposed to mean

Anyway, guess I'll try IWD2 with the WIP build, go play some videogames and rot my simple mind. Thanks Dege.

Reply 30 of 32, by ZellSF

User metadata
Rank l33t
Rank
l33t
Drifter82 wrote:

It's also a very poor habit to assume people do not have knowledge.

Something I didn't do. I only assumed you probably didn't want to follow a discussion that's split over two topics that is irrelevant to you.

At any rate, the image I posted was the correct one, if you really want to follow the conversation (waste of both our time) then it starts here:
Re: dgVoodoo 2.6.x and related WIP versions
Continues here, with a post of mine Dege split from the WIP topic:
Re: dgVoodoo 2.6.x and related WIP versions
Dege replies with this, misunderstanding a bit what I was talking about:
Re: Accelerated 2D upscaling for old 2D games.
I clarified here, with the image you thought I posted in the wrong place:
Re: Accelerated 2D upscaling for old 2D games.

Reply 32 of 32, by ZellSF

User metadata
Rank l33t
Rank
l33t
Drifter82 wrote:

Oh Christ mate, just drop the attitude and let people decide for themselves on what they consider relevant or interesting in a topic. Jesus. Moving on..

No attitude, you just seemed to have gotten the impression I insulted you when I didn't so I corrected it.