Coder Social home page Coder Social logo

Comments (6)

brett19 avatar brett19 commented on May 27, 2024

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.

exjam avatar exjam commented on May 27, 2024

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.

zhuowei avatar zhuowei commented on May 27, 2024

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.

brett19 avatar brett19 commented on May 27, 2024

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.

ADormant avatar ADormant commented on May 27, 2024

@exjam Could this feature be used for texture replacement like in Dolphin?

from decaf-emu.

exjam avatar exjam commented on May 27, 2024

Turns out it was very similar to the r600 but with added bank rotation, swizzle, swapping and channel rotation. It's now implemented :).

f4fe207

from decaf-emu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.