Author Topic: Missing/ Flickery Shadows (Mario64)  (Read 12118 times)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Missing/ Flickery Shadows (Mario64)
« on: October 01, 2012, 04:05:37 PM »
Anyone who is experiencing missing or flickering shadows in Mario64 (or shadows that are floating too far off the ground), please run the following tests and let me know which one fixes the problem.  For some devices, more than one of these will look better than the default, but only one will look best -- so let me know which one.  These apps will not install over previous versions and they won't interfere with each other.  You can uninstall them once you are finished testing.


IMAP Profile

OMAP Profile

QUALCOMM Profile

TEGRA2 Profile

Ignore the names of the profile - that just indicates the first hardware I happened to come across which required a particular set of polygon offset values.  So far, every device has fit into one of these categories.

If none of the above profiles work, then please install this version, which will let you manually set which polygon offset value to use:

Manual Offset Test

To set a value, edit the file [sdcard]/Android/data/paulscode.android.mupen64plusae.offset/data/gui.cfg.  Find the section labeled [VIDEO_PLUGIN], and add the following line under it:
polygon_offset=0.2

Then run Mario64 and see how the shadows look.  Increase this value until the shadows are visible (shouldn't ever get larger than 2.5 or 3.0 or so).  If no positive values work, then try negative values.  Once you find a value that works, play around until you find the lowest (closest to zero) value for which you can see the shadows but they are not flickering.  You can take it out to whatever decimal place you like.. for example, a value like 0.2983 would be perfectly valid.  Be sure to check the decoration around the door to the castle, the sun carpet inside the castle, and the numbered stars on the doors to make sure none of them are missing or flickering either.  Picking the lowest value that still looks good without flickering will help reduce any unusual graphics glitches when viewing things from a particular angle.

The wrong polygon offset values have a negative effect on a few different games, Mario64 being the most obvious.  Unfortunately, I haven't figured out a way to automate this process, so each device currently needs to be added to the profiler so the correct polygon offset values are chosen for it.

When you post which profile works best for your device, please also post the logcat output from one of them (doesn't matter which one).  If you aren't familiar with accessing the logs, I posted instructions here.
« Last Edit: October 01, 2012, 08:58:12 PM by Paul »
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 MarsEdge

  • bit
  • Posts: 5
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #1 on: October 01, 2012, 06:02:24 PM »
My device is a T-Mobile Samsung Galaxy S3. The best profile of the ones you provided was the OMAP build. But it didn't seem perfect. With all of them I was able to partially see through the stars when selecting a level within a painting except when the star would display lines where the edges of the star would be (It's a little hard to describe. I'll post a screen shot after this). The other issue I noticed with the OMAP build is that the star numbers on the doors in the castle are missing. I didn't encounter this with any other build. The OMAP build was the only one with a correct Mario shadow (and the visuals are crisper in general).

My logcat is here: http://pastebin.com/chYZ4qMz [nofollow]

Missing star on door screenshot: http://imgur.com/V25ZO,sDeK9 [nofollow]

Mystery lines on unclaimed star screenshot: http://imgur.com/V25ZO,sDeK9#1 [nofollow]

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Missing/ Flickery Shadows (Mario64)
« Reply #2 on: October 01, 2012, 06:20:48 PM »
Ok, thanks.  I suspect we will need a new profile created then.  I'll post a version where you can specify the offset value yourself, and let you find what value works best for your device.  The way I did it before was by posting a series of tests to zero-in on the correct value, but I'm a little lazy this time around  ;D
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: Missing/ Flickery Shadows (Mario64)
« Reply #3 on: October 01, 2012, 08:53:44 PM »
I uploaded the build that lets you manually change the polygon offset value.  I updated the first post with the link and instructions for how to use it.  Please let me know what offset value works for your device.
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 MarsEdge

  • bit
  • Posts: 5
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #4 on: October 02, 2012, 08:36:40 AM »
What was the value for the OMAP build? I assume going from that value would be faster than going from .2 since it worked the best so far?

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Missing/ Flickery Shadows (Mario64)
« Reply #5 on: October 02, 2012, 10:46:52 AM »
What was the value for the OMAP build? I assume going from that value would be faster than going from .2 since it worked the best so far?

Oh, right.  The value for OMAP is 0.2.  Since it is still flickering, you will probably want to increase that value.  I'd start with 0.5, and if that is too high, then try the half-way mark at 0.35, and so on (keep dividing in half to zero in on the correct value).
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 MarsEdge

  • bit
  • Posts: 5
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #6 on: October 03, 2012, 06:23:44 PM »
The flickering I originally noticed was on Lakitu's shadow during the intro where he was flying over the castle moat. I just tried it on Project64 and it did the same thing... I guess that means the default profile works fine. The star transparency issue also happens in Project64. While trying all the different builds, I noticed that in gles2n64 Peach's pink signature doesn't show up on the letter to Mario in the intro. It's probably unrelated, but just a note.

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Missing/ Flickery Shadows (Mario64)
« Reply #7 on: October 03, 2012, 06:33:31 PM »
Any luck finding a better value?  I think the default value (same as QUALCOMM) is negative -0.2f.  If that one is flickering, then I'd go from there (-0.5, -0.35, etc).  If it's not visible at all, then I would start from positive 0.2f.

It would indeed be odd that both positive and negative values are both visible (flickering or otherwise), because one direction should place the shadows behind the ground where you can't see them.
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 MarsEdge

  • bit
  • Posts: 5
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #8 on: October 03, 2012, 06:53:39 PM »
I originally (falsely) assumed that Mario64 was too primitive to have shadows under the trees. After seeing PJ64 have shadows (and looking on YouTube), I figured out that the QUALCOMM build (which has shadows) was correct. The OMAP build seemed to have sharper visuals in general, but I think that was a placebo. Sorry for the confusion.

Offline fd4101

  • bit
  • Posts: 6
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #9 on: November 14, 2012, 11:21:55 AM »
So I have been lurking here for awhile but now I'm here today to say thank you for all you hard work this things rocks!!!

I tested the four builds for the shadow fix. I know the test was for Mario but I tested it on Zelda oot since I'm currently playing that game and it had texture problems with the gle64n plugin. I can say that the tegra2 build fixed all the flickering texture problems in oot ie, roads, links shadow, and wall art (goron) thank you for this it was really annoying watching everything flicker. :). Also not sure if its been mentioned but the rice plugin in when used in oot does not display the map cursor, the amount of hearts, or fire. I'm using this on a Asus infinity tf700t with gamestop Bluetooth controller. Everything else seems to work fine.

Offline fd4101

  • bit
  • Posts: 6
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #10 on: November 14, 2012, 11:36:12 AM »
Is there a way to make the tegra build fully functional I notice that wide screen does not work?

Offline Gillou68310

  • Developer
  • long
  • *****
  • Posts: 112
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #11 on: November 20, 2012, 03:42:23 AM »
Hi paul I tested the previous builds on my galaxy s3 and the best one is the tegra build. I think you can add the SGS3 to the tegra 2 profile, the hardware type for the s3 is "smdk4x12", I built the last commit with this setting for testing and it's working great! 

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Missing/ Flickery Shadows (Mario64)
« Reply #12 on: November 20, 2012, 05:35:49 AM »
Excellent, thanks!
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 Sf1

  • byte
  • *
  • Posts: 14
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #13 on: December 16, 2013, 03:16:46 PM »
Same problem with Nvidia Shield (Tegra 4).
Any fix?

Offline Ninjamaster9

  • bit
  • Posts: 1
    • View Profile
Re: Missing/ Flickery Shadows (Mario64)
« Reply #14 on: October 16, 2014, 10:31:43 PM »
I tested all 4 versions on my Amazon Fire HD 2nd gen and the Tegra2 version removed all shadow problems under trees and in the main room. My device runs Android 4.0.3 modified (Fire OS) but the aLogcat would not log anything from mupen. It only showed 2 lines that were probably it starting up or something to do with my OS. Is there a way to apply this change to my full version of mupen, or will I have to wait for an update?

[EDIT]I changed flicker reduction in my video settings to "T" which fixed it. I have been using an older version of mupen for the past couple months so I didn't know about that. Good job on the emulator!
« Last Edit: November 12, 2014, 02:38:21 PM by Ninjamaster9 »