You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2016-10-23 00:19:04

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Issue with texture smoothing on transparent effects

When texture smoothing is turned on in open GL 3.2 or old. This happens.  Can it be fixed?

Metroid%20Prime%20Hunters__18975_zps1ty0ruif.jpg

Offline

#2 2016-10-25 21:24:25

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

No replies for several days. did you guys die or something?  or are you just taking a vacation?

Offline

#3 2016-10-25 22:15:52

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: Issue with texture smoothing on transparent effects

we knew you were going to be annoying about it and pre-emptively ignored you

Offline

#4 2016-10-26 02:16:27

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

Ha ha very funny.  i knew you were gone since there weren't replies for a few days on other topics.  or did you "pre-emptively" ignore them too lol. tongue

So anyways time to annoy you with another bug.  Can this be fixed?  or is this some how related to that fine z ordering bug you cant figure out?  it doesn't show up with regular open gl or the gl texscale filter on

Offline

#5 2016-10-26 03:21:04

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: Issue with texture smoothing on transparent effects

it looks like a quirk or error in the texture filtering, like an overflow or wraparound problem. the perimeter is OK, and the alpha should be fading out, but at alpha 0 it suddenly becomes opaque once again. it looks like a bug that can be fixed.

Offline

#6 2016-10-26 08:03:13

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

Alright well looking forward to a fix then.  btw i noticed there hasn't been any new builds lately (beside the duc fixes)  i thought rogerman was working to get RBG 888 or something like that?  what does that improve anyways?

Offline

#7 2016-10-26 18:02:19

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: Issue with texture smoothing on transparent effects

Offline

#8 2016-10-27 05:33:24

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

Oh that so much nicer!   I see why he wants to convert it over now.   so is he taking a break?  (since there hasn't been any builds in awhile)

Offline

#9 2016-10-27 06:48:45

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,169

Re: Issue with texture smoothing on transparent effects

He hasn't shown up at the office in a week. We're going to have to start docking his pay.

Offline

#10 2016-10-27 12:47:18

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

lol XD i hope thats a joke.

Offline

#11 2016-10-28 01:56:08

rogerman
Member
Registered: 2011-06-04
Posts: 380

Re: Issue with texture smoothing on transparent effects

fintogive, yeah, I've been taking a break from DeSmuME for a while, due to other obligations that I need to take care of. Sometimes I take time off to fulfill life's other obligations, but I always come back to DeSmuME as my time permits. I do still keep tabs on DeSmuME issues on a regular basis.

I did look into this texturing issue for you. It turns out that the triangle there is actually a separate layer of polygons that are drawn in front of the brown door polygons, which are used to show the Metroid door bubble. When you shoot the door once, the door bubble disappears, along with its associated polygons. As for the texture that is used, the door bubble polygons use an A5I3 formatted texture.

Do note that the NDS does not natively support bilinear filtering, mipmapping, or anisotropic filtering, which are the OpenGL features used for implementing DeSmuME's texture smoothing feature. However, DeSmuME uses some special shader code to compensate for the lack of these features. This special shader code works on all textures, with the exception of A3I5 and A5I3 formatted textures.

So the solution is to get DeSmuME's shader code to also compensate for the usage of A3I5 and A5I3 formatted textures, right? Unfortunately, this is an extremely difficult (if not unsolvable) problem due to the fact that it is impossible to know in advance how a particular texture is used. What's probably happening with the door bubble is that it is using an extremely small texture in repeat mode. When you apply bilinear filtering to that small texture and spread it across the relatively large polygons of the door bubble, some of the color from the opposite side of the texture bleeds over into the repeated portion, which in this case, is the center triangle in the middle of the door bubble.

So if you really want to continue using texture smoothing, but don't want to see these texturing issues in the doors, then you'll need to increase the texture scaling to 4x. Do this, and this rendering bug should go away.

Realistically, I strongly believe that it will never be possible to solve a bug like this. Just remember -- texture smoothing isn't native to an NDS, so you can't expect it to work perfectly all the time!

Offline

#12 2016-10-28 09:26:55

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

Ah ok, i understand.  And yeah i knew upping the texscale fixed the issue (but it does put a lot of blur on the textures with both of those filters on) . so its kinda like the fine z ordering bug as in its near impossible to fix?  Thanks for looking in to that bug.

So i was wondering when will rbg888 be fully implemented?  i know you probably don't have an answer for that but maybe best guess?

i got an idea of possibly fixing it.  is there a way to set the blur to not blur transparent textures? maybe that will fix it?

Last edited by fintogive (2016-10-28 09:28:56)

Offline

#13 2016-10-30 02:24:20

rogerman
Member
Registered: 2011-06-04
Posts: 380

Re: Issue with texture smoothing on transparent effects

This issue has nothing to do with Z-ordering. This issue has everything to do with the fact that Metroid Prime Hunters is expecting a small texture to be rendered using nearest-neighbor filtering, but the DeSmuME user is forcing that same texture to be rendered in a different way. The reason this issue is near-impossible (if not outright impossible) to fix is because we cannot know how any particular texture is going to be used. We're not psychic.

I don't know when higher color depth rendering will be fully implemented. Keep in mind that it's not just supporting RGB888, but also RGB666 (the native NDS color depth). The hold up is making everything work properly with display capture, which is a difficult beast to tackle unto itself. I have no guesses on the time frame for when this feature will be completed. However, if I feel like this feature is taking too long, I could simply release an incomplete version of this feature that lacks full display capture support.

Is it possible to "fix" this issue by checking if a particular texture is in A5I3 format, and then disabling texture smoothing for those textures? Technically, yes, but this would be a hack only for Metroid Prime Hunters. But even then, this game uses a lot of A5I3 textures, and so other polygons that use these textures will look out of place when rendered next to other non-A5I3 textures that are nice and smooth. This contrast in rendering produces ugly results overall, so such a hack wouldn't really be worth it. Plus, this hack would hurt other games that use A5I3 textures that don't suffer from the same rendering bugs as Metroid Prime Hunters.

Offline

#14 2016-10-30 11:41:38

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

ah, Ok.  well then this topic is done.

btw you mean AVI capture isnt operational with rbg888?  well i hope it doesn't come to that regarding rbg888.

Offline

#15 2016-10-30 21:29:41

rogerman
Member
Registered: 2011-06-04
Posts: 380

Re: Issue with texture smoothing on transparent effects

When I am referring to "display capture," I am not referring to AVI capture (a frontend operation); I am referring to the NDS internal display capture unit that copies pixels from the output framebuffer to VRAM (an emulation operation). NDS games use display capture for many reasons, from dual-screen 3D rendering, to post-processing visual effects, to performing render-to-texture with the 2D subsystem, and so on. And these are just the use cases I can think of off the top of my head -- there are many more.

The NDS assumes that all display captures are saved into VRAM using an RGBA5551 color depth. So if the user wants to have an output framebuffer of RGB888 or RGB666, then a bunch of scenarios must be handled in a specific manner, depending on how the display capture data is to be used. Given the myriad of ways that the NDS can use display capture, it is very difficult to account for every use case. That's why supporting display capture at higher color depths is a hugely nontrivial task.

Offline

#16 2016-11-02 22:38:14

fintogive
Member
From: USA
Registered: 2014-04-11
Posts: 346
Website

Re: Issue with texture smoothing on transparent effects

Ah ok, i understand now.

Last edited by fintogive (2016-11-02 22:38:31)

Offline

Board footer

Powered by FluxBB