So when is fog getting added?

Ask questions about DraStic or discuss compatibility issues here.
Post Reply
Intymyt
Posts:10
Joined:Fri Oct 04, 2013 11:26 pm
So when is fog getting added?

Post by Intymyt » Sun Jan 19, 2014 11:36 pm

Just wondering.

Exophase
Posts:1715
Joined:Mon Aug 05, 2013 9:08 pm

Re: So when is fog getting added?

Post by Exophase » Mon Jan 20, 2014 2:04 am

I had some code a while ago, but it's not optimized and it needs some more changes to other parts of the renderer to really handle things correctly. It's hard even finding a lot of parts in games that use it, and it can be pretty subtle. For example, Luigi's Mansion in Mario Kart uses it to fade the background towards a dark blue.

What are you thinking of that uses it? It's possible that it actually doesn't, and missing/bad graphics could be due to some other bug.

Intymyt
Posts:10
Joined:Fri Oct 04, 2013 11:26 pm

Re: So when is fog getting added?

Post by Intymyt » Mon Jan 20, 2014 11:51 am

Well I know in Pokemon Platinum and Pokemon Black 2 there are Gyms that have a pitch black effect (one of them you're given a flashlight, the other one has lights that turn on when you approach their platforms) but instead everything is revealed so there's nothing hidden.

Intymyt
Posts:10
Joined:Fri Oct 04, 2013 11:26 pm

Re: So when is fog getting added?

Post by Intymyt » Mon Jan 20, 2014 1:52 pm

Forgot to add it also affects areas that require the moves "Flash" and "Defog"

Exophase
Posts:1715
Joined:Mon Aug 05, 2013 9:08 pm

Re: So when is fog getting added?

Post by Exophase » Mon Jan 20, 2014 6:36 pm

If you don't mind uploading savestates for some or all of these things I can check if they're really impacted by fog or if there's something else wrong.

User avatar
beansta
Posts:375
Joined:Wed Aug 07, 2013 9:39 pm

Re: So when is fog getting added?

Post by beansta » Mon Jan 20, 2014 10:07 pm

I have an ingame save for pokemon soul silver here that is at the place that demonstrates this fog error. I would add a screenshot too but its too big for the file size limit.
Attachments
Pokemon Soulsilver.dsv.zip
(34.66KiB)Downloaded 407 times
Devices running Android:

- Samsung Galaxy Note 4 (CM12.1, overclocked, undervolted)
- Asus Nexus 7 2013 (Stock Marshmallow...to play Pokemon GO on...)
- Tenfifteen QW09 SmartWatch (Kitkat)
- Fujitsu Lifebook T4410 Touchscreen Laptop (Remix OS 3.0)

Intymyt
Posts:10
Joined:Fri Oct 04, 2013 11:26 pm

Re: So when is fog getting added?

Post by Intymyt » Mon Jan 20, 2014 11:01 pm

Pokemon Black 2 (U).rar
(10.8KiB)Downloaded 451 times
Note the black circles on the ground. These are the areas that should be lit up, while everywhere else should be dark.

Exophase
Posts:1715
Joined:Mon Aug 05, 2013 9:08 pm

Re: So when is fog getting added?

Post by Exophase » Tue Jan 21, 2014 3:31 am

Intymyt wrote:
Pokemon Black 2 (U).rar
Note the black circles on the ground. These are the areas that should be lit up, while everywhere else should be dark.
Thanks, both of you.

I've looked into this and confirmed that the visible areas are indeed missing due to unemulated fog. If I disable fogging in desmume I get the same artifact. However, it's not using the actual fogging process that's used here, but the DS's fog masking ability. The game is probably initializing the depth buffer with the fog bit in a way that disables some of the rendering. Unfortunately, right now even my slow code doesn't actually emulate the per-pixel fog enable bit, so I have to work that in somehow before I can get this functionality.

I'll try to get to this in the near future.

Post Reply