Porting "Super XBR 3D" filter from Retroarch

  • Posts: 4
5 months 2 weeks ago #1 by ArkBlitz
I'm currently checking a Retroarch filter named "Super XBR 3D", which is intended to be used on games that mix 2D and 3D. It uses a two-pass procedure that detects which elements on the screen are 2D sprites or upscaled 3D elements on the first pass, then proceeds to apply the filter proper on the second pass, and finally adds an optional sharpener step. Unfortunately, documentation for Reshade's internals seems to be limited, and my personal knowledge of Reshade's scripting language (and Cg/HLSL filters in general) is not enough to port the filter from Retroarch to Reshade - I already tried copy-pasting the Cg code and using another Reshade script as a template, but since I'm working blind here I'm met with a truckload of compilation errors. If anyone can check the original source code, and maybe explain how can it be ported, that'd be very useful.

Pass 0: github.com/libretro/common-shaders/blob/...per-2xbr-3d-pass0.cg
Pass 1: github.com/libretro/common-shaders/blob/...per-2xbr-3d-pass1.cg
(Optional?) Jinc2 sharpener pass: github.com/libretro/common-shaders/blob/...tom-jinc2-sharper.cg

Please Log in or Create an account to join the conversation.