Author Topic: Weird antialiasing results  (Read 4868 times)

Angelo

  • Jr. Member
  • **
  • Posts: 32
Weird antialiasing results
« on: May 01, 2012, 05:28:04 AM »
Hi. I tried activating antialiasing in my Android application, changing from


to


But this is what happened: http://dl.dropbox.com/u/14911350/2012-04-28%2000.45.52.jpg
No antialiasing, and the face normals look flipped.
Any idea of why this happens?

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Weird antialiasing results
« Reply #1 on: May 01, 2012, 10:23:23 AM »
Did the weird rendering was also appearing without using DisplayCapabilities ?

Can you try using setDefaultOpenGLs like this:

setDefaultOpenGLs initialize with the default values choosen by android api (ie when not using DisplayCapabilities), and especially the depth buffer which seem broken in your screenshot.

Angelo

  • Jr. Member
  • **
  • Posts: 32
Re: Weird antialiasing results
« Reply #2 on: May 01, 2012, 11:46:47 AM »
I tried. That weird flipped-normal problem was solved, but I still get no antialiasing.

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Weird antialiasing results
« Reply #3 on: May 01, 2012, 11:55:03 AM »
Possibly your device (graphic ship) does not support msaa antialising. Which graphic ship (or processor) did you have ?

Nvidia Tegra does not support msaa, and exposes instead their own extension (csaa), powervr ship supports msaa, the other shipI don't know.

Edit: Additionally, if your device support msaa, the number of samples is may be too high (try 2).
Let me know if you have tegra ship, I currently adding support for csaa.
« Last Edit: May 02, 2012, 09:33:15 AM by jerome_j »

Angelo

  • Jr. Member
  • **
  • Posts: 32
Re: Weird antialiasing results
« Reply #4 on: May 02, 2012, 01:27:53 AM »
In fact, I am working on an Acer Iconia Tab A500, which mounts an 1 GHz Nvidia Tegra 250 CPU.
I tried with


but it didn't work either.
I don't know if my CPU supports CSAA. Anyway, how can I try it?

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Weird antialiasing results
« Reply #5 on: May 02, 2012, 09:35:48 AM »
Your gpu support csaa, it's a tegra. I've implemented support for csaa yesterday and I will make a new build this evening or tomorrow (once the wip of the editor will be finished).

I'll send you the instruction to use csaa once the build will be made available.

Angelo

  • Jr. Member
  • **
  • Posts: 32
Re: Weird antialiasing results
« Reply #6 on: May 02, 2012, 06:09:47 PM »
Ok. Thank you very much.

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Weird antialiasing results
« Reply #7 on: May 02, 2012, 08:46:50 PM »
You can get the build 1.2.5 2012-05-02 which contains support for csaa on android.

Make sure to read the changelog which contains instruction to use csaa.

Ps: If you're using the editor, this new version is not yet recommended to use.
« Last Edit: May 04, 2012, 10:19:15 AM by jerome_j »

Angelo

  • Jr. Member
  • **
  • Posts: 32
Re: Weird antialiasing results
« Reply #8 on: May 03, 2012, 07:24:16 PM »
I get caps.isUseNvCsaa() = false. Does that mean that CSAA is not supported by my device?

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Weird antialiasing results
« Reply #9 on: May 04, 2012, 08:51:05 AM »
I currently don't have any tegra to test, so the feature is possibly not fully working yet. Tegra 2 has csaa.

How many num samples did you try ?
I will prepare a debug build to dump some informations to know what's going on.
« Last Edit: May 04, 2012, 09:01:08 AM by jerome_j »

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Weird antialiasing results
« Reply #10 on: May 04, 2012, 10:21:54 AM »
I have made a new build which dump some debug informations to know the parameters of DIsplayCapabilities supported on device.
Can you try the build 1.2.5 2012-05-04 and attach the log here ? The relevant log are EGLConfig logs, you should see them in ddms.

Angelo

  • Jr. Member
  • **
  • Posts: 32
Re: Weird antialiasing results
« Reply #11 on: May 19, 2012, 06:03:27 PM »
Finally I solved this antialiasing problem. I probably was missing something in my code. Thank you.