English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 01 May 2012, 21:00   #1
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 39
Posts: 3,608
Shader support and scaling options in FS-UAE 1.3

FS-UAE 1.3 now support shaders written in GLSL. First a bit of information about new scaling options:

More Flexible Scaling Options

Here is the outline of the modified scaling algorithm in FS-UAE 1.3:

The input size of the Amiga display is given by "autoscale algorithm" or viewport settings.

The output size of the Amiga display is initially calculated like this.
• output size if set to the size of FS-UAE window (or fullscreen)
• if aspect correction is enabled, the output size is modified so that the aspect is maintained. Either width or height is reduced appropriately.

This is identical to existing behaviour, the new stuff follows:

scale_x and scale_y options (both defaults to -1.0) are now checked and the following is performed separately for x and y (using x as example):
- if scale_x is negative, the absolute value of scale_x is a scale factor to be applied to the current output width -effectively a scaling factor relative to the display window (e.g. -0.5 will make the display half as wide as without this setting, -2.0 will make it double as wide)
- if scale_x is positive, output with is set to the input size of the Amiga display multiplied with scale_x. Setting scale_x to 2.0 will make the output width 2x the input width, and is especially useful if you want 1:1 pixel mapping on your LCD (or 1:2 or 1:3 etc) for extra crisp graphics (or to avoid aliasing effects with certain shader effects).

After this has been performed for both x and y axes, this is the final output size. The Amiga display will now be scaled from the input size to the output size and shown on screen.

If you have activated a shader, the shader will get both the input size and the final output size as parameters, so these values can be used by the shader to make intelligent choices.

By default, this output rectangle will be centered on the FS-UAE window. You can use the align_x / align_y options to modify this. align_x = 0.0 means to left-justify, align_x = 1.0 means right-justify etc. The entire scale can be used, and values < 0.0 and > 1.0 can also be used to force parts of the Amiga display to be pushed outside the screen.

Default settings (makes FS-UAE behave exactly like in earlier releases): scale_x = -1.0, scale_y = -1.0, align_x = 0.5, align_y = 0.5

Shader Support

FS-UAE 1.3 implements the XmlShaderFormat 1.1 as described here:
https://gitorious.org/bsnes/pages/XmlShaderFormat

This makes FS-UAE compatible with a number of existing shaders, such as the screen curvature shader shown in the attached screenshot, and also implements a flexible framework for writing shaders with multiple rendering passes.

A shader is loaded by using the option "shader" (path to XML shader file).

(the only "problem" when using shaders is that the reflection and side may not be rendered darker in perspective mode)

Try it out

Download FS-UAE 1.3 here:
http://fengestad.no/wp/fs-uae/download-beta

FS-UAE 1.3.1+ has some bundled shaders: they are activated like this:
Code:
shader = crt
or (program argument):
Code:
--shader=crt
Whereas external shaders are activated by setting the shader option to the path to the shader.

Some shaders can be downloaded here:
https://gitorious.org/bsnes/xml-shad...shaders/OpenGL

If you want to write your own shader, this page contains information about the shader XML format:
https://gitorious.org/bsnes/pages/XmlShaderFormat

and I'll answer questions regarding XML shader format and FS-UAE in this thread
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2012-05-01 15:27:11.png
Views:	849
Size:	303.5 KB
ID:	31443  

Last edited by FrodeSolheim; 02 May 2012 at 20:05.
FrodeSolheim is offline  
Old 01 May 2012, 22:18   #2
Foul
Registered User

Foul's Avatar
 
Join Date: Jun 2009
Location: Perigueux/France
Age: 45
Posts: 1,436
Send a message via ICQ to Foul Send a message via MSN to Foul
i'm already using GLSL shaders in Mame, will test it with FS-UAE

Foul is offline  
Old 01 May 2012, 22:56   #3
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 39
Posts: 3,608
Quote:
Originally Posted by Foul View Post
i'm already using GLSL shaders in Mame, will test it with FS-UAE
Note that shaders written for MAME will not work without modifications. Here are some info and screenshots of shaders written against the XML shader spec (and which should be compatible with FS-UAE):

http://filthypants.blogspot.com/2011...t-updated.html

Last edited by FrodeSolheim; 01 May 2012 at 23:02.
FrodeSolheim is offline  
Old 01 May 2012, 23:58   #4
Speedvicio
Registered User
Speedvicio's Avatar
 
Join Date: Feb 2012
Location: Sicily/Palermo/Italy
Age: 42
Posts: 62
Working great Frode
Speedvicio is offline  
Old 07 May 2012, 01:17   #5
MrX_Cuci
Registered User
 
Join Date: May 2006
Location: The Netherlands
Age: 40
Posts: 186
Can't wait to test out the curves CRT shader.



Will you add this aswell or can those shaders be used aswell?:

http://www.tortuga-cove.com/forums/viewtopic.php?t=3026

[ Show youtube player ]

Last edited by MrX_Cuci; 07 May 2012 at 01:24.
MrX_Cuci is offline  
Old 07 May 2012, 01:31   #6
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 39
Posts: 3,608
Quote:
Originally Posted by MrX_Cuci View Post
Can't wait to test out the curves CRT shader.

Will you add this aswell or can those shaders be used aswell?:
Hi! -CRT shaders are bundled in the latest development version:
http://fengestad.no/wp/fs-uae/download-beta

set option:
shader = crt
or
shader = curvature
(or run fs-uae with --shader=crt or --shader=curvature)

EDIT: And of course, you can download and use any compatible shader by pointing the shader option to the shader file.

Quote:
Originally Posted by MrX_Cuci View Post
http://www.tortuga-cove.com/forums/viewtopic.php?t=3026
[ Show youtube player ]
(SSNES (manual reader shader))
No, these will not work. The implemented shader spec does not have anything to do with key presses for instance, and the shaders cannot load custom images either.

(I have on the todo list somewhere a built-in manual overlay reader though, but this has nothing to do with shaders in FS-UAE really)

Last edited by FrodeSolheim; 07 May 2012 at 01:41.
FrodeSolheim is offline  
Old 17 December 2013, 16:41   #7
twenty90seven
twenty90seven
twenty90seven's Avatar
 
Join Date: Jun 2012
Location: Brisbane, Australia
Posts: 150
'Whereas external shaders are activated by setting the shader option to the path to the shader.'

Would an example of this be: shader = C:/Shaders/Sepia.shader

I downloaded the Sepia shader from the website recommended on this page, and placed it in a folder I created on my C Drive (Shaders) but FSUAE says No Shader Passes Loaded.

Am I typing the path in a way that the program recognises it? An example path would be good.
twenty90seven is offline  
Old 17 December 2013, 16:47   #8
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 39
Posts: 3,608
@twenty90seven Yes, option looks fine, look in the FS-UAE log file for detailed error messages.
FrodeSolheim is offline  
Old 18 December 2013, 15:04   #9
twenty90seven
twenty90seven
twenty90seven's Avatar
 
Join Date: Jun 2012
Location: Brisbane, Australia
Posts: 150
Hi, I found a workaround. I see that the shaders are stored in Users/[whateveryournameis]/AppData/Local/fs-uae/share/fs-uae/shaders.
I then took the code for the blur shader and cut and paste it into the curvature shader.
Now I have curvature and blur!
I presume that you would just drop the shader into this folder instead of pointing FS-UAE to where your shader is elsewhere on your computer.
twenty90seven is offline  
Old 18 December 2013, 18:30   #10
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 39
Posts: 3,608
Quote:
Originally Posted by twenty90seven View Post
I presume that you would just drop the shader into this folder instead of pointing FS-UAE to where your shader is elsewhere on your computer.
Well, you're not really supposed to put files into the installation folder, but you can of course do it. I assumed people would rather use the shader option to point to the file...
FrodeSolheim is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
FS-UAE and midi support? shax71 support.FS-UAE 16 29 December 2019 20:19
Pre-Scaling before Bilinear Scaling? rsn8887 request.UAE Wishlist 6 05 September 2015 20:13
[FS-UAE] New Dedicated Forum: support.FS-UAE FrodeSolheim support.FS-UAE 1 02 October 2012 21:12
No IPF (4.2) support for E-UAE? pintcat project.SPS (was CAPS) 3 31 July 2011 12:14
Compilation options for best e-uae performance with Xgl Madcrow support.OtherUAE 0 30 June 2008 17:02

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


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.07328 seconds with 13 queries