17 July 2013, 00:24 | #1 |
Registered User
Join Date: Jul 2013
Location: Nashville/USA
Posts: 10
|
HLSL shader problems + suggestion
I noticed a problem with my own shader, but really it seems most/all of the shaders don't work properly. My gut feeling is that the source texture dimension variables (SourceDims/TexelSize) aren't being set correctly.
Look at the D3D hq2x shader vs the native one. You can see differences and errors in the D3D version along the edges of lines (2.70 beta, using lores/normal linemode, no scaling or aspect correction): (d3d) (internal) D3D 2xsai is even more of a mess: (d3d) (internal) However, I tried hard-coding the source dimensions to 320x256, and there were still problems. Are there additional buffer areas in the source texture, making it larger than 320x256? Or maybe this is not the real issue. Also, I have a suggestion: Would it make sense, for the 1st shader pass (the user-shader one), for all of the scaling/aspect ratio corrections/etc to happen in this step? And then the second pass would only do the masks/overlay and whatever other non-scaling adjustments need to be done? This way, shaders would have both the source dimensions and the output dimensions available to them, and there wouldn't be a need for this middle pass. Also, scaling is almost always destructive to scanlines, so really IMO shaders should always be rendering to the final output dimensions. Last edited by TysonJacobs; 17 July 2013 at 01:33. |
17 July 2013, 08:10 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,567
|
Attach your config because I can't duplicate it.
Make also sure hq2x is set as "0" level shader (input=amiga texture size, output=screen texture size). <0 have amiga texture size input and output. >0 have screen texture size input and output. |
18 July 2013, 07:10 | #3 |
Registered User
Join Date: Jul 2013
Location: Nashville/USA
Posts: 10
|
I've found that the hq2x problem is both dependant on resolution and not reproducable on my AMD 4670, only on my 3470. Since that uses legacy drivers, it may be a driver issue, and not worth looking into.
The 2xsai shader distributed with uae is simply broken. My bad. |
07 December 2013, 17:04 | #4 | |
Posts: n/a
|
Quote:
The optimal way looks like this (for this shader): -the emulator takes the emulated displayable buffer part and 2x point scales it to the source texture - it applies the shader - source and output resolutions are irrelevant, only "texels per pixel" and sampler types matter The shader as it works now hopes everything is OK using hires with double line mode since it "should" provide pixels 2x2 texels big in most of the cases. But hey maybe Amiga computers dynamically interlaced operating modes in their DAC at 100/120Hz (and it's either/either emulated in WinUAE atm). I guess this multipass specs are still under development atm. regards, guest.r |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any chance we'll see HLSL or similar CRT emulation in a future release? | dekarAF | support.WinUAE | 57 | 14 November 2015 16:45 |
Scanline shader problem | TysonJacobs | support.WinUAE | 3 | 26 July 2013 09:43 |
HLSL/CG Shaders and xBR | Enverex | support.FS-UAE | 11 | 19 July 2013 16:44 |
Please help me with my shader! | tjcbs | support.WinUAE | 3 | 02 February 2013 21:49 |
MAME: How to use HLSL? | Leandro Jardim | Retrogaming General Discussion | 3 | 28 December 2012 02:55 |
|
|