Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTX16 FP16 support #18

Open
artths opened this issue Aug 25, 2021 · 4 comments
Open

RTX16 FP16 support #18

artths opened this issue Aug 25, 2021 · 4 comments

Comments

@artths
Copy link

artths commented Aug 25, 2021

Hi!
There is no information in integration overview about RTX16 series and FP16 support. 1650 supports FP16 but outputs black screen when I try it (DX11, SM5.0). Should it work?

@artths
Copy link
Author

artths commented Aug 25, 2021

Also doesn't seem to work on RTX 20 series.

@UUNagato
Copy link

I have a similar problem with RTX3060Ti and FP16 setting. And in my case, it's because that FsrRcasH computes a wrong rcpL with APrxMedRcpH1 (line 863, ffx_fsr1.h). Simply replace this with AF1 rcpL=APrxMedRcpF1(AF1_(4.0)*lobe+AF1_(1.0)); can make it work. It seems APrxMedRcpH1 has some problems with it.

@tedlofgren
Copy link

GTX 1660Ti using FP16 (A_HALF) have similar issue on DX11, outputs black from RCAS. Works fine on DX12.
Fallback to FP32 works for both DX11 and DX12.

Seems related to FsrRcasH as @UUNagato stated. Changing to the suggested line does indeed output something, however not the expected result (for me at least).

According to FidelityFX-FSR-Overview-Integration (slide 27-28) special care have to be taken when choosing between FP32 and FP16, even when FP16 is supported.

Makes me question using FP16 at all.

@UUNagato
Copy link

Not sure if it's the reason but I guess a possible explanation for this bug is that APrxMedRcpH1 assumes we are using 16bit float and integer type. However, writing shader with types like "min16uint" or "min16float" doesn't guarantee the graphics card will run them in 16bits. It's often 32bits and thus APrxMedRcpH1 fails since it assumes the float number is 16bits. (0x778d is a constant for 16bit float layout).
AH1 APrxMedRcpH1(AH1 a) { AH1 b = AH1_AW1(AW1_(0x778d) - AW1_AH1(a)); return b * (-b * a + AH1_(2.0)); }

Replace it with APrxMedRcpF1 will work because the graphics card can always run 32bit float when you write float or float32_t.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants