codeonwort / pathosengine

OpenGL Rendering Engine for Study
MIT License
20 stars 0 forks source link

Integrate AMD FSR1 (v0.6.6) #33

Closed codeonwort closed 2 years ago

codeonwort commented 2 years ago

This PR integrates AMD FSR1 (v1.0.2).

  1. Add cvar r.super_res.method to toggle FSR1.
  2. Add cvar r.fsr1.quality to control FSR1 quality mode. (0~3: ultra quality, quality, balanced, performance)
  3. Add cvar r.fsr1.sharpness to control FSR1 sharpness. (0.0~2.0, default is 0.2)

NOTE: Always use FP32 fallback for now. I used GTX 1660 Super for this work but it does not support GLSL FP16 extension. I'll test FP16 when my RTX 3080 Ti is available. Also, need to check Ryzen 6800U.

codeonwort commented 2 years ago

FP16 version is neither available on Ryzen 6800U. Following two extensions are required, but not supported:

Do merge in current state as my RTX 3080 Ti is not available now. Check it later.

codeonwort commented 2 years ago

These GLSL extensions are also unavailable in RTX 3080 Ti.

In OpenGL, it seems I have to use GL_NV_gpu_shader5 instead of GL_EXT_shader_16bit_storage, and define explicit conversion functions as there is no alternative to GL_EXT_shader_explicit_arithmetic_types.

codeonwort commented 2 years ago

FP16 mode is available by 79fe01467786e60d349ab9c428526e60fc4275a7, anyway the GPU cost is not that different.