21 March 2018, 14:39 | #61 |
Registered User
Join Date: Jul 2008
Location: Netherlands
Posts: 485
|
OK, I see.
Is the shader scaling always done according to the supersampling setting, or is it also possible to hardcode a scaling factor in the shader itself (and does WinUAE apply it)? Not sure if this makes any sense (I know little about how the filters and scaling are stacked in WinUAE), but what if besides the current supersampling options in WinUAE (1x,2x,3x,4x) there would be a "0" option, which would mean the supersampling pass / scaling is skipped in total. Would it then work to hardcode a (2x, 3x ,4x) scaling factor in the point-prescale shader and then combined with the "0" setting on the supersampling menu possibly have a sharp-bilinear output without the irregularities? |
21 March 2018, 15:45 | #62 | |||
Registered User
Join Date: May 2017
Location: EU
Posts: 342
|
Quote:
I endorse it, why not. It would resolve the situation in many other ways also. I think this should be put on the TODO list somewhere in the future. Quote:
It could be asked to add this. Quote:
I'll add an example of FS-UAE WHDLoad loading pattern which looks somewhat irregular too, but games look decent enough. It's same with WinUAE. |
|||
21 March 2018, 15:49 | #63 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,453
|
Yep, noticed the same about the blue WHDLoad splash screen. As you said, the games looks always good enough.
|
22 March 2018, 12:41 | #64 | ||
Registered User
Join Date: Jul 2008
Location: Netherlands
Posts: 485
|
Quote:
Quote:
I've attached a picture of the WinUAE output with two areas highlighted. From this it can be clearly seen that the pattern on the left in the blue canvas is quite different from the pattern on the right. The source picture should have no differences in the squares, so I don't understand how point sampling delivers such a different result left and right? (With FS-UAE there's no such difference.) It's this that makes me not totally convinced there isn't a scaling issue somewhere. From reading the forums, it may relate to the same issue that rsn8887 encountered. See his thread here: NULL Filter discrepancies That said, I'm very much pleased with how the filter looks on low resolution game screens, so thanks again for creating it |
||
22 March 2018, 20:37 | #65 |
Registered User
Join Date: May 2017
Location: EU
Posts: 342
|
Yeah it's definitely worth it to get a better understanding of the situation.
In fact, i was looking for an example where there is a glitch that explains and reveals something more. It's obvious that higher multiplier produces a more even image, but there shouldn't be differences beside overall image sharpness in the case of proper integer scaling. Viewer caution advised below, the image is somewhat disturbed. So my initial assumption that there is always internal integer scaling at work might be wrong. But that's nothing that can't be fixed i think. |
23 March 2018, 14:02 | #66 | |
Registered User
Join Date: Jul 2008
Location: Netherlands
Posts: 485
|
Quote:
I think I may have found a clue. I booted into Workbench and changed the native screenmode to PAL: Low Res (320x256), i.e. 1:1 pixel ratio. To my surprise the issue doesn't occur now: the pattern in the left and right part of the blue canvas is the same (like it should). See attached image. This suggest the issue with custom shaders and scaling occurs when native field mode has a 2:1 pixel aspect ratio (like in workbench) , but not when the field aspect ratio is 1:1, like in games. (It also explains why both you, retro-nerd and me didn't see any issues with the filtered graphics in games, as those are all 1:1 pixel aspect ratio.) Toni, does this provide a lead to dig into the code? |
|
24 March 2018, 11:17 | #67 |
Registered User
Join Date: Aug 2014
Location: Zagreb / Croatia
Posts: 302
|
Those settings are made mainly for games which are almost all in lowres. Hires, like Workbench, became ugly with it.
|
25 March 2018, 16:22 | #68 |
Registered User
Join Date: May 2017
Location: EU
Posts: 342
|
Yeah, hi-res is sort off the default setting, but it gives most of the shaders a hard time to handle both games and productivity.
This reminded me to upgrade the crt-hires shader, now it does a better job and the soud doesn't crackle with higher multipliers. I also modified the default _winuae.fx shader to apply the mask in gamma space. Heavier aperture masks look much better and are worth a try. I think it makes the change in D3D9 mode only. If you want default mask handling, then the modified version can be deleted and the original will be auto generated. Last edited by guest.r; 25 March 2018 at 16:59. Reason: Shader update. |
25 March 2018, 16:34 | #69 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,453
|
Could you add sharpness and saturation too, please.
|
25 March 2018, 17:00 | #70 |
Registered User
Join Date: May 2017
Location: EU
Posts: 342
|
No problem, i've updated it above.
|
25 March 2018, 17:09 | #71 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,453
|
Ah, great. You are the best.
|
26 March 2018, 10:30 | #72 | |
Registered User
Join Date: Jul 2008
Location: Netherlands
Posts: 485
|
Quote:
I'm really wondering whether when this shader is hardcoded into the same path as the null filter (which has no issue in hires mode), whether the scaling issue in hires / 2:1 pixel mode with custom shaders / the point-prescale.fx is also resolved. Code:
// Simple point upscaler // License: Freeware string name : NAME = "point"; float2 ps : TEXELSIZE; float4x4 World : WORLD; float4x4 View : VIEW; float4x4 Projection : PROJECTION; float4x4 Worldview : WORLDVIEW; // world * view float4x4 ViewProjection : VIEWPROJECTION; // view * projection float4x4 WorldViewProjection : WORLDVIEWPROJECTION; // world * view * projection string combineTechique : COMBINETECHNIQUE = "POINT"; texture SourceTexture : SOURCETEXTURE; sampler decal = sampler_state { Texture = (SourceTexture); MinFilter = POINT; MagFilter = POINT; }; struct out_vertex { float4 position : POSITION; float4 color : COLOR; float2 t0 : TEXCOORD0; }; out_vertex VS_VERTEX(float3 position : POSITION, float2 texCoord : TEXCOORD0 ) { out_vertex OUT = (out_vertex)0; OUT.position = mul(float4(position,1.0),WorldViewProjection); OUT.t0 = texCoord; return OUT; } float4 PS_FRAGMENT (in out_vertex VAR) : COLOR { return tex2D(decal, VAR.t0); } technique POINT { pass P0 { // shaders VertexShader = compile vs_2_0 VS_VERTEX(); PixelShader = compile ps_2_0 PS_FRAGMENT(); } } |
|
27 March 2018, 19:15 | #73 |
Registered User
Join Date: Jul 2014
Location: Paris
Posts: 73
|
For who know it I am the publisher of Ultimate Amiga Configurations and I present you my last work (not yet published). Are you interested because I stopped every projects last year ?
http://nsa39.casimages.com/img/2018/...1946524152.png http://nsa39.casimages.com/img/2018/...2911677336.png http://nsa39.casimages.com/img/2018/...7404070799.png http://nsa39.casimages.com/img/2018/...4213580527.png Don't forget to click fo to enlarge them. Last edited by 21stcentury; 27 March 2018 at 19:36. |
02 April 2018, 15:21 | #74 |
Registered User
Join Date: Dec 2013
Location: GR
Age: 47
Posts: 1,416
|
Any chance to port "crt-pi" shader? Looks good and is light-weight too.
https://github.com/libretro/glsl-sha...rs/crt-pi.glsl |
02 April 2018, 15:25 | #75 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,453
|
Looks similar to CRT-Easymode.
|
02 April 2018, 15:41 | #76 |
Registered User
Join Date: Dec 2013
Location: GR
Age: 47
Posts: 1,416
|
Actually I think it's based on crt-geom. Crt-easymode runs 20fps on my cellphone and crt-pi runs 60fps easily.
|
02 April 2018, 15:43 | #77 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,453
|
|
02 April 2018, 15:48 | #78 |
Registered User
Join Date: Dec 2013
Location: GR
Age: 47
Posts: 1,416
|
The point is that crt-pi is very lightweight. Meant to run full speed on a humble raspberry pi.
|
02 April 2018, 15:49 | #79 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,453
|
You mean they are in a .fx compatible format on the raspi? Thought you meant WinUAE shader actually for WinUAE.
|
02 April 2018, 15:54 | #80 |
Registered User
Join Date: Dec 2013
Location: GR
Age: 47
Posts: 1,416
|
They are in .glsl format I believe. I use it on my cellphone on retroarch and it's the only CRT shader running 60fps (together with crt-nes-mini). Looks fine, not very fancy but does the job.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multipass shaders | craig64 | support.FS-UAE | 21 | 08 December 2020 11:01 |
HLSL/CG Shaders and xBR | Enverex | support.FS-UAE | 11 | 19 July 2013 16:44 |
fx Shaders in WinUAE 2.6.0 | crazy46guy | support.WinUAE | 8 | 16 June 2013 14:30 |
[FS-UAE] Optimized or corrected Amiga Game Database Entrys | nexusle | support.FS-UAE | 3 | 24 August 2012 21:30 |
Subpixel-corrected lines and polygons on Amiga | Scali | Coders. Asm / Hardware | 9 | 11 January 2012 12:37 |
|
|