mamedev / mame

MAME
https://www.mamedev.org/
Other
7.76k stars 1.95k forks source link

HLSL Display Differences between fullscreen and windowed #11012

Open john-iv opened 1 year ago

john-iv commented 1 year ago

MAME version Self compiled x64 from tip of master 3/21/23 10:15 AM PST Mame.exe -version: 0.252 (mame0252-328-g0bd1b70d0e5)

System information i7-12700K @ 5.2Ghz / 64GB DDR5 RAM / Win11 x64 Version 22H 22621.1413 Radeon 5600XT / D3D9 / 2560x1440 Freesync

INI configuration details Fresh mame.ini from mame.exe -cc and vector.ini from dist. package

Emulated system/software Vector games

Incorrect behaviour Fullscreen and windowed produce different bloom-like effects.

Expected behaviour The windowed version's looks which has the same bloom effect on it that we've had in years past before the most recent HLSL.

Steps to reproduce

  1. Mame.exe asteroid -video d3d -hlsl -window
  2. Alt-enter between fullscreen and windowed
  3. Compare differences.

Images: Windowed version on top, fullscreen on bottom.

windowed fullscreen

Originally posted by @john-iv in https://github.com/mamedev/mame/issues/11003#issuecomment-1477072334

ghost commented 1 year ago

Confirmed in 0.253 as well. I used the default mame.ini and the command line you posted above, and here are the results: windowed: astwindowed

fullscreen: astfullscreen

Seems like d3d hlsl is a big headache lately, maybe time to drop it altogether and move on to bgfx as default. Probably a good idea since I see so many posts about people not being aware they need to install the old deprecated runtime to just make hlsl work. June 2010 is a long time ago now.

I just also tried this on a raster based game and there is no difference in brightness between windowed and fullscreen. Maybe only vector games affected?

ghost commented 1 year ago

Playing around with asteroids some more I noticed the playfield doesn't fill the screen at the left and right edges. There's asteroids that are half on and off screen in the pic below, note the gaps in between the left/right window border and asteroids: Untitled2

When they hit the edge at the bottom or top of the screen they disappear as soon as one of the vector lines crosses the threshold, well the tiny ones anyway. The largest tend to go about a third over the top/bottom edges before rolling over to the other side. Doesn't seem correct to me. Happens in fullscreen too.

ICEknigh7 commented 1 year ago

@old-gamer Can you compare with real hardware and check if it doesn't happen too?

ghost commented 1 year ago

@old-gamer Can you compare with real hardware and check if it doesn't happen too?

Yes here https://youtu.be/BmvccMS4Edw?t=342

Watch the big asteroids go near the top of the screen, you can actually see them whole, and they go past the score (00 at top) a fair bit before they completely disappear when an edge touches the edge of the screen. pic from vid: real

mame 0.253: usuck

I played with Space Duel (spacduel) as well and it exhibits the same behavior, the sides have a gap between them and the play field. That game is awesome, like a Super Asteroids/Space War combo.

Ya know, the more I look at that asteroid circled in the upper pic compared to its twin in the mame image, I really am starting to notice that mame has the image stretched vertically and smushed horizontally. Asteroids look shorter and fatter in TNT's video, yet the whole field is visible.

ghost commented 1 year ago

Here's my attempt to fiddle with the stretching sliders, seems like when I touch one it affects the other in a non-intuitive way. Every time I thought I had one axis aligned I would have to dial it differently again when I messed with the other. But the same asteroid I managed to capture in the same spot as the TNT video, and the playfield is cut off even after dialing it down: Untitled

Looks like this has always been a thing or something is really funny with this comp, because the same thing is going on in mame 0.172 and also with bgfx enabled in current 0.253: 0.172 hlsl: 172

0.253 bgfx: Untitled

I want to look at some other vector games and see if they are affected but it's late and I am losing focus here jumping between settings and mame versions.

Mame 0.105 and things are kind of different. I didn't bother with trying to fix the aspect ootb since it is so old, but it is the first version I found where asteroids is closer to normal.

The first image shows where the real playfield edges are on top/bottom. When a large asteroid's edge hits that point it will reappear on the other side, but there's still space between it and the window border. Untitled1

The second image shows that the asteroids go a bit off the screen at the left/right before rolling over to the other side so the boundary is just off screen, and there's barely a 1 pixel gap but you can see it. Untitled2 And it goes without saying you can see more real estate between the borders and the score and Atari copyright which looks like TNT's video.

cuavas commented 1 year ago

Is this fixed by #11249 (e89eb3e77c78015420b9fbfc7d89279b77014190)?

john-iv commented 1 year ago

It is not, as of 0.254 (mame0254-340-g07e72ad252d). (The initial report in this issue about the differences between the full-screen and windowed effects.)

The asteroid cut-off could be spun off to a separate trackable issue.

ghost commented 1 year ago

The asteroid cut-off could be spun off to a separate trackable issue.

Yeah, stick it in with Iceknight's big pile of MT bugs with wrong aspect ratio lol. After I saw those I decided to leave this alone until that mess is detangled.