Comments (6)
If you want to try and get something like this working (loading of textures onto GPU, or to disk), I'm sure that would be immensely helpful. I would honestly suggest the Mesa R600 driver or a cleaned up version of the EveryFileExplorer source (converted to C++ as well).
from decaf-emu.
None of the games I have testing have got to the point of rendering so I have not actually done much research into the graphics side of things. I know there is a (binary only) tool out there called TexConv2 which will translate .GTX textures to .DDS.
That EveryFileExplorer seems pretty suitable due to being targeted to the WiiU, and from the code it clearly was all reversed from what I assume was TexConv2.
Although it is nice to have a texture -> bitmap dumper, for emulation I only really care about being able to unswizzle/untile to a format that OpenGL can render directly (e.g. gtx can unswizzle to DXT5 and there is no need for us to write a DXT5 decoder as you can pass it straight to hardware using the s3tc extension).
from decaf-emu.
Since I couldn't get AddrLib to work, I tried making the Mesa code work for dxt5 textures by looking at how AddrLib does the microtile swizzling for dxt5 textures and by grabbing the parameters from EveryFileExplorer; the result is https://github.com/zhuowei/wiiu-tools/blob/master/untile/main.cpp.
It managed to unswizzle one 128x128 dxt5 texture from Amiibo Settings, but didn't work for the two dxt1 textures.
(Also, Amiibo Settings boots to the point of issuing draw calls if you stub out OSSleepTicks and the missing ErrEula methods, so that might be a good test app)
from decaf-emu.
Hey @zhuowei,
Have you made any more progress with unswizzling/untiling? We are starting to look at processing of textures for rendering.
P.S. It's possible the failure to work on DXT1 textures is related to the default swizzle/tile mode being different for these textures (there is some fields that come with a GX2Surface related to tiling/swizzling).
Cheers, Brett
from decaf-emu.
@exjam Could this feature be used for texture replacement like in Dolphin?
from decaf-emu.
Turns out it was very similar to the r600 but with added bank rotation, swizzle, swapping and channel rotation. It's now implemented :).
from decaf-emu.
Related Issues (20)
- Decaf freezes when running game HOT 1
- Decaf crashes: Message: Failed to find resource fonts/CafeCn.ttf HOT 1
- Crash when running Smash Bros HOT 1
- Whole bunch of SPIRV-related errors prevent building HOT 13
- [Linux] Decaf fails to build HOT 1
- AUR Package wont build HOT 5
- [Request] Migrate to libera.chat from freenode HOT 1
- Is Qt required to build decaf-emu on Windows? HOT 2
- Screenshots for README HOT 1
- handling of vk::Result::eSuboptimalKHR
- Port to vcpkg: lot of libraries detection failing (600337d4) HOT 8
- Windows artifact builds is missing libraries HOT 1
- Decaf on Android HOT 1
- [Suggestion] GamePad camera emulation? HOT 2
- Unrecoverable FS error, command = 14, error = -196631
- Build failure on Musl libc due to using deprecated POSIX api's (ucontext.h) HOT 2
- Vulkan validation errors
- dosent work linux HOT 4
- Build error: ‘createResultValue’ is not a member of ‘vk’ HOT 1
- Making latte assembler MIT ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decaf-emu.