shinyquagsire23 / OpenJKDF2

A cross-platform reimplementation of JKDF2 in C
Other
512 stars 42 forks source link

Implement more Anti-Aliasing options #118

Open shinyquagsire23 opened 1 year ago

shinyquagsire23 commented 1 year ago

Currently OpenJKDF2 only supports SSAA, by changing the underlying framebuffer size (and all of the intermediate FBO sizes) before drawing to the window. This has some issues at higher resolutions due to the lack of mipmapping (https://github.com/shinyquagsire23/OpenJKDF2/issues/98#issuecomment-1255148324)

Ideally we'd just have more options for antialiasing, like MSAA.

SirYodaJedi commented 1 year ago

Halton-sampled SSAA, like mentioned in https://github.com/jdmclark/jkgfxmod/issues/25, would be more effective and efficient than simple bilinear or box downsampling when using the same amount of sample points. This is basically what SGSSAA and RGSSAA are, and modern GPUs' MSAA implementations work like this (but only on geometric edges). It also makes >4x AA actually look better than no AA at all, unlike the bilinear or bicubic method that the engine appears to currently be using for SSAA (although 4x is still usually "good enough").

I don't know what the current rendering pipeline is, so I don't know how feasible this would be to implement, but I figured I'd mention it, as antialiasing is something I am passionate about (and over-sensitive to). Posting here, rather than in a separate issue, as it is relevant to having more options for AA.