31 January 2013, 22:03 | #1 |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
Multipass shaders
Hello, firstly, great job on the emulator. I'm using Windows but definitely prefer using FS-UAE when it comes to games. I couldn't find any information about this anywhere else so I thought I would ask here. Is there a way to use multipass shaders? The one I was trying to get working is an implementation of cgwg's crt shader (I think the same one included in FS-UAE), but modified with the added 'halation' effect to create a subtle phosphor glow similar to that of old CRT screens. I think that a key difference with the shader code is that it requires more than one pass to achieve the effect, and I was unable to figure out if multipass shaders are supported or if I'm overlooking something. Any help would be appreciated.
|
31 January 2013, 22:19 | #2 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Yes, multipass shaders are supported! I have implemented the "XML Shader Format 1.1" spec, which is used by several other emulators.
This means that: * Documentation exists * You can download and use shaders created for other emulators with FS-UAE Documentation for the format is found here: https://gitorious.org/bsnes/pages/XmlShaderFormat (Note: for some types of shaders (pixel-enhancing shaders such as hq2x), you may also want to use low_resolution=1 and line_doubling=0 so low-res Amiga pixels are passed on to the shader (without being doubled in each dimension, which ruins the effects of pixel-enhancing algorithms). Last edited by FrodeSolheim; 31 January 2013 at 22:41. Reason: Decided to go crazy with smileys! |
31 January 2013, 22:42 | #3 |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
Thanks for the quick reply I will have a look and see what I can figure out. If you're interested, the shader in question is this:
http://gitorious.org/bsnes/xml-shade...alation.shader For some reason I get a black screen whenever I try to use it. I'm going to have a look through it, as perhaps it's a simple case of tweaking one of the values. I'll have a look at the link you provided there and see what I can come up with, although I'm not very skilled with this kind of thing |
31 January 2013, 22:55 | #4 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
It is also quite possibly a bug in the implementation in FS-UAE. I downloaded the shader you referred to, and it's black here too. If I comment out the last shader pass, the shader "works" (not as intended, of course). I'll have a look and see if there are any obvious bugs (with the implementation).
|
31 January 2013, 23:01 | #5 |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
LOL i'm still looking at the code scratching my head, and you've already made progress and responded. Your efforts are much appreciated It would be very nice if this shader worked, as I do believe it's the best implementation of CRT emulation yet. Good luck! If I can help test anything at all to save time, please let me know.
|
31 January 2013, 23:34 | #6 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Though the shader was stored in the v1.1 folder, it does not follow the 1.1 spec. I noticed the following uniforms in the shader:
Code:
uniform sampler2D rubyOrigTexture; uniform vec2 rubyOrigInputSize; uniform vec2 rubyOrigTextureSize; Last edited by FrodeSolheim; 02 February 2013 at 12:16. Reason: Removed screenshot, see better one in later post |
31 January 2013, 23:46 | #7 |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
Nice work! Would it be possible to post the changes you made to the shader to get it working? I'd love to try this out here...Also, If it helps, RetroArch supports this particular shader, so there may be some clues regarding any progress to the spec there.
Just looked on the site for it, it mentions the following: "RetroArch extends the XML shader spec a bit to allow for things like lookup textures as well as arbitrary lookup of previous passes. With some simple declarations you can for example take two passes, render them to different targets, then make a third pass to blend the two previous passes together in some interesting way. For all of the passes, you have full control over things such as input/output scale and filtering options. Hopefully, this will be part of an eventual v1.2 spec." I hope this helps! |
31 January 2013, 23:47 | #8 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
No changes to the shader, I added support for these "shader extensions" to FS-UAE (based on a bit of guessing, can probably verify with RetroArch as you point out).
|
02 February 2013, 12:14 | #9 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Yes, this shader uses some of the RetroArch extensions to the v1.1 shader spec (though it does not use the "arbitrary lookup of previous passes" feature, only the ability to read from the original emulator frame in later passes).
I discovered that the shader makes some assumptions about the shader pass implementation (regarding the sizes of FBOs in later passes) which is not required by the standard. I have updated the shader support so it works like this shader assumes (it does not break the spec, so shouldn't affect other shaders). I believe it works correctly now: So this shader will work in the next development version. I also added support for capturing screenshots of the OpenGL frame buffer (the native desktop screenshot function did not capture a single complete frame properly). Last edited by FrodeSolheim; 02 February 2013 at 12:54. |
02 February 2013, 12:45 | #10 |
Old fart
|
Looks pretty good!
|
02 February 2013, 14:45 | #11 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
FS-UAE 2.1.24dev is now released, which should be able to use this shader.
You may want to combine this with: Code:
low_resolution = 1 line_doubling = 0 Or just try both with and without and see what you like best |
04 February 2013, 16:21 | #12 |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
Great work! Thanks for your efforts. It works very nicely. I'm not sure the shader's default settings are ideal, however, but with a little tweaking to the halation/scanline density, the display now very much resembles the old Philips monitor I used with my A500
|
11 February 2013, 16:06 | #13 |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
I thought I'd post a few shots from different games, using some custom values in the halation shader. I think the scanlines look more realistic now, at least more in line with what a typical PAL display looks like (My tvs/monitors never had such visible black lines like the shader's default setting). Apologies for the large images. I could not figure out how to make expandable thumbnails.
|
11 February 2013, 16:44 | #14 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
|
Looks very good indeed.
|
14 December 2013, 14:13 | #15 | |
twenty90seven
Join Date: Jun 2012
Location: Brisbane, Australia
Posts: 196
|
Hi,
I am trying to use this shader by pointing to its location. In the configuration file I have typed: 'shader = C:/CRT-interlaced-halation.shader' and when FS-UAE boots, it comes up with a message at the bottom of the screen that the shader did not load. I am not sure what I am doing wrong, I would be grateful if you could give me any tips? Looks like a good shader from the screenshot. Quote:
|
|
14 December 2013, 14:15 | #16 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@twenty90seven you need to check FS-UAE.log.txt for details (attach it to a post if you want me to look at it).
|
16 December 2013, 15:54 | #17 | |
Registered User
Join Date: Jan 2013
Location: Manchester, England
Posts: 14
|
Quote:
If it says failed to compile, then if you can upload the shader somewhere, that would help. I have seen several variants of this crt shader, and not all of them are fully compatible with FS-UAE. |
|
12 March 2014, 13:34 | #18 |
Moon 1969 = amiga 1985
Join Date: Apr 2007
Location: belgium
Age: 48
Posts: 3,913
|
i think i'll give an other try to FS-UAE, all of this seems to be really good.
|
15 January 2017, 09:18 | #19 |
Registered User
Join Date: Apr 2008
Location: France
Age: 41
Posts: 433
|
Hi everyone ! On Retroarch, I found the following shaders combination which gives an amazing result :
apply xbr level 2, scaled 3 times, then apply crt-lottes. Would be awesome if it was possible to do it as well under FS-UAE :-) |
07 July 2017, 15:44 | #20 |
Missile Command Champion
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,438
|
Any chance that you add support for multi-pass shader like CRT-Royale? Talked to guest.r some days ago and he said that's it's currently not possible to port this shader (works through RetroArch) to FS-UAE. The result is amazing.
http://eab.abime.net/showpost.php?p=...2&postcount=26 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Corrected shaders for WinUAE | guest.r | support.WinUAE | 419 | 30 April 2023 14:25 |
HLSL/CG Shaders and xBR | Enverex | support.FS-UAE | 11 | 19 July 2013 16:44 |
fx Shaders in WinUAE 2.6.0 | crazy46guy | support.WinUAE | 8 | 16 June 2013 14:30 |
Sites with Intensity Masks Or Even Some Shaders... | Leandro Jardim | support.WinUAE | 3 | 16 February 2013 05:38 |
Using shaders with FS-UAE on Ubuntu [Solved] | DaveMB | support.FS-UAE | 2 | 14 October 2012 15:46 |
|
|