•      Sign In
• Create Account

### #ActualHodgman

Posted 01 April 2013 - 08:24 AM

Does the black line stay in the same position in the world when you move your camera? Which attributes in the gbuffer are changing at that location? Is there a triangle edge at that location? Are you using MSAA at all?

There's some shader operations that can result in NaN, like x/0, 0^0, x^y where y < 0, etc.
You can add some debug checks before these 'dangerous' operations when testing, e.g.
 ...
if( position.w == 0 )
return float4(1,0,0,1);//red for debugging
position /= position.w;
...

### #1Hodgman

Posted 01 April 2013 - 08:18 AM

Does the black line stay in the same position in the world when you move your camera? Which attributes in the gbuffer are changing at that location? Is there a triangle edge at that location?

There's some shader operations that can result in NaN, like x/0, 0^0, x^y where y < 0, etc.

You can add some debug checks before these 'dangerous' operations when testing, e.g.
 ...
if( position.w == 0 )
return float4(1,0,0,1);//red for debugging
position /= position.w;
...

PARTNERS