English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 03 August 2017, 23:18   #1
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
WinUAE 3.5.0 Overlay affects scaling

I'm using the attached PNG as overlay to get scanline control.

Steps to reproduce:
1. Default A500 configuration, Set Configuration, Start.
2. Insert a disk with something that scrolls something vertically or horizontally. Run it, looks correct.
3. Go Filter > Overlays > select an overlay, like the attached file.
4. You can now see a pixel line or column missing, depending on whether the something scrolls vertically or horizontally.

Since my overlay has only horizontal lines, and it removes a pixel column when scrolling horizontally, the overlay is fine and instead the scaling of the underlying Amiga-pixel graphics is shrunken by a Windows-pixel or two, both vertically and horizontally.

Speculation: this is perhaps the reason why I had to misalign the overlay by 1 Windows-pixel.
Attached Thumbnails
Click image for larger version

Name:	ScanlinesFinal.png
Views:	338
Size:	4.6 KB
ID:	54007  
Photon is offline  
Old 04 August 2017, 21:52   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Do you mean RGB mask, not overlay?

btw, any reason for making it that big because masks will automatically repeat the whole screen?
Toni Wilen is offline  
Old 04 August 2017, 23:32   #3
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
No, overlay. I want to use transparency, so I don't want to use a mask. Is that correct?

Well I think what file it is doesn't matter? Overlay: none - normal scaling, overlay: file - pixelcolumn/row missing. At least so far... just wanted to make it as simple and reproducible case as possible.

UPDATE:
Cropped the same .png to 16x16. If I then use it as overlay, it doesn't repeat the picture is scaled very incorrectly, something like 64x256 and flipped horizontally and vertically :P

Tried using both as Mask, it's not what I want but results: 16x16 one gives 32 unmasked lines vertically. The 720x568 one gives 1 line unmasked vertically.

Last edited by Photon; 05 August 2017 at 16:14.
Photon is offline  
Old 06 August 2017, 19:45   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Overlay always scales (It isn't meant for this kind of purpose) and if I select 720x568 window size, it looks correct.

Always include example images!

EDIT: Check example masks to see how it works, it is different than overlays that are only meant for things like monitor bezels.
Toni Wilen is offline  
Old 06 August 2017, 20:40   #5
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
I could do the overlay if I knew what size it should be for a given window/fullscreen size, in order to not change the scaling.

I could help make a "like CRT" option?

I can't find documentation or example overlays/masks on Winuae.net or via a quick web search.

A mask would intuitively be a better match for a bezel...?

It was unexpected that adding an image would affect the buffer output itself. I think it's wrong. It's something you add.

Just overlaying an image as it is would help me create better scanlines (Filter > Scanline opacity is just not usable.)

No correct scanlines shader in the shader thread yet, and I don't know if the shader work per lores pixel or if it takes into consideration scanline number, neighboring pixel colors, scalingfiltering when size isn't an even multiple etc. I guess it does. Ideally for an eyecandy one you would want glow around each pixel.

But I wanted to make something simpler and strict to match my CRT. Maybe also better performance and working in hires etc.

Example images: a still image doesn't show a missing pixelcolumn/row. Just load any ADF with something that scrolls. Steps to reproduce is still valid.
Photon is offline  
Old 06 August 2017, 21:14   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Quote:
Originally Posted by Photon View Post
I could do the overlay if I knew what size it should be for a given window/fullscreen size, in order to not change the scaling.
As I said, it is always scaled. You are trying to do something that is not supported.

Quote:
I could help make a "like CRT" option?
I don't really care because there is the usual problem: everyone has different idea of "like CRT" and usually others idea is always wrong too. I stay far far from these kinds of threads.

Quote:
I can't find documentation or example overlays/masks on Winuae.net or via a quick web search.
Pixel shader package contains masks (originally from MAME I think)

Quote:
A mask would intuitively be a better match for a bezel...?
Ignore names, they probably have some historic reasons..

Quote:
No correct scanlines shader in the shader thread yet, and I don't know if the shader work per lores pixel or if it takes into consideration scanline number, neighboring pixel colors, scalingfiltering when size isn't an even multiple etc. I guess it does. Ideally for an eyecandy one you would want glow around each pixel.
Shader should be able to do everything needed. Monitor does not know if mode is lores or hires anyway. It is just a "line" from monitor point of view.

Quote:
Example images: a still image doesn't show a missing pixelcolumn/row. Just load any ADF with something that scrolls. Steps to reproduce is still valid.
No. I can't duplicate. Config file + used program etc MUST be included. Always!
Toni Wilen is offline  
Old 06 August 2017, 22:41   #7
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
I will see if I can make something proper out of the shader package, but my symptom with just the overlay and nothing else shows in all software. I've attached two scrolling games. Look closely at about 40% up from bottom (vert scrolling) and about 40% in from left (horiz scrolling).
Photon is offline  
Old 07 August 2017, 19:47   #8
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Names of games (or demos) is enough but I'd really like to have the config file to guarantee identical settings.
Toni Wilen is offline  
Old 07 August 2017, 23:40   #9
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Quote:
Originally Posted by Toni Wilen View Post
Names of games (or demos) is enough but I'd really like to have the config file to guarantee identical settings.
You mean that if I start a Quickstart config, Set Configuration, Start, it's still dependent on something? Host config is Default, and there's no such config in the Host/ folder so I don't know what to send. Did not use Windowed.uae but I guess I can attach that?

Also crap, I'm sorry I haven't been able to play with the shader zip. I will do so now.

Edit: well, no luck with anything approaching CRT with the shader zip yet. I will ask in that thread what the meaning is.
Attached Files
File Type: uae Windowed.uae (14.5 KB, 125 views)

Last edited by Photon; 08 August 2017 at 01:07.
Photon is offline  
Old 10 August 2017, 22:07   #10
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Quote:
Originally Posted by Toni Wilen View Post
As I said, it is always scaled. You are trying to do something that is not supported.
What are overlays used for?

Shader zip and additional shaders don't seem to touch it - at least so far, only 1 file in there, a readme.txt that says "Put bezel overlay files here."

But I wouldn't know what size to make them, I've tried a few now. Having an overlay makes the size sliders take effect and the default is -1, which means mirroring. The scaling is multiplied by the size of the image in a way that is very hard to make sense of.

I guess I'll experiment more then, I pretty much have to since shaders are lores only, which is useless. Is there documentation on how to make overlays for WinUAE?
Photon is offline  
Old 11 August 2017, 00:16   #11
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
I've experimented a lot, and I have not gotten any of these overlays to not shrink the picture to "slightly less than any 1x, 1.5x, 2x etc" in any scaling mode with any parameters or window sizes.

Default config, enable an overlay, play around all you want with parameters, you can't unbreak it. Exact overlay, picture shrunk. Slightly larger, picture shrunk. Slightly smaller, picture shrunk.

You can use the 2x2 checker .iff to see that lores pixels are skipped. For a 720x568 overlay on a 720x568 window, 3px horiz and 3px vert. Increasing the window size by as much or any other value doesn't help, it "breaks the overlay more" instead (parts of the overlay hugely upscaled and bilinear-blurred).

I think a small value is subtracted from used measurements before applying the scaling, or it's done with lots of low-precision floats in succession to give a very bad rounding, almost 8-bit in resolution instead of single precision. And then you can't fix it, even if you could enter the values for the scaling sliders manually, you'd be chasing a measurement that won't be available.

Last edited by Photon; 11 August 2017 at 00:29.
Photon is offline  
Old 11 August 2017, 10:28   #12
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
I still don't understand what are you trying to do with overlays, as I said, they are only for monitor bezels (search for them, there is thread about them), trying to use them for anything else is undefined and unsupported.

Shaders get configured internal Amiga resolution in display panel (lores/hires/shres), so why do you think they are lores only?

EDIT: Separate "real overlay" would fix it but I am not sure how "normal" or "real" overlays are supposed to work vs RGB masks. (I still think RGB masks are what most others call overlays)

Last edited by Toni Wilen; 11 August 2017 at 10:54.
Toni Wilen is offline  
Old 11 August 2017, 13:02   #13
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
@Toni

He probably misread the FS-UAE shader thread. It's a bit confusing with all the FS-UAE/WinUAE lores and hires shader stuff in one single thread.
Retro-Nerd is offline  
Old 11 August 2017, 16:15   #14
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Quote:
Originally Posted by Toni Wilen View Post
I still don't understand what are you trying to do with overlays, as I said, they are only for monitor bezels (search for them, there is thread about them), trying to use them for anything else is undefined and unsupported.

Shaders get configured internal Amiga resolution in display panel (lores/hires/shres), so why do you think they are lores only?

EDIT: Separate "real overlay" would fix it but I am not sure how "normal" or "real" overlays are supposed to work vs RGB masks. (I still think RGB masks are what most others call overlays)
I know what bezels are. Overlaying a bezel on top of an arcade game, which is where they come from, does not shrink the picture. It masks the edges of the picture.

I will try more shaders, but I need control to make it accurate. The shaders seem geared toward general looks/eyecandy and a gamer doesn't care if a pixel is half width or intermittently blurred. For general application, the (Amiga) pixels must all be the same size and shaded the same way. Like in Vice, BlueMSX, etc etc.

If there is someone who has ever used Overlays in WinUAE, I'm sure they've been unable to scale it back to where the picture displays properly and there aren't a bunch of artifacts. See previous files. You can measure the width in PC-pixels of an Amiga screen or window, then add an overlay, and the width for the same Amiga screen or window - you will be unable to get that width back. (Which is the symptom of the error in thinking in the implementation of it; if you could, then a scaled representation of the Amiga output is possible, else it's just the result; what you ended up by enabling Overlay.)

The current Overlay method seems to use correct alpha channel compositing, probably Mask uses the same although it should be Multiply with grayscale and no alpha channel if you're being strict. EDIT: masks follow the latter, which is good but which also does not allow scanline-based raising of the black point, as on CRTs.

Sorry for the frankness in this thread, but it feels like an early function that has been abandoned and that nobody has used because there's no way to make it work properly. Regarding the scaling, I mean. It seems it subtracts about 16px horizontally and about 4px vertically from the right and bottom before applying the scaling.

Last edited by Photon; 11 August 2017 at 22:58.
Photon is offline  
Old 16 August 2017, 23:53   #15
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Hey Toni Here is my current status in getting something not-for-gaming working. See my work in my last post and my recipe in a previous post.

All this is NOT geared toward "individual opinions of what their CRT looks like". It's from

a) No aligned Filter scanlines
b) Aligned scanlines in Mask (by unaligning the mask...), but this does not allow the Desaturation and black level adjustments possible with a custom Overlay (that works properly), so botched job that will have to do for now with Mask plus coarse Display tweaks...
c) Shaders don't offer aligned scanlines either, and degrade picture quality


So for aligned scanlines without shaders and better precision and CRT colors (but no other CRT emulation), this is what I've whittled it down to and see as needed currently.

1. Desaturation option. Same as shaders. Will avoid Gamma tweaks destroying the colorspace.
2. Overlays working, this is to avoid brightening the whole picture (destroy blacks) and then masking down (to get blacks). (If you set my 720x568 Overlay as a mask, you will see a "cross" in lower right that I think is a hint for what's wrong with the scaling that is applied. Change horiz. pos also to make it clearer.)
3. 2x, 3x etc scale without filtering is already possible. There seems to be an issue applying the Mask/Overlay, though (see 1 spurious Mask line). This is the Mask that works in Windowed.
4. Then: post-scale the whole thing to "1.5x" (any texture size, fits any size and resolution lower than the 2/3x scale using Bicubic filtering (not bilinear).

If this is possible, just good scanlines and just accurate colors are possible as in f.ex. Vice, BlueMSX, etc.

I'm pushing for this because I want UAE to match those emus, of course. <3

Gamers may want creative shaders with character that makes game X more enjoyable and I'm all for that. But I just want some reference established that can be used for checking and then it will look the same on a real Amiga.

I've not shared Display tweaks because I know my pictures in that thread are WIP = not reference scanlines, reference colors yet (because of 1/2/3/4 above).
Photon is offline  
Old 17 August 2017, 18:34   #16
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Perhaps but this is not my code, everything is copied from elsewhere (+mainly support for multiple shaders/filters at the same time is my code).

I hate shader, filter, whatever stuff. 1:1 pixel mapping only. Find something that does what you need and uses D3D (and is GPL compatible), then ask me to integrate it.

Second point: I have repeatedly asked for config file (and all the required files), so far nothing. No complete config file = no help. (Quickstart or not makes no difference for host config which includes filters)
Toni Wilen is offline  
Old 17 August 2017, 18:52   #17
nobody
Registered User
 
nobody's Avatar
 
Join Date: Dec 2013
Location: GR
Age: 46
Posts: 1,416
If i get it right you want to do a mask that does a scanline per pixel?
This works for me full screen by using a mask (high res, 2x scaling)

Last edited by nobody; 17 August 2017 at 19:24.
nobody is offline  
Old 20 August 2017, 18:22   #18
Photon
Moderator
 
Photon's Avatar
 
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
Quote:
Originally Posted by Toni Wilen View Post
Perhaps but this is not my code, everything is copied from elsewhere (+mainly support for multiple shaders/filters at the same time is my code).

I hate shader, filter, whatever stuff. 1:1 pixel mapping only. Find something that does what you need and uses D3D (and is GPL compatible), then ask me to integrate it.

Second point: I have repeatedly asked for config file (and all the required files), so far nothing. No complete config file = no help. (Quickstart or not makes no difference for host config which includes filters)
I've started to link client configs to host configs now. I didn't before.

The effects this has is that when I Quickstart and want to save a client config, UAE has hard-linked it to whatever Host config I loaded last. Normally this is blank.

And Host Configurations is no longer at "Default Configuration" as it said in the Quickstart panel drop-down. It's set to whatever Host config I used last, NOT the one hard-linked to the newly created client config that I saved out.

This has confused me about what to send. But here is a zip with that client config and both host configs + bootlog because I don't know which one the client config is actually using.


Note that I would be happy to use a shader, if it weren't that the examples posted do too much and then just slap on scanlines wherever over the picture. The needed list above is the todo-list left after tweaking CRT-Hyllian.fx.

So again this started as me just bug-reporting that the non-shader overlays won't work for anyone.
Photon is offline  
Old 20 August 2017, 22:34   #19
guest.r
Registered User
 
guest.r's Avatar
 
Join Date: May 2017
Location: EU
Posts: 342
Quote:
Originally Posted by Photon View Post
Note that I would be happy to use a shader, if it weren't that the examples posted do too much and then just slap on scanlines wherever over the picture. The needed list above is the todo-list left after tweaking CRT-Hyllian.fx.
You mean the "gaming shaders" ? They could even display even scanlines at 2x vertical integer scaling, but they were not designed for that low scale. Pixel art games operate at predictable vertical resolutions which ensures the scaling at 1080p is about 4x-5x. They look good even with non-integer scaling, the higher the scale the nicer the scanlines look.

Your case is quite specific i think, 2x scale of the WB full frame.
Edit: it could also be 1x WB full frame with hires/doble line mode.

Writing a shader for this should be easy enough. I'm still looking for the setting which allows the shader to render at the exact output resolution. Point/Bilinear shouldn't make a difference here with integer scaling. I guess the current filter framework implementation can upscale a bit and then adjust the image with point / bilinear downscale. It's ok for these CRT shaders with linear, but if you want every modulo 2 scanline to be perfectly aligned then the best you can get is an approximation.

Image1: Auto integer scale, point resize.
Image2: Scanlines within margin of error for games.
Attached Thumbnails
Click image for larger version

Name:	Point-scanlines.png
Views:	235
Size:	121.0 KB
ID:	54270   Click image for larger version

Name:	CRT-Guest-Winuae.png
Views:	218
Size:	355.0 KB
ID:	54271  

Last edited by guest.r; 21 August 2017 at 11:19.
guest.r is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
RGB Overlay on Amiga Forever uses WinUAE engine Leandro Jardim support.WinUAE 2 31 July 2014 16:50
WinUAE will have overlay support again? Leandro Jardim support.WinUAE 2 17 October 2010 22:19
D3D problems (ATI HD2xxx) - scaling/scanlines/overlay. galu support.WinUAE 3 09 February 2010 15:29
PIP overlay feature for winuae laser request.UAE Wishlist 3 11 October 2007 14:05
WinUAE 1.1 RGB overlay issue Alan support.WinUAE 8 22 February 2006 16:39

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:53.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10172 seconds with 16 queries