Art, code and miscellaneous experiments from Demoscene Passivist related in some way to JOGL. For more take a look at www.jogamp.org
My fifth (first, second, third and fourth) “Monkey Mathica” plane deformation shader series try. Setup code is the same as in the other tries: GL3_MonkeyMathica.java but ofcourse the fragment shader differs: .fs
And the next quick variation based on this nice AMIGAAAA!-style plane deformation. As before see the orignal post for the JOGL setup- and shader code.
Another variation of this nice AMIGAAAA!-style plane deformation. See the orignal post for the JOGL setup- and shader code.
As u might have already noticed from this and that I’m currently kinda addicted to colorful AMIGAAAA! copper style plane deformations. Guess I have to give in to my new addiciton and create a couple more of these trips … Code for this as always on Github: GL3_AmigaVortexInterference.java and the corresponding shader: .fs
After porting my fixed function pipeline volume rendering it was time to move on and implement real volume raycasting to overcome the bugs of the old implementation. Currently it’s only a very basic, quite unoptimized straight forward implementation (using threshold based early termination on fragment alpha saturation as the only optimzation). Maybe I should at least consider some of these techniques for an improved version, as the current implementation only runs @~15fps on my lowend 8800M GTX. Source as always on github: cube backface position shaders: .vs .fs and the real volume raycasting shaders: .vs .fs and last but not least the JOGL setup and initialization code: GL3_VolumetricRaycasting_VolumeTexture.java
Video of the TV-/surveillance-camera post-processing filter. Sorry for the bad quality, but YouTube nearly compressed the effect away :) … anyway as always the code can be found here: GL3_AnalogDistortions.java Shader: .fs
Implemented a simple TV-/surveillance-camera post-processing filter using the techniques from iq’s Shadetoy to emulate different ‘analog distortion’ effects like contrast fade, vigneting, color separation, color shift, tv-lines and tv-flicker. Results look promising as u can see in the shader vs. normal comparison shot.
My latest and also last attempt in “shadow mapping” for a while: “Variance Shadow Mapping”. I definitely need a vacation from shadows. The routine uses chebyshev probabilist prediction (mean and variance) to approximate a shadow penumbra. The intention was to work around the massive performance hit of “Percentage Closer Filtering”, but to maintain or even surpass PCF quality wise, but I’m not quite happy with the result of this routine. The generated softshadows have a lot of really “strange” artifacts, though I can’t find any serious flaw in the implementation. Anyway here’s the setup code: GL3_ShadowMapping_VarianceShadowMapping.java and the corresponding (multipass) shaders: .vs/.vs/.vs .fs/.fs/.fs
Lately the tides of war aka “shadow mapping” turned in my favor and I achieved another stage win by successfully implementing “Percentage Closer Filtering Soft-Shadows” (PCF-SS). The routine is quite foreward. It takes several samples from a depth texture (transformed to light pov) filter kernel and averages them. The result is some kind of “penumbra zone” wich is an attenuation of the aliasing. The bigger the kernel, the bigger the penumbra, the softer the shadows. The depth texture convolution may kill ur GPU but will result in visually soft shadows. Full sourcecode can be found on Github: GL3_ShadowMapping_PercentageCloserFiltering.java Shaders: No shaders this time as they are dynamically generated in the Java code.
As my struggle with shadows continues I achieved a stage win by migrating my fixed function pipeline depth texture shadow mapping routine to a completely GLSL based version. This “raw” shadow mapping routine main purpose is to provide a code base for more advanced shadowmapping techniques like PCF (“Percentage Closer Filtering”) and VSM (“Variance Shadow Mapping”). As always full sourcecode on Github: GL3_ShadowMapping.java Shaders:.vs .fs
As my skills regarding scene illumination are nearly non existing, I was searching for a simple, intuitive lighting solution for 3D scenes. Along the way I stumbled upon a technique called “Image Based Lighting” using “Spherical Harmonics”. Reading the Siggraph paper “An Efficient Representation for Irradiance Environment Maps” finally made it clear: I need that too! After compiling the code to find spherical harmonic coefficients from the Siggraph paper and downing some lightprobes from Paul Debevec’s website I was good to go with a JOGL2 implementation. I chose to go for a vertex shader based implementation as the diffuse radiance changes only slightly anyway so a per pixel fragment shader would be overkill I guess. Code as always on Github: GL3_EnvironmentBasedLighting_SphericalHarmonics.java. The corresponding shaders can be found here: .vs .fs
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-)
Ported one of my Breakpoint 2010 coding “accidents” over to JOGL2. As I was trying to get a vertex displacement mapping shader working at the party place I accidently stumbled upon a nice post processing filter combination together with an interesting shader/geometry bug wich looked really nice. Syncing it to some music from the streaming music compo running at the party (“Fractal Warrior” from “Teo”) gave the routine the finishing touches. Maybe I should convert it into a Winamp plugin :) … Code: GL3_BreakpointAccident.java Shaders: .vs .fs
Last but not least the king of all 3D fractals: The famous Mandelbulb fractal discovered in late 2009. I varied the underlying Julia parametes with a scaled sin(time) for the x, y and z location to achieve a tranformation effect. Also added the rubber effect from my previous experiments wich suits the “liquid” nature of the transformation quite well. JOGL2 setup code on Github: GL3_Raymarcher_Mandelbulb.java Shader code: .fs
After implementing the raymarched 3D Mandelbrot it was obvious the next step into the world of 3D fractals had to be the “Quaternionic Julia Set”. Source: GL3_Raymarcher_QuaternionicJuliaSet.java Shader: .fs
NIGHTNIGHT by DEDDY