![]() |
![]() |
#1 |
Fantasy Man!
Join Date: Apr 2002
Location: UK
Posts: 1,353
|
HLSL/CG Shaders and xBR
I noticed FS-UAE uses the XML shader format, is it possible to use the CG shader format as well?
I ask because I've been looking around a few different places for various emulation setups and stumbled across the xBR scaler which appears to be the best scaler for most situations (better rounding and clarity than HQnX and also faster). An example of a shader I'm referring to here is - https://github.com/libretro/common-s...R/4xBR-v4.0.cg |
![]() |
![]() |
#2 |
FS-UAE Developer
![]() Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
High-level shading language (HLSL) is a proprietary shading language for Direct3D. FS-UAE uses OpenGL and shaders must be written in GLSL (OpenGL Shading Language).
It is possible that an nVIDIA cg tool can convert the cg shader code to GLSL, and you could then possibly wrap the resulting GLSL code in the XML shader format. This probably requires some know-how, and is not for everyone... |
![]() |
![]() |
#3 |
Fantasy Man!
Join Date: Apr 2002
Location: UK
Posts: 1,353
|
Ah, that's a shame, that said, I did find an XML version. Does this look compatible to you? - https://gitorious.org/bsnes/xml-shad....OpenGL.shader
|
![]() |
![]() |
#4 |
FS-UAE Developer
![]() Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Yes, that shader is in the right format, and using the GLSL language. Just download it, and point the FS-UAE shader option to that file
![]() |
![]() |
![]() |
#5 |
Fantasy Man!
Join Date: Apr 2002
Location: UK
Posts: 1,353
|
I assume you need to use "Low Resolution" with this otherwise it's rendered at a high res and there's nothing to actually scale with the shader?
|
![]() |
![]() |
#6 |
FS-UAE Developer
![]() Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
There'll always be something to scale. Not having lowres (etc) means that pixels are doubled. That is, the source image to the shader is already scaled 2x. This will confuse pixel-enhancing shaders which assume 1:1 pixels in the source image, so for such shaders you want to use lowres/no line doubling when playing lowres/non-interlaced games.
I don't know what this shader does, but you'll easily see what gives best results, I should think ![]() |
![]() |
![]() |
#7 |
Fantasy Man!
Join Date: Apr 2002
Location: UK
Posts: 1,353
|
Last question then, this all works fine when launching fs-uae directly, but I use fs-uae-launcher for simplicity and I can't see any way of using shaders through it. There isn't an option in the options and it seems to ignore what's set in the main fs-uae config file. Is it currently possible?
|
![]() |
![]() |
#8 |
FS-UAE Developer
![]() Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Yes, just enter Custom Configuration (menu) -> Custom Settings, and add a separate line with:
Code:
shader = write path to shader here |
![]() |
![]() |
#9 |
Fantasy Man!
Join Date: Apr 2002
Location: UK
Posts: 1,353
|
Ahh, completely missed what that section was for when I glanced at it before. Cheers Frode.
|
![]() |
![]() |
#10 |
Registered User
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 472
|
Hi,
if you are looking for xBR-shaders you should checkout this site: http://filthypants.blogspot.de/2012/03/xbr-vs-hqx-interpolation-filter.html This blog is very interesting. There are even more shaders to play with. ![]() |
![]() |
![]() |
#11 |
Fantasy Man!
Join Date: Apr 2002
Location: UK
Posts: 1,353
|
Thanks, I had seen that post but missed the download links for the XML versions before.
|
![]() |
![]() |
#12 |
Registered User
Join Date: Aug 2007
Location: Stevenage / England
Age: 42
Posts: 53
|
RetroArch android also uses GLSL shaders. Here's the shaders extracted from the latest APK.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Corrected shaders for WinUAE | guest.r | support.WinUAE | 419 | 30 April 2023 14:25 |
Multipass shaders | craig64 | support.FS-UAE | 21 | 08 December 2020 11:01 |
HLSL shader problems + suggestion | TysonJacobs | support.WinUAE | 3 | 07 December 2013 17:04 |
fx Shaders in WinUAE 2.6.0 | crazy46guy | support.WinUAE | 8 | 16 June 2013 14:30 |
MAME: How to use HLSL? | Leandro Jardim | Retrogaming General Discussion | 3 | 28 December 2012 02:55 |
|
|