03 August 2017, 23:18 | #1 |
Moderator
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. |
04 August 2017, 21:52 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Do you mean RGB mask, not overlay?
btw, any reason for making it that big because masks will automatically repeat the whole screen? |
04 August 2017, 23:32 | #3 |
Moderator
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. |
06 August 2017, 19:45 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
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. |
06 August 2017, 20:40 | #5 |
Moderator
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. |
06 August 2017, 21:14 | #6 | ||||||
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
|
||||||
06 August 2017, 22:41 | #7 |
Moderator
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).
|
07 August 2017, 19:47 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Names of games (or demos) is enough but I'd really like to have the config file to guarantee identical settings.
|
07 August 2017, 23:40 | #9 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
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. Last edited by Photon; 08 August 2017 at 01:07. |
|
10 August 2017, 22:07 | #10 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
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? |
|
11 August 2017, 00:16 | #11 |
Moderator
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. |
11 August 2017, 10:28 | #12 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
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. |
11 August 2017, 13:02 | #13 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,438
|
@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. |
11 August 2017, 16:15 | #14 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
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. |
|
16 August 2017, 23:53 | #15 |
Moderator
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). |
17 August 2017, 18:34 | #16 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
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) |
17 August 2017, 18:52 | #17 |
Registered User
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. |
20 August 2017, 18:22 | #18 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,602
|
Quote:
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. |
|
20 August 2017, 22:34 | #19 | |
Registered User
Join Date: May 2017
Location: EU
Posts: 342
|
Quote:
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. Last edited by guest.r; 21 August 2017 at 11:19. |
|
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 |
|
|