I'm working on a radiosity processor. I'm projecting scene geometry onto a hemisphere at a high order of tessellation during a visibility pass onto a 1024x1024 render target. The problem is that the edges of certain triangles are not being rendered to the item buffer( render target )...so when I test certain edges( or pixels during pixel shader ) for visibility during a reconstruction pass, visible edges are not identified and as a result the pixel for that edge is discarded.
One solution was to increase the resolution of the item buffer( up to 4096x4096 )...this helped and more edges were visible, however, this was not fullproof.
How do I increase visibility?
Here is a screenshot of a scene after radiosity is applied: the seams are edges along a triangle face that were not visible due to the resolution of the item buffer...
fixed the problem by sampling the item buffer w/8 points:
code to convert world space position into normalized device coordinates for uv lookup of item buffer:
// position lookup for item buffer Output.Pos3 = mul( Input.Position, mWV ); // projection is handled by normalizing the viewspace position( as i'm rendering to a hemisphere ) Output.Pos3.xyz = normalize( Output.Pos3.xyz ); // convert to normalized device coordinates( [ -1, 1 ], [ -1, 1 ] -> [ 0, 1 ], [ 0, 1 ] ) Output.Pos3.xy *= float2( 0.5, -0.5 ); Output.Pos3.xy += float2( 0.5, 0.5 );