Video rendering

A place to discuss current and future developments for STeem

Moderators: Mug UK, Steem Authors, Moderator Team

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1811
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Video rendering

Postby Steven Seagal » Tue Nov 05, 2013 10:19 am

I mentioned this In another thread, it's perfectly possible to use vsync in windowed mode, it will work provided your monitor is set at 50hz or 100hz.

Most LCD monitors start at 60hz however, so believe it or not I made a test build using "Triple Buffering" in windowed mode.
The results:
- higher CPU use because at some point we must poll for VBLANK (on the PC of course) instead of surrendering cycles using Sleep(). Steem will take the max it can (eg one core) just for this silly polling.
- not as smooth as vsync, scrollers are not perfect, so triple buffering isn't the cure to all sync problems
- tearing does disappear, so it's an advantage.

In a near future there should be two new SSE options, mutually exclusive:
- VSync for window mode - the best if you can
- Triple buffering (windowed and if I can, fullscreen mode) - if you're annoyed by tearing



(Contrary to what I said I'm improving on the "old" DirectDraw rendering system. But earlier I made tests with SDL and was disappointed, so I'm not sure it would be an improvement. Maybe a later DirectX?)
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1811
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Video rendering

Postby Steven Seagal » Thu Nov 07, 2013 8:40 pm

When testing those new features in Windows 7, it didn't seem to work. It's because some setting has Windows doing its own kind of triple buffering for windows (not fullscreen) if some (default) setting is set, "Compositing" (Desktop Window Manager).

One of the best program to test "tearing" is the boot screen of Enchanted Land. In Windows 7, any version of Steem (or Hatari), there's no tearing with this setting, tearing when it's not set. In XP there's tearing (I think the feature was introduced with Vista).

In fullscreen, that's another story, and in window mode "Compositing" doesn't help VSync at all. But this illustrates what I claimed when this dude requested 'triple buffering': this could be more a thing for OS/hardware/drivers/framework, working with all programs, why should every game or emulator implement this on its own? With the risk that both implementations collide.

Triple buffering doesn't make scrolling smooth, it only removes tearing. Only VSync will make the scrolling smooth, and do the Atari ST justice!

Below the "blurb" from my site:

http://ataristeven.t15.org/Steem_35_com ... _Buffering

Image

Your eyes don't deceive you! This may look like some big features for a point release, but there are some limitations, you're lucky if you can take advantage of VSync (I do!), read further.

- New option "VSync".
This gives you the best display provided your monitor has the correct
refresh rate (50hz/100hz for most programs).
Combined with 'Interpolated Scanlines' this should give you the best
experience of the great game Goldrunner in window mode on LCD screen.
This should work in window mode as well as in fullscreen mode.

This could interfere with "Compositing" (Desktop Window Manager) in Windows
Vista and above in window mode.

- New option "Triple Buffering".
This may be useful to eliminate "tearing" or "ghosting", at the price
of high CPU use.
This should work in window mode as well as in fullscreen mode (stretch
mode only).

"Compositing" (Desktop Window Manager) in Windows Vista and above makes
this option useful only in fullscreen mode, in window mode there's already
no tearing.
This illustrates that those display problems may also be handled at driver
or OS level.


The beta with those features:
http://sourceforge.net/projects/steemss ... SE%20Beta/?
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3439
Joined: Sat Jun 30, 2012 9:33 am

Re: Video rendering

Postby dml » Thu Nov 07, 2013 8:56 pm

I haven't had time to play with this yet but I am following the changes and will use it for testing my new stuff.

I think the best possible case for windowed mode is a fast-enough host machine plus vsync - and a host refresh rate that offers a good integral fit for 50hz (e.g. 100hz) or 60/120. Anything else will either tear or cause duplication/dropping of frames (including triple-buffering - yes this normally just stops tearing).

Frame duplication/dropping at a high enough refresh rate might be ok for 99% of cases even if it's not an integral of 50/60 but it's difficult to say for sure - I'll try to do some comparisons if my machine responds sensibly to the settings.

^^ I meant to say - double buffering stops tearing, assuming vsync. Triple buffering stops tearing with or without vsync.

AnthonyJ
Atari nerd
Atari nerd
Posts: 47
Joined: Sat Jan 26, 2013 8:16 am

Re: Video rendering

Postby AnthonyJ » Mon Nov 11, 2013 12:01 pm

This illustrates that those display problems may also be handled at driver
or OS level.


Or even at the hardware level - nvidia G-Sync presumably would be a good solution for emulators too.

http://www.geforce.co.uk/hardware/technology/g-sync/faq

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1811
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Video rendering

Postby Steven Seagal » Fri Nov 15, 2013 7:08 pm

Let's hope it gives fine results.
Apparently you can't disable Window Compositing in Windows 8, so those new options work best in XP or below, and in Vista/Win 7 you need to disable Compositing. It's not worth it for Triple Buffering, I think Windows does it fine enough, and without consuming CPU cycles. If Steem detects Windows 8, options are disabled.
For VSync, it is worth it but you do need the right monitor frequency (50 or 100hz mostly).

The Triple Buffering option wasn't hard to code, I did it to prove wrong people who think that's the obvious solution for rendering artefacts and loudly request such features.
The real solutions are VSync and hardware/drivers/OS ones.
In the CIA we learned that ST ruled
Steem SSE: http://ataristeven.exxoshost.co.uk/Steem.htm


Social Media

     

Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest