Greetings! First post, so lets start by thanking the team for this upmost precious engine/framework/thing!
I have multiple viewports set up ( 8 ), each with its own camera.
All cameras are synced in rotation and location. Each one has its own viewing “range”, for example:
[java]
/* Unit.AU = 1 AstronomicalUnit, Settings.scale = 0.001f , don’t kill me for using ridiculous large numbers */
cams[ 0 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 0.000001f, 0.000100f );
cams[ 1 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 0.0001f, 0.0100f );
cams[ 2 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 0.01f, 1.00f );
cams[ 3 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 1f, 100f );
cams[ 4 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 100f, 10000f );
cams[ 5 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 10000f, 1000000f );
cams[ 6 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), 1000000f, Unit.AU );
cams[ 7 ].setFrustumPerspective( 45f, (float)cam.getWidth( ) / cam.getHeight( ), Unit.AU * Settings.scale, ( Unit.AU * 200L ) * Settings.scale );
[/java]
all these viewports get rendered on top of each other, whereas the farthest one [ 7 ] gets rendered first and clears everything, all following only clear the zbuffer.
I do this to get more precision in the z-buffer, so i can get very close to objects, but also have extreme far render distances without getting z-fighting between objects that are 10000000km apart
I want to use some postprocessors, like bloom ( or pssmshadows [ is this even post? ] ). Now i cant just go ahead and apply the same bloomfilter to every viewport as they accumulate in the shader and make the whole thing explode into rainbows. I also cannot apply a separate bloomfilter to every viewport as they would overwrite each other, effectively resulting in only the closest cam getting rendered.
One idea i did not try yet, is render everything on a texture and then apply the bloom, but somehow i believe that isnt going to work, as the texture will only be a simple colormap. Is there a way to render only the glowmaps ( as the bloomfilter does i believe ) and then use that for the bloom filter and then merge the result with the merged viewport thing?
Anyways, that is only ONE thing, i dont even know how to get started with the other filter stuff, like pssm and AO.
Any alternatives to my approach, maybe even to the viewport splitup?
Sidenote: I noticed this:
This “gap” show up between the different viewports.
I tried overlapping the frustums a bit, but it still shows up when there is transparency involved.