Author Topic: Glide64 Bias Factor Test  (Read 16926 times)

Offline Mikhail

  • long
  • ***
  • Posts: 127
    • View Profile
Re: Glide64 Bias Factor Test
« Reply #30 on: May 15, 2013, 08:40:39 AM »
0.4
for PowerVR SGX 531 that stops the castle sun/star circle and the carpet outside the castle door from flickering but the tree roots / base shadow area still flickers as well as Mario's shadow.

What are the default settings for gles2n64 in N64oid? I'm assusimg it uses gles2n64 because of the fog setting.

I don't get any flickering at all in N64oid but gles2n64 and gles2rice both have the same above flickering problem in Mupen64PlusAE as glide64mk2 below 0.4 bias.

Also whilst outside gles2rice constantly renders a extra block of sky in the left hand top corner when using First primitive draw.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Glide64 Bias Factor Test
« Reply #31 on: May 15, 2013, 09:05:00 AM »
Paul and Kris - I'm not sure how relevant this thread is now.  The head of the glide branch just uses the same offsets that the other video plugins use, and the code for selecting the offset based on device is centralized here in the ae-bridge library.  Note that the centralized function modifies both the polygon offset factor and the units, whereas the build posted here only modifies the units.  Which may explain why devices require different values than used in the other video plugins.

We should definitely continue to explore "best" settings per device, and more general ways for detecting the device (e.g. using the GL renderer string).  But we should probably build a new test, either off the head of master or the glide branch.  Optimal offset values could then be tested using any of the video plugins.
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Glide64 Bias Factor Test
« Reply #32 on: May 15, 2013, 11:20:55 AM »
Those were the first values I tried and they didn't work for me. When they work for you is that with any of the other changes ie 24bit zbuffer?

The vertex buffer improvements I've mentioned should be committed in a few hours so I think we can sort out a release, if people have flickering we know what values to use now anyway.

Offline littleguy

  • Moderator
  • double
  • *****
  • Posts: 1945
    • View Profile
Re: Glide64 Bias Factor Test
« Reply #33 on: May 15, 2013, 11:46:37 AM »
No, sticking with the original 16-bit z-buffer that we've always used in master.

If you haven't done so already, would you mind pulling the head of the github glide branch and testing it again on your device?  The changes I made to the polygon offset stuff can be seen in this commit:
https://github.com/paulscode/mupen64plus-ae/commit/fff883b2d9c114ac266a01ee6a12cffe6d79c851

Take a look at the call to glPolygonOffset at the bottom of that page.  The test version posted here varies only the second input argument based on device (first arg is always 0), while the head of the branch varies both arguments based on device (like the other video plugins do).  On my two devices, the shadow flicker behavior is identical across all three video plugins in the latest build.
« Last Edit: May 15, 2013, 11:48:34 AM by littleguy »
2012 Nexus 7, rooted stock Lollipop
Samsung Galaxy Victory, rooted stock Jelly Bean
Xperia PLAY, stock Gingerbread
OUYA, retail version

Offline Kris

  • Developer
  • int
  • *****
  • Posts: 91
    • View Profile
Re: Glide64 Bias Factor Test
« Reply #34 on: May 15, 2013, 03:42:00 PM »
Doing it that way should work ok. I didn't do that as it pc version has code to find a single value and thought it might cause problems in other games.

The vertex buffer changes are working well in mario with a speedup but it looks like I need to do a bit more debugging with other titles.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Glide64 Bias Factor Test
« Reply #35 on: May 17, 2013, 01:33:29 PM »
Topic Closed  (Thanks to everyone who helped with the testing!)
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Glide64 Bias Factor Test
« Reply #36 on: May 24, 2013, 11:53:52 AM »
What are the default settings for gles2n64 in N64oid? I'm assusimg it uses gles2n64 because of the fog setting.

I don't get any flickering at all in N64oid but gles2n64 and gles2rice both have the same above flickering problem in Mupen64PlusAE

Just noticed that I missed this earlier, so thought I would respond (even though the topic is closed) just for anyone else who stumbles onto the thread wondering the same thing.

N64oid uses a GLES2 port of Rice that Yongzh developed (not related Kris' gles2rice port).  He is using some other system for profiling devices, that seems to be more robust.  Our profiler has a granularity that is much finer (specific down to the device and even in some cases the Android version).  This means we have to get feedback from a tester for basically every device out there for them to have the correct polygon offset.  Since N64oid is closed-source, we can't copy what Yongzh is doing.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted