English Amiga Board


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

 
 
Thread Tools
Old 05 May 2013, 23:02   #1
Enverex
Fantasy Man!
 
Enverex's Avatar
 
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
Enverex is offline  
Old 06 May 2013, 00:35   #2
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
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...
FrodeSolheim is offline  
Old 06 May 2013, 00:53   #3
Enverex
Fantasy Man!
 
Enverex's Avatar
 
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
Enverex is offline  
Old 06 May 2013, 01:00   #4
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
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
FrodeSolheim is offline  
Old 06 May 2013, 01:06   #5
Enverex
Fantasy Man!
 
Enverex's Avatar
 
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?
Enverex is offline  
Old 06 May 2013, 01:12   #6
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
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
FrodeSolheim is offline  
Old 06 May 2013, 01:17   #7
Enverex
Fantasy Man!
 
Enverex's Avatar
 
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?
Enverex is offline  
Old 06 May 2013, 01:23   #8
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
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
FrodeSolheim is offline  
Old 06 May 2013, 01:25   #9
Enverex
Fantasy Man!
 
Enverex's Avatar
 
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.
Enverex is offline  
Old 06 May 2013, 11:26   #10
jbl007
Registered User
 
Join Date: Mar 2013
Location: Leipzig/Germany
Posts: 466
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.
jbl007 is offline  
Old 06 May 2013, 11:49   #11
Enverex
Fantasy Man!
 
Enverex's Avatar
 
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.
Enverex is offline  
Old 19 July 2013, 16:44   #12
pete_uk
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.
Attached Files
File Type: rar Shaders.rar (408.7 KB, 659 views)
pete_uk 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
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

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 10:18.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14320 seconds with 14 queries