Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#242629 - 08/02/08 01:55 AM Artifact with deferred shading on ATI cards
Leadwerks Offline
Regular Contributor
***

Registered: 03/11/07
Posts: 410
Loc: California
I get this strange edge-highlight artifact with my deferred renderer on ATI cards. NVidia cards are unaffected.

It seems to occur at the junction where unwrapped (fake cubemap) shadowmaps texcoords meet, at the junction between CSM stages, and at the edge where a pixel stops being affected by a spotlight, as seen in this image.

It seems to be a function of the screen normal because normal maps affect the artifact.



Edited by Leadwerks (08/02/08 01:56 AM)

Top
#242634 - 08/02/08 05:38 AM Re: Artifact with deferred shading on ATI cards [Re: Leadwerks]
Komat Offline
Frequent Contributor
****

Registered: 05/25/05
Posts: 923
Loc: Prague, Czech Republic
I had seen something similar with latest ATI drivers in one from my postprocessing shaders. In my case the artifact appeared in pixels at border between two areas. Those two areas differed in the result of if branch put around additional texture sampling as speed optimization (i.e. the calculation would be correct even if the if test was not there). Since the texture in question does not have mipmaps (and thus it should not depend on derivative calculation in the quad) I am currently unsure if there is some legal reason for that artifact to appear or if that is problem with the shader compiler.

Top
#242643 - 08/02/08 08:35 AM Re: Artifact with deferred shading on ATI cards [Re: Komat]
Jan Offline
OpenGL Pro
****

Registered: 12/07/00
Posts: 1932
Loc: Aachen, Germany
Do you use anti-aliasing?
_________________________
GLIM - Immediate Mode Emulation for GL3

Top
#242648 - 08/02/08 12:15 PM Re: Artifact with deferred shading on ATI cards [Re: Jan]
Leadwerks Offline
Regular Contributor
***

Registered: 03/11/07
Posts: 410
Loc: California
No anti-aliasing is used.

However, a logical operation is causing some pixels to skip lighting since they face away from the light source. The artifact seems to occur at the border where logical results differ.


Edited by Leadwerks (08/02/08 12:37 PM)

Top
#242659 - 08/02/08 06:36 PM Re: Artifact with deferred shading on ATI cards [Re: Leadwerks]
ZbuffeR Offline
OpenGL Guru
*****

Registered: 12/01/03
Posts: 3752
Loc: Grenoble - France
Maybe you can avoid the artifacts by replacing the test with a step or smoothstep operation.

Top
#242670 - 08/03/08 03:11 AM Re: Artifact with deferred shading on ATI cards [Re: ZbuffeR]
Komat Offline
Frequent Contributor
****

Registered: 05/25/05
Posts: 923
Loc: Prague, Czech Republic
 Originally Posted By: ZbuffeR
Maybe you can avoid the artifacts by replacing the test with a step or smoothstep operation.

The purpose of the logical operation (i.e. if branch), at least in my case, is to speed up the rendering of areas which do not need those additional calculations on cards which have dynamic branching capabilities. The mathematical operation will not do that.

Maybe it might be possible to work around that artifact using something like:
 Code:
result = 0.0 ;
if ( some_condition( x ) ) {
    result = do_calculations() ;
}
result *= matematical_equivalent_of_the_condition( x ) ;
use( result ) ;

I will test it on monday.

Top
#242697 - 08/03/08 04:50 PM Re: Artifact with deferred shading on ATI cards [Re: Komat]
Leadwerks Offline
Regular Contributor
***

Registered: 03/11/07
Posts: 410
Loc: California
ATI is pretty good about fixing errors if you submit a complete bug report. I'll send something to them soon.

Top
#242849 - 08/05/08 07:02 PM Re: Artifact with deferred shading on ATI cards [Re: Leadwerks]
Komat Offline
Frequent Contributor
****

Registered: 05/25/05
Posts: 923
Loc: Prague, Czech Republic
I tried the workaround however simply calculating the result of the if branch into separate variable added after the if branch instead of doing the addition directly inside the branch stopped the artifact from appearing in my case so this is almost certainly a driver problem.

Top
#243457 - 08/12/08 04:10 PM Re: Artifact with deferred shading on ATI cards [Re: Komat]
Lord crc Offline
Regular Contributor
*****

Registered: 04/02/01
Posts: 175
You might be aware of this, in that case, please ignore this, but perhaps it is related to what's described here: http://www.opengl.org/pipeline/article/vol003_6/ ?

Top
#243512 - 08/12/08 11:01 PM Re: Artifact with deferred shading on ATI cards [Re: Lord crc]
Leadwerks Offline
Regular Contributor
***

Registered: 03/11/07
Posts: 410
Loc: California
I am using a GL_NEAREST filter on the depth and normal textures, and no downsampling is used, so I do not think that article is describing my problem. But I also didn't read it very carefully or understand what they were talking about.

Top
Page 1 of 2 1 2 >


Moderator:  Tom Nuydens, Zengar 
Who's Online
6 registered (Xmas, Koter, glfreak, kaerimasu, ktamail, fgreen), 58 Guests and 91 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Maire Nicolas, minakshee, Koter, pixelwrangler, darvid
24933 Registered Users
Top Posters (30 Days)
Alfonse Reinheart 152
ZbuffeR 92
Dark Photon 71
marshats 47
Brolingstanz 44
Ilian Dinev 41
Iulian B 38
Stephen A 35
Kip Warner 28
devdept 26
Pierre 23
DarkShadow44 23
igorgiv 23
skynet 23
Yann LE PETITCORPS 22
Abdallah DIB 21
scratt 21
Aleksandar 20
dletozeun 19
Pierre Boudier 19
Forum Stats
24934 Members
12 Forums
52391 Topics
271525 Posts

Max Online: 482 @ 08/11/08 06:19 PM