01 May 2012, 20:00 | #1 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
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 Code:
--shader=crt 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 Last edited by FrodeSolheim; 02 May 2012 at 19:05. |
01 May 2012, 21:18 | #2 |
Registered User
|
i'm already using GLSL shaders in Mame, will test it with FS-UAE
|
01 May 2012, 21:56 | #3 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
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 22:02. |
01 May 2012, 22:58 | #4 |
Registered User
Join Date: Feb 2012
Location: Sicily/Palermo/Italy
Age: 46
Posts: 62
|
Working great Frode
|
07 May 2012, 00:17 | #5 |
Registered User
Join Date: May 2006
Location: The Netherlands
Age: 44
Posts: 199
|
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 00:24. |
07 May 2012, 00:31 | #6 | ||
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
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:
(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 00:41. |
||
17 December 2013, 15:41 | #7 |
twenty90seven
Join Date: Jun 2012
Location: Brisbane, Australia
Posts: 196
|
'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. |
17 December 2013, 15:47 | #8 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@twenty90seven Yes, option looks fine, look in the FS-UAE log file for detailed error messages.
|
18 December 2013, 14:04 | #9 |
twenty90seven
Join Date: Jun 2012
Location: Brisbane, Australia
Posts: 196
|
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. |
18 December 2013, 17:30 | #10 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
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...
|
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 19:19 |
Pre-Scaling before Bilinear Scaling? | rsn8887 | request.UAE Wishlist | 6 | 05 September 2015 19:13 |
[FS-UAE] New Dedicated Forum: support.FS-UAE | FrodeSolheim | support.FS-UAE | 1 | 02 October 2012 20:12 |
No IPF (4.2) support for E-UAE? | pintcat | project.SPS (was CAPS) | 3 | 31 July 2011 11:14 |
Compilation options for best e-uae performance with Xgl | Madcrow | support.OtherUAE | 0 | 30 June 2008 16:02 |
|
|