English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 05 November 2012, 00:31   #1
tjcbs
 
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!
Attached Thumbnails
Click image for larger version

Name:	beast.png
Views:	342
Size:	327.1 KB
ID:	33087   Click image for larger version

Name:	agony.jpg
Views:	319
Size:	56.7 KB
ID:	33088   Click image for larger version

Name:	samurai.jpg
Views:	298
Size:	85.3 KB
ID:	33089  
 
Old 05 November 2012, 00:35   #2
s2325
Zone Friend

s2325's Avatar
 
Join Date: Jun 2006
Location: Gargore
Age: 40
Posts: 17,789
Yes, nice, similar to 1084S monitor image Maybe you didn't notice but screen is out of proportions - stretched horizontal.
s2325 is offline  
Old 05 November 2012, 09:18   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,627
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)
Toni Wilen is online now  
Old 02 February 2013, 22:49   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 45
Posts: 24,627
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..
Toni Wilen is online now  
 


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 18:30
HLSL shader problems + suggestion TysonJacobs support.WinUAE 3 07 December 2013 18:04
Scanline shader problem TysonJacobs support.WinUAE 3 26 July 2013 10:43
HQ2X Shader lost when changing Fullscreen / Windowed mode [Solved] Marskilla support.FS-UAE 4 26 September 2012 15:54

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 18:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.06535 seconds with 14 queries