![]() |
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.
|
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 :shocked * You can download and use shaders created for other emulators with FS-UAE :cool 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). |
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 :D |
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).
|
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.
|
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; |
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! |
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).
|
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: http://fengestad.no/fs-uae/wp-conten...02-12-06-1.png 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). |
Looks pretty good!
|
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 Or just try both with and without and see what you like best :) |
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 :)
|
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.
http://www.craig64.talktalk.net/fsuae1.jpg http://www.craig64.talktalk.net/fsuae3.jpg http://www.craig64.talktalk.net/fsuae5.jpg |
Looks very good indeed. :)
|
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:
|
@twenty90seven you need to check FS-UAE.log.txt for details (attach it to a post if you want me to look at it).
|
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. |
i think i'll give an other try to FS-UAE, all of this seems to be really good. :)
|
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 :-) |
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 |
All times are GMT +2. The time now is 13:49. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.