Project

General

Profile

Actions

Emulator Issues #9254

closed

[Feature Request] Custom Texture DDS MipMaps

Added by Bighead.0 almost 9 years ago. Updated over 7 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Feature request
Milestone:
Current
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-3506

Description

Master branch of Dolphin currently only reads mipmaps that are external from the top level of DDS textures, meaning textures with the mip# suffixes. Dolphin Ishiiruka can load lower mipmap levels that are internally built into the top level of the DDS texture, so there is no longer a need for textures with the mip# suffix when using the DDS format. It would be a major convenience if Dolphin could also read internal DDS mipmaps so texture pack authors do not have to either pick one of two mipmap formats, or include both which takes 2x the storage per mipmap.

For example, this fence texture is a DDS texture with only internal mipmaps with different images on descending layers. Dolphin is not loading the lower levels.

Dolphin: http://i.imgur.com/9YwTRrK.jpg
Ishiiruka: http://i.imgur.com/2H4YtvN.jpg

Dolphin: http://i.imgur.com/l7Mg9q7.jpg
Ishiiruka: http://i.imgur.com/mFkXhMh.jpg

Actions #1

Updated by degasus almost 9 years ago

Which behavior do you expect dolphin if both mipmaps are available (and differ of course)?

But the sad news, this won't happen as long as we use SOIL to load the image. Patches to remove SOIL are very welcome, but we'll likely loose some image formats in this way.

Maybe we're able to just replace SOIL with another library, iirc we have ffmpeg support almost everywhere now ;)

Actions #2

Updated by Bighead.0 almost 9 years ago

I believe the way Ishiiruka is currently doing it is loading the internal DDS mipmaps first if present, and ignoring the external (mip#) textures. If internals are not present, then it attempts to load the external mipmaps. I'm not sure if there could be a better way to do it, because in this way if they are different it won't matter since internals have priority.

I do remember a patch where magumagu was going to remove SOIL, but I'm guessing it was never complete. Plus it would be a shame if removing it breaks compatibility with DDS and JPG (which a few packs are still using unfortunately) without alternatives.

Actions #3

Updated by JosJuice about 8 years ago

  • Milestone set to Current

It would be great to have feature parity with Ishiiruka when it comes to DDS textures, so I'm going to mark this Current for now.

Actions #4

Updated by JosJuice over 7 years ago

  • Status changed from New to Fix pending
  • Issue type changed from Bug to Feature request

This PR should add support for both internal DDS mipmaps and native handling of DDS compression: https://github.com/dolphin-emu/dolphin/pull/5279

Actions #5

Updated by JosJuice over 7 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-3506

This should work as of https://dolphin-emu.org/download/dev/a2cba6d72f049e86460491c875353584e167d613/ (unless the GPU doesn't support native DDS loading, which only should be a problem on mobile devices and such)

Actions #6

Updated by Anonymous over 7 years ago

If this is fixed, can we close the old "get rid of SOIL" PRs? Do we still want to get rid of SOIL?

Actions #7

Updated by JosJuice over 7 years ago

We still want to get rid of SOIL as far as I know.

Actions

Also available in: Atom PDF