Jump to content

  • Log In with Google      Sign In   
  • Create Account

Anti Aliasing creates diagonals/triangles


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 JohnnyCrazy   Members   -  Reputation: 116

Like
0Likes
Like

Posted 06 October 2013 - 09:39 AM

Hello,

 

 

I made a Java 2D Game, written with the Slick2D + LWJGL Library.

On my Laptop, its perfectly working with Anti Aliasing on an Intel I7 and a HD 4000 Graphic Card

 

But, when i transfered it one to one to my PC, the Anti Aliasing creates Triangles/Diagonals.

If I turn it off, it works without Problems. (But I need AA)

 

PC Specs:

Graphics Gard: GTX 680 EVGA

CPU: FX 8350

 

Picture with AA:
OyPRYum.png

 

Without:

3VKt6fi.png

 

Any Help would be appreciated ;)

 

Regards,

Johnny



Sponsor:

#2 MJP   Moderators   -  Reputation: 11368

Like
0Likes
Like

Posted 06 October 2013 - 12:32 PM

How exactly are you drawing those triangles?



#3 JohnnyCrazy   Members   -  Reputation: 116

Like
0Likes
Like

Posted 06 October 2013 - 01:45 PM

I dont draw these Triangles on purpose, they are Rectangles.

 

I use "org.newdawn.slick.geom.Rectangle" for it.

If I would draw a Circle, you would see Triangles in the Circle.(Basically ever geom is made out of Triangles, and if i turn AA on, you can see them)



#4 Nik02   Crossbones+   -  Reputation: 2832

Like
0Likes
Like

Posted 06 October 2013 - 10:29 PM

Can you see this issue on other apps/games when rendering with the GTX 680?

 

If not, I would guess that this is a bug in the Slick library.


Niko Suni


#5 JohnnyCrazy   Members   -  Reputation: 116

Like
0Likes
Like

Posted 12 October 2013 - 09:35 AM

No, all other Applications are running without Problems (Battlefield 4, LoL etc.)

 

Mh, okay... 



#6 jmX   Members   -  Reputation: 120

Like
0Likes
Like

Posted 22 October 2013 - 12:17 AM

This is not a bug in the Slick library, this is how line/triangle anti-aliasing works in OpenGL.  A rectangle is made of two triangles that share an edge, and along that shared edge each triangle will be writing some of the pixels at partially alpha'd out values.  Where these two triangles overlap will cause issues.

 

In general if you want antialiasing, you'll want to use MSAA, SSAA, or some sort of post processing trick like FXAA.   For line art, sometimes the hardware edge AA can be used, but you need to understand where and why it wouldn't be acceptable.  Even then, I'm not sure all game grade GPU hardware even supports edge AA (I know NVIDIA gpus do, but not sure about AMD).

 

Short answer: you're using the wrong type of AA.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS