Art, code and miscellaneous experiments from Demoscene Passivist related in some way to JOGL. For more take a look at www.jogamp.org
While experimenting with GLSL based FSAA aka “super sampling” I found a quite convenient way to package my efforts in some kind of utility wrapper class. It takes a FBO and the desired SS amount (even fractional subpixel SS is possible) and generates an appropriate fragment shader on-the-fly wich then downsamples the internally oversampled FBO to screen resolution. As u can see in the provided picture (fullres version) the quality of the SS renderings are excellent and easily surpass the MSAA quality natively supported by the GPU. Sourcecode for the utility helper class and my two experimental test routines GL3_SuperSampling_DisplayLists.java + GL3_SuperSampling_Mandelbrot.java can be found on Github. As the fragment shader is dynamically generated on-the-fly in the utility helper class no .fs this time … X-)
As it becomes more and more apparent that a fix for “broken multisampling support” (Bug 410) won’t make it into the first release of JOGL2.0, I struggled to find a workaround for this issue. After reading through various sources I came to the conclusion that the only real solution to achieve high quality antialiasing is to compute sample values as the average of the sampled signal over the sampling area, which is given by the integral of the sampled signal over the sampling area divided by the sampling area (as suggested in GPU Gems 2) . In the case of FSAA, the sampled signal is discrete, meaning that the integral can be computed as a summation. So the idea of custom GLSL based bruteforce “super sampling” was born and the first results look promising … :)
NIGHTNIGHT by DEDDY