I am working on some global illumination stuff in Unity Pro. I have a super simple scene with a box (the Cornell box). I am trying to render that same scene multiple times (with the same camera parameters), and each pass uses a different point light source. Then I use ShaderLab to do a weighted average of each rendering pass, and present the result.
I am getting some ringing artifacts on the illumination which I can’t quite understand. My only guesses as to why this may be happening are:
-Somehow, RenderTextures are converted to integer precision at some point in the pipeline, and thus I have a precision problem.
-There are artifacts on the shadow maps, probably related to aliasing (maybe the shadow map doesn’t have enough resolution, or its format is integer as well?), and then when I add them together the artifacts add up and are more visible.
A simplified web plugin demo of my current prototype is located at http://www.instantradiosity.tk/ Right now, I am creating all of my point light sources at the same exact position (on the center of the top of the box) so I could have a clear look at these artifacts. If you press any key, a GUI with sliders appears: please leave Rho = 0 and move N (which is the number of lights). When N = 1 there is only one light source and no apparent artifacts, but when I increase N (and therefore I increase the number of point light sources and rendering passes, one light in each pass), I get these horrible artifacts.
(please don’t mind the low framerate, that is not a concern at this point)
I would appreciate any help!