English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.FS-UAE (https://eab.abime.net/forumdisplay.php?f=122)
-   -   HLSL/CG Shaders and xBR (https://eab.abime.net/showthread.php?t=69082)

Enverex 05 May 2013 23:02

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

FrodeSolheim 06 May 2013 00:35

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...

Enverex 06 May 2013 00:53

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

FrodeSolheim 06 May 2013 01:00

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 :)

Enverex 06 May 2013 01:06

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?

FrodeSolheim 06 May 2013 01:12

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 :)

Enverex 06 May 2013 01:17

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?

FrodeSolheim 06 May 2013 01:23

Yes, just enter Custom Configuration (menu) -> Custom Settings, and add a separate line with:
Code:

shader = write path to shader here

Enverex 06 May 2013 01:25

Ahh, completely missed what that section was for when I glanced at it before. Cheers Frode.

jbl007 06 May 2013 11:26

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. :)

Enverex 06 May 2013 11:49

Thanks, I had seen that post but missed the download links for the XML versions before.

pete_uk 19 July 2013 16:44

1 Attachment(s)
RetroArch android also uses GLSL shaders. Here's the shaders extracted from the latest APK.


All times are GMT +2. The time now is 20:19.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04297 seconds with 11 queries