04 November 2012, 23:31 | #1 |
Posts: n/a
|
Please help me with my shader!
I'm having a hard time getting my shader to work under WinUAE. It works perfectly with DosBox... hopefully someone out there could give me some help.
My problem is that I can't get scanlines to look right, because I cannot calculate where the current pixel is in screen space. I strongly suspect that WinUAE is rendering a fullscreen quad which is larger than the screen, which makes the calculation impossible without knowing the offsets between the quad and the start of the screen. To make matters worse, WinUAE doesn't provide the screen resolution anywhere, at least that I can see. Here are some screenshots of the shader in action (running on my testbed program, not uae). I think they look nice! |
04 November 2012, 23:35 | #2 |
Zone Friend
Join Date: Jun 2006
Location: Gargore
Age: 44
Posts: 17,789
|
Yes, nice, similar to 1084S monitor image Maybe you didn't notice but screen is out of proportions - stretched horizontal.
|
05 November 2012, 08:18 | #3 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
|
WinUAE has sort of "two-pass" shader system.
First pass uses normal shader files, uses internal coordinates (Amiga coordinates + scaling/positioning) which is rendered to temp texture. This makes shader scanline effects unusable if pixel mapping isn't 1:1 (defaults in filter panel + no scaling). Second pass uses screen coordinates and includes built-in mask and scanline shaders and combines it with first shader's output. (This is _winuae.fx which is written to shader directory) This method allows shaders to work with original non-scaled pixels and still output scaled/repositioned display. Perhaps 3rd pass is needed to support scanlineshaders... (shaders that need to know final display size). (Also note that at least 2.4.0 had a bug that broke shader scanlines even if pixel mapping was 1:1) |
02 February 2013, 21:49 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
|
Old post but I finally had time to update shader handling. (Low in my list of priorities..)
Next beta will introduce "post" shaders that run in final output resolution. "Pre" shaders (same as current shader system does) run in internal Amiga resolution which causes ugly results if scaling is also active. (Scaling is after shader) It also introduces "stacked" shader support, it is now possible to have multiple shaders active at the same time, output from previous shader is input for next shader and so on. Shaders don't need any modifications but GPU power requirements may get quite high.. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Shader support and scaling options in FS-UAE 1.3 | FrodeSolheim | support.FS-UAE | 9 | 18 December 2013 17:30 |
HLSL shader problems + suggestion | TysonJacobs | support.WinUAE | 3 | 07 December 2013 17:04 |
Scanline shader problem | TysonJacobs | support.WinUAE | 3 | 26 July 2013 09:43 |
HQ2X Shader lost when changing Fullscreen / Windowed mode [Solved] | Marskilla | support.FS-UAE | 4 | 26 September 2012 14:54 |
|
|