Community FSR support for the Built-In Renderer

I went ahead and implemented FSR already, works on builtin with OnRenderImage and also have a PPStack version that should works on all render pipelines:

15 Likes

Thats amazing @tatoforever ! Thanks for making this also available for Default RP.

Thanks for sharing. @tatoforever
I tried this but performance dropped even more.
Tested 2019.4.18f1 (Built-in Renderer) - AMD RX 480 GPU

1 Like

Same here unfortunately with 2019.4.30f1 and built-in pipeline, using nVidia RTX 2080.

@tatoforever are you able to share a minimal project on your GitHub just to sanity check with? Thanks!

I’m going to add a project with a free Ocean Shader package that I found on the web, it showcases clearly differences between AMD FSR and without it.
Btw, I updated my latest implementation for both PPV2 stack and OnRenderImage versions. The new changes now is that im downscaling the scene by rendering it directly to a temp render target for OnRenderImage and using DynamicResolution to render the scene to a smaller RT on PPV2 stack version. There’s not actual change to the screen resolution.

3 Likes

For anybody interested in AMD’s FidelityFX Super Resolution, get @tatoforever 's newest implementation HERE.

EDIT:

There is also an FSR 2.2 version free on GitHub here:
GitHub - ndepoel/FSR3Unity: FSR 3.1 Upscaler integration for Unity built-in render pipeline, with support for DX11, Mac, Linux and consoles.

4 Likes

Many thanks @tatoforever this new version works great! Very much appreciate the time you’ve spent getting FSR working with the built-in pipeline.

1 Like

Thanks! There’s a new update some moment ago that add support for half precision. If your target platform/hardware support it, you might benefit a lot from it.
Also cudoz to @atomicjoe , he’s been helping playtesting and contributing a bit to it too.
Next is URP support but I can’t find a proper documentation on URP to create custom PP. I know for sure that (depending on the URP version you have) it can support PPV2 and my implementation ships with a PPV2 version but is much slower than the OnRenderImage One.

3 Likes

PPV2 for URP is deprecated in 2019.3 onwards (IIRC). There’s a new, much faster, much more capable system for post-processing now, but it’s totally undocumented of course.

1 Like

Thanks for making this available! However I tried it, is your implementation not compatible for macOS Metal? I thought that FSR was platform agnostic. I just get a black game view.

Does it work on Editor (Metal mode)?

Unfortunately not. I’m on an intel mac, latest macOS, tried a few different unity 2020.3 LTS, same result.

I looked into the frame debugger and it looks like the OutputTexture just isn’t being written to. It’s just black. When I do a raw Bit(src, dest) everything works (the rendered src is low res)

I tried changing Upscale() in the compute shader to ā€œOutputTexture[pos] = AF4(1,1,1,1)ā€ but weirdly the OutputTexture is still black. So I think it’s just not being written to by the KMain shader.

When I disable the FSR component, the image shows up.

Same thing with the PPv2 version of the effect. Let me know if there’s anything else I can provide.

Do you know if your GPU support compute shaders and half precision registers?

Definitely supports compute shaders and I’m assuming it supports half precision.

It’s a 2019 16" macbook, Radeon Pro 5500.
I also just tried on my other machine, a 2016 macbook with a Radeon Pro 460–same result.

Do you have a windows machine where you can try it? Maybe is a limitation of AMD FX it self, cause I don’t see why it shoun’t work on your machine if it supports Compute Shaders well.

Maybe Metal doesn’t like to have the camera render texture switched like that…
Try THIS VERSION, it uses an auxiliary camera to render instead.
Be sure to check it ON PLAY MODE.

1 Like

He said he also tried PPV2 and the problem persist. The scene is rendered to a temp rendertexture only OnRenderImage version, on PPV2 is all DynamicResolution.

1 Like

Oh, then it’s not gonna fix it :stuck_out_tongue:
@sameng try THIS VERSION of the compute shaders, that’s the one I use on Android GLES and Vulkan without issues.

1 Like

Thanks for sharing! Unfortunately still doesn’t work :frowning:

See attached image of the Frame Debugger.

Also, I noticed a warning. Maybe it’s just a Metal issue?

Unknown preprocessor directive ā€˜extension’ at kernel KMain: ffx_a.hlsl:570

I also tried commenting out all the #extension lines, and the warnings all go away, but it’s still black.

Is probably a driver/metal thing. If you can try on a windows machine that might confirm it.