GPUOpen-Effects / FidelityFX-FSR2

FidelityFX Super Resolution 2
Other
1.96k stars 179 forks source link

Make the whole range of reactive mask values to be meaningful #94

Open aaalexandrov opened 1 year ago

aaalexandrov commented 1 year ago

The docs state that the reactive mask values should be under 0.9 or so. This is a problem in the case when the reactive mask is output in multiple passes (e.g. a particle system with high overdraw, where each individual primitive has a low alpha, but taken together they completely overwrite the original pixel value - in this case reactive mask should be blended additively). The need to clamp to 0.9 means standard blend operations can't be used to generate the mask, it either needs to be renormalized after everything is rendered, or it needs to be output through UAV atomic ops. Ideally reactive mask values should be clamped / remapped on sampling inside FSR so the prior rendering pipeline doesn't need to worry about the mask maximum value.