Project

General

Profile

Emulator Issues #540

Bubble effect in Super Mario Sunshine

Added by omegadox over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Well I hope donko see this :P. I compared the graphics on real GCN and
Dolphin. The bubbles in the ooze has this post-effect that makes them
3dish and they swirl outward. They are rendered from the copied EFB. I
want to figure out what works this effect >=O. In Dolphin you just see
this colored checkerboard pattern. As I can see, the EFB in Dolphin is
still missing some functionality.


Related issues

Has duplicate Emulator - Emulator Issues #3430: Super Mario Sunshine - Issue 2 -> bubble glitch REPOSTDuplicate

History

#1 Updated by omegadox over 11 years ago

The problem could be that the EFB is missing a blur effect.

#2 Updated by XTra.KrazzY over 11 years ago

I could merge this to issue 300, but this somehow needs to be verified.

The LoZ series seems to use the EFB efficiently (As does Luigi's Mansion and SMS as
we can see)

#3 Updated by XTra.KrazzY over 11 years ago

I looked at some documentation and found that between the EFB and the XFB, with the
exception of gamma correction and color value clamping, there is no filtering.

omegadox: You don't have to wait for donko to notice this, just Cc ;)

#4 Updated by ekshenman over 11 years ago

Maybe this is not this issue but...

I have problem with bubbles in Mario Party 4 in r2046 adn r2037:

http://heroesworld.narod.ru/mario_part_4_2.JPG

I will search when this issue happen...

#5 Updated by ekshenman over 11 years ago

This isuue inter r1842 and r1911.

#6 Updated by omegadox over 11 years ago

Thanks XK, I forgot about Cc :P

@ ekshenman: This has nothing to do with the bubbles in MP4, those are just shaded
textures. The Bubbles in SMS are drawn from the copied EFB and they use some sort of
post-effect blur to mix the 4 colors in the bubble together.

#7 Updated by XTra.KrazzY over 11 years ago

omegadox: Wow you really love this Cc thing :)

#8 Updated by omegadox over 11 years ago

Solves all our problems ;D. Maybe it can somehow fix Dolphin for us ;P.

#9 Updated by ekshenman over 11 years ago

omegadox: yep. But in MP4 this is problem too:)

#10 Updated by omegadox over 11 years ago

Play with safe cache option, but I got them to work ok for me, but issue is not for MP4.

#11 Updated by federelli over 11 years ago

Would it be fine if i opened an issue to fix the fact that you can't clean the goo?
Anyone know what i mean? it makes the game hard to play.

#12 Updated by omegadox over 11 years ago

There is a change that the game uses mipmapping tricks to do the blurring effect of
the bubbles.

#14 Updated by skidau almost 10 years ago

issue 3430 has been merged into this issue.

#15 Updated by Anonymous almost 10 years ago

Please respond if this issue is still valid, or it will be closed.

#16 Updated by WMRPoker almost 10 years ago

afaik its still valid... was there a commit lately, that should have fixed it?

#17 Updated by Anonymous over 9 years ago

  • Status changed from New to New

Ignore this...Status:GameIssue was removed, moving to New

#18 Updated by Autoran1 almost 9 years ago

These bubbles have IA8 format, and to me it looks like mirroring issue, before the mirroring was fixed i have the same looking icons in Wii Menu

#19 Updated by NeoBrainX almost 9 years ago

For reference, the bubbles don't have an IA8 format...

The bubbles are created using RGB5A3 EFB copies which can be proven by disabling those (the bubbles won't appear then). The EFB copies get reused as RGB5A3 textures lateron.

#20 Updated by NeoBrainX almost 9 years ago

Uhm, sorry I need to correct myself - they're actually RGB565 EFB copies which are used as RGB565 textures.
Fwiw, the source EFB rectangle is 640x448 which is being scaled down to 320x224.

#21 Updated by WMRPoker almost 9 years ago

So, is there a way fix the bubbles now, Neo?

#22 Updated by NeoBrainX almost 9 years ago

.. if I knew where the problem is, I would've said so.. ;P

#23 Updated by nitsuja- almost 9 years ago

Here's my guess: The pixel shader used to render those bubbles is simply using the wrong texture coordinates for sampling from the copied EFB texture. The reason it looks like a checkerboard is that it's incorrectly sampling around the corner of the texture, so you're seeing colors from all 4 corners of the screen in the bubble. If the texture coordinates were correct, you would instead see colors coming from near where the bubble is onscreen.

#24 Updated by MofoMan2000 almost 9 years ago

That's always possible but not entirely likely, I don't think. A texture coordinate of -1 might wrap around to the other side of the texture, but more often than not I find that kind of crap throws an error.

#25 Updated by nitsuja- almost 9 years ago

I don't think texture wrapping can throw an error... the exact coordinates aren't known until the pixel shader runs, and pixel shaders don't have time to be checking and throwing errors like that. And it's quite possible that the sample mode is set to wrap instead of clamp in this case. You can easily verify that the 4 colors in the bubble are coming from the corners of the screen by moving the camera around while bubbles are visible.

#26 Updated by Anonymous almost 9 years ago

i've not tried to move the camera around, is it coming from viewable area or not? perhaps it is meant to sample from an area of the framebuffer which is meant to be offscreen or not displayed at all. (many effects work like this already, so it's doubtful...)

#27 Updated by NeoBrainX almost 9 years ago

It's sampling the whole visible scene before the goop and HUD is getting drawn.

#28 Updated by Billiard26 almost 8 years ago

  • Issue type set to Bug
  • Category set to gfx

#29 Updated by Autoran1 almost 8 years ago

Tried the bubbles on software
so here it is
http://i5.minus.com/iZ4ivIaDE1qXL.jpg
Pretty invisible, but this is the way they're supposed to be

#30 Updated by Billiard26 over 7 years ago

  • Status changed from New to Accepted

Fifo log demonstrating issue: http://ge.tt/8HX3CcY/v/0?c
Like others said, it works with software renderer.

#32 Updated by NeoBrainX about 7 years ago

For reference, the shader that is being used in OGL is http://pastie.org/private/jjt5qzj5odlcwdytanbva . Most importantly, "tevcoord.xy = wrappedcoord + indtevtrans0;" is causing problems. If I force indtevtrans0 to zero, the bubbles show up fine. Given that the software renderer uses 24 bit values for the final texture coordinate, I guess this is once again a failure to properly emulate the bitness of intermediate values.

#33 Updated by NeoBrainX about 7 years ago

  • Status changed from Accepted to Work started

#34 Updated by NeoBrainX almost 7 years ago

Fixed in tev_fixes_new.

#35 Updated by NeoBrainX over 6 years ago

  • Status changed from Work started to Fixed

Fixed in commit a9a8c730748b (tev_fixes_new).

Also available in: Atom PDF