Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add custom texture dumping/injection support to Beetle PSX core. #492

Open
saftle opened this issue Mar 2, 2019 · 112 comments

Comments

@saftle
Copy link

saftle commented Mar 2, 2019

Bounty Requirements:

  • Ability to dump textures from VRAM
  • Ability to replace textures with full-color, high-resolution images that the PSX cannot support natively
  • Should preferably support use of custom textures of any size. Must at least support injection of textures up to 2k resolution .
  • Support use of common image filetypes (such as PNG and JPG)
  • Support for loading texture packs

https://www.bountysource.com/issues/70820889-feature-request-add-custom-texture-dumping-injection-support-to-beetle-psx-core

@saftle saftle changed the title [Feature Request] Custom Texture Support [Feature Request] Add custom texture dumping/injection support to Beetle PSX core. Mar 5, 2019
@chuchuw
Copy link

chuchuw commented Mar 6, 2019

I just had a vision of medievil with remade textures ❤️️

@charmandercha
Copy link

Ohhhhh!

please, i need this!

I will use waifu2x in my all games hahahahah

@chuchuw
Copy link

chuchuw commented Mar 11, 2019

I will use waifu2x in my all games hahahahah

@gamaghostmagus Thank you for showing me this nice piece of software :)

@charmandercha
Copy link

I will use waifu2x in my all games hahahahah

@gamaghostmagus Thank you for showing me this nice piece of software :)

And this is not even the better

@chuchuw
Copy link

chuchuw commented Mar 18, 2019

And this is not even the better

Just found these, are you talking about that @gamaghostmagus ?

SFTGAN, DSFTGAN (Deep SFTGAN)
Spatial Feature Transform

SRGAN, ESRGAN (Enhanced SRGAN)
Super Resolution Generative Adversarial Network

@autun12
Copy link

autun12 commented Mar 24, 2019

Is any one working on this?

@charmandercha
Copy link

And this is not even the better

Just found these, are you talking about that @gamaghostmagus ?

SFTGAN, DSFTGAN (Deep SFTGAN)
Spatial Feature Transform

SRGAN, ESRGAN (Enhanced SRGAN)
Super Resolution Generative Adversarial Network

yes it's!

i use ESRGAN, and it is... AWESOME

@autun12
Copy link

autun12 commented Mar 26, 2019

Would anyone mind if I gave this a go?

@hizzlekizzle
Copy link
Contributor

@autun12 If you have some ideas on how it could be done, go for it. No one else is working on it, AFAIK.
If you'd like to discuss possible strategies, drop by our discord or IRC channels and we can talk through it.

@coccofresco
Copy link

coccofresco commented Mar 26, 2019

@autun12 do it, and you'll be an hero for people of this lands: we will sing songs to celebrate your genius and bravery... Please, just do it XD

@chuchuw
Copy link

chuchuw commented Mar 27, 2019

patapon

@mcdgray129
Copy link

Wow this would be great,

@Meetem
Copy link

Meetem commented Jan 13, 2020

Does anybody working on it? I can have a try.

@chuchuw
Copy link

chuchuw commented Jan 13, 2020

image

I think you're safe to go :)

@simias
Copy link
Collaborator

simias commented Jan 17, 2020

I just saw this issue, for anybody working on this I made a very quick and dirty texture dumping PoC a few years ago in beetle: https://github.com/simias/beetle-psx-libretro/tree/texture_dump
The main difficulty is handling palettes correctly and figuring the best heuristic to decide what to dump.

I implemented 2 solutions (exposed through core options), each having its problems. The most straightforward solution is to dump the textures one polygon at a time. The obvious inconvenient of this solution is that you end up with many small files with tiny texture chunks. For instance, running the dump on Medievil I end up with tiny texture chunks like:

dump-000000104-8bpp-DE9DD239
dump-000000124-8bpp-21736DB8
dump-000000408-4bpp-E940CF41
dump-000000144-4bpp-A00B80F5

Note that there appears to be a bug in my texture dumping code because I end up with many mangled textures, I must've forgotten to handle a special case (maybe the texture mask bits?).

The other possibility is to dump one texture page (256x256 pixels) at a time. The inconvenient of this solution is that you end up with a lot of extraneous data (and each page is dumped multiple times because of the many palettes), for instance:

dump-000000038-4bpp-E8936BAB
dump-000000045-8bpp-79E56AF9

I'm not really sure what's the best way to deal with this. I assume that many other consoles have this type of issues though, so maybe it's worth looking into what other emulators that support texture replacement do? Dolphin in particular might be interesting to look at, because AFAIK GameCube games also often use palettes.

So that's just for the dumping part, for the loading it's a whole other can of worms, especially if you want to make it work with the GL/Vulcan code. I've actually started thinking about how to do that for Rustation, so I have a few ideas on how to do that if anybody wants to brainstorm it.

@simias
Copy link
Collaborator

simias commented Jan 17, 2020

Oh and as a side-note, a potential difficulty with paletted texture replacement is that sometimes the same base texture will be used with multiple palettes. For instance in Crash Bandicoot you have red and purple carnivorous plants, they share the exact same texture but use a different palette. Handling these situations when implementing texture replacements might be tricky. Palettes can sometimes be used to simulate shading, using a darker palette when you get in the shadow and a lighter one when illuminated (this is probably less common on the PSX because the hardware has other, more flexible way of doing that sort of shading).

@Meetem
Copy link

Meetem commented Jan 17, 2020

@simias looks promising, I've never coded for psx, but coded for openGL, so I came with another solution, palette lookup is not easy for me cause I got really bored with this specifications. Thanks for your code, will try to use your palette lookup

Btw I can miss something due to lack of knowledge, but is there a way to dump textures just from TIMs?

@simias
Copy link
Collaborator

simias commented Jan 17, 2020

Actually I amend my previous comment regarding Crash's plant, it's even more devious than that: the texture and palette are purely black and white. Instead they use texture blending in the draw commands. Basically the way it works is that you can tell to render a texture (paletted or not) by blending it with a solid color. So it's an other layer of potential texture shenanigans on top of the texture+palette. Aku-Aku's feather in the same game are the same thing: black and white textures with 4 different colors blended. Here's the relevant code in the GL fragment shader:

if (frag_texture_blend_mode == BLEND_MODE_RAW_TEXTURE) {
color = texel;
} else /* BLEND_MODE_TEXTURE_BLEND */ {
// Blend the texel with the shading color. `frag_shading_color`
// is multiplied by two so that it can be used to darken or
// lighten the texture as needed. The result of the
// multiplication should be saturated to 1.0 (0xff) but I think
// OpenGL will take care of that since the output buffer holds
// integers. The alpha/mask bit bit is taken directly from the
// texture however.
color = vec4(frag_shading_color * 2. * texel.rgb, texel.a);
}

That being said these complicated situations might be left for later. Unfortunately I expect that they're fairly common on the PSX...

@Meetem what is a TIM?

@Meetem
Copy link

Meetem commented Jan 17, 2020

@simias TIMs are Typical Image Format, PSX textures

@simias
Copy link
Collaborator

simias commented Jan 17, 2020

@Meetem I'm not sure I understand what you have in mind exactly. Do you mean the texture format as stored in the CD-ROM instead of dumping it straight from the GPU?

@Meetem
Copy link

Meetem commented Jan 17, 2020 via email

@simias
Copy link
Collaborator

simias commented Jan 17, 2020

Ah that I've never looked into that so I can't really tell. Replacing the textures as stored in game files would obviously be the simplest approach, although then you won't be able to easily overcome palette limitations or change the texture size.

Beyond that I don't know how standard the texture formats are.

@Meetem
Copy link

Meetem commented Jan 17, 2020

@simias actually I find more convenient way to dump textures, than taking them from polygon draw commands, but CDs TIMs would even better

Actually I want to dump from TIMs but replace textures not in CD, cause psx tims cant be large than 256x256

@simias
Copy link
Collaborator

simias commented Jan 17, 2020

Well you can always compromise and dump PSX texture uploads, but then I'm not sure how you're going to match with palette data (except if you want to just replace the texture and not the palette I suppose).

In mednafen code texture upload starts with this command:

static void Command_FBWrite(PS_GPU* g, const uint32 *cb)
{
//assert(InCmd == INCMD_NONE);
g->FBRW_X = (cb[1] >> 0) & 0x3FF;
g->FBRW_Y = (cb[1] >> 16) & 0x3FF;
g->FBRW_W = (cb[2] >> 0) & 0x3FF;
g->FBRW_H = (cb[2] >> 16) & 0x1FF;
if(!g->FBRW_W)
g->FBRW_W = 0x400;
if(!g->FBRW_H)
g->FBRW_H = 0x200;
g->FBRW_CurX = g->FBRW_X;
g->FBRW_CurY = g->FBRW_Y;
InvalidateTexCache(g);
if(g->FBRW_W != 0 && g->FBRW_H != 0)
g->InCmd = INCMD_FBWRITE;
}

You can see that you have the X/Y coordinates in VRAM as well as the dimensions in W and H (the VRAM always assumes 16 bits per pixel).

Then the actual data is received here, 32bits at a time:

case INCMD_FBWRITE:
InData = GPU_BlitterFIFO.Read();
for(i = 0; i < 2; i++)
{
/* Cannot rely on mask bit if we don't have SW renderer, HW renderer will
* perform masking. */
bool fetch = false;
if (sw)
fetch = texel_fetch(&GPU, GPU.FBRW_CurX & 1023, GPU.FBRW_CurY & 511) & GPU.MaskEvalAND;
if (!fetch)
texel_put(GPU.FBRW_CurX & 1023, GPU.FBRW_CurY & 511, InData | GPU.MaskSetOR);
GPU.FBRW_CurX++;
if(GPU.FBRW_CurX == (GPU.FBRW_X + GPU.FBRW_W))
{
GPU.FBRW_CurX = GPU.FBRW_X;
GPU.FBRW_CurY++;
if(GPU.FBRW_CurY == (GPU.FBRW_Y + GPU.FBRW_H))
{
/* Upload complete, send over to RSX */
rsx_intf_load_image(
GPU.FBRW_X, GPU.FBRW_Y,
GPU.FBRW_W, GPU.FBRW_H,
GPU.vram,
GPU.MaskEvalAND,
GPU.MaskSetOR);
GPU.InCmd = INCMD_NONE;
break; // Break out of the for() loop.
}
}
InData >>= 16;
}
return;

@Meetem
Copy link

Meetem commented Jan 18, 2020 via email

@simias
Copy link
Collaborator

simias commented Jan 18, 2020

If you have questions about how the PSX GPU operates don't hesitate, I have a fairly in-depth knowledge about it. For texture dumping in general I'm sure you could get better inspiration looking at other project's implementation. Does any PSX emulator out there implements texture dumping and replacement? I seem to recall that gpuBladeSoft had something like that, but I don't really know how thorough it is.

@Meetem
Copy link

Meetem commented Jan 19, 2020

@simias thanks. Given nor poly vram dumping, nor texture page dumping is optimal, I'am trying to figure now how to catch texture upload. There is a way to catch texture part upload during one transaction (or how does it called), when game code calls FB_WRITE. I'am testing on Metal Gear Solid, and Konami logo seems to be splitted across multiple transactions.
With that being said, we can go with with this paths:
A) Dump TIMs from cd image, and catch up clut in realtime (if lut changed via writing vram) this is relatively easy to make, but hard to implement cd image reading with headers e.t.c
B) Write some sophisticated texture upload tracking system which will contains all transactions history for heuristic and not redundant dumping. This is actually hard way (but seems easy), because we need to catch up all texture uploading cases, and also save/load states, also texture is not always uploaded in the same order e.t.c, e.t.c.
C) give up on all that stuff and just handle texture uploads AND drawing with further ability to combine multiple textures at load time.

I'am going to stick with way C, cause I don't have enough knowledge to go with A (cause there multiple TIM viewing software), and way B is really PITA as much as I can say for MGS.

Here's my question, does really game can upload software generated clut, or its locked to tims on disk? I think there is a way to change cluts in vram as you want, creating cool effects, don't know if any games using it.
And one more: can I draw polys with any clut I want, e.g can I set clut position while drawing poly, without restriction by texture clut position in TIMs?

UPD: I found some opensource tim viewer, but in C#, it's not hard to me to rewrite it in C. So I might go for path A. Questions still applicable, answers needed to choose which path I'll finally go

@Meetem
Copy link

Meetem commented May 2, 2020

@gamaghostmagus for now I made texture exporting from my editor, that's the only done thing, you can contact me in discord if interested (contact seen above)

@SirFancyBacon
Copy link

I'm interested in testing as well if you need additional help.
I shot you a friend request on Discord @Meetem

I've got a windows machine, as well as a Linux machine for cross platform.

@RecklesFlam1ngo
Copy link

I'm here because I've been searching for a way to replace textures, no luck with gpubladesoft as he seems to have abandoned the plugin, will eagerly be waiting for hopefully when beetle has texture replacement ;)

@InfiniteT8
Copy link

I'd love for this bounty to have more attention, more so for the PSX gaming/modding community. Check out the bounty and donate if you're able to. I'm sure this would help any developer's motivation to work on this.

@inactive123
Copy link
Contributor

inactive123 commented Jun 17, 2020

So just as a headsup - this bounty should be safe from BountySource's recent decision to pocket the money if a bounty is exactly two years old and has no solutions yet. That being said, in the short term this sudden and swift change in policy probably suggests we probably want to start protecting ourselves here and maybe finding some alternatives (and protecting the money along the way so that it doesn't go 'poof'). I'd like to hear some ideas on moving forward.

Second - @stoofin's current WIP is currently in master, so people can test the Chrono Cross pack already that is circulating. Now it's important to know where to go from here. Can somebody write a tutorial explaining how the current system works and how one would go about making a pack like this? Does the current method only support a few games? How do we expand things from here, and can we come up with more PoCs for other games?

I have absolutely no qualms about the texture replacement code design changing later on as we realise certain things need to change, as long as we get some momentum going and other people participating in the custom asset creation process, as @InfiniteT8 suggests.

Let's try to pick a couple of tentpole games like Resident Evil, FF7, MGS and so on and then figure out if the current system is sufficient for texture replacement in those games, or whether we need extensions.

But most importantly - people that might want to get involved in doing these packs themselves need to know how it all works. Preferably in whatever tutorial gets written, it gets explained too how to do this by hand without external looks like custom editors if at all possible. But of course, the tutorial can also explain how to do things with the editors that people wrote in this thread.

@lyonhrt
Copy link

lyonhrt commented Jun 18, 2020

i've done a ton of tests on this @twinaphex and i'm actually surprised how well it does work, 2D games is off the table (so far all the tests i've done is crash), and it has all the original issues with vram dumping so some corrupt textures, or multiple images with different palettes etc, which makes it tricky (so possibly possible?) some games are easier than others and dump without issues (resident evil directors cut actually does dump usable textures). i can see why @Meetem went the direction he went with his method of texture injecting and dumping for more control.
I have done the "simple" method of chucking all the dumped textures in an ai upscaler, then throw the processed textures back in to see what happens, and did turn out better than expected (driver the wheelman) but i can't tell you exactly why it worked at this stage.

you can catch me on discord LyonHrt#1856 if i have any extra findings, or methods that would work for general use

@InfiniteT8
Copy link

I'm currently testing out @stoofin 's wip but have found that there's no option to turn on replace textures at the quick menu.

I also noticed that outside of Chrono Cross, it's all left to be figured out how we could replicate @stoofin methods with upscaling rather than giving an idea of how to accomplish this with other games. So I 2nd @twinaphex's call for a tutorial haha.

@twinaphex Perhaps if a stable enough project that meets the requirements for a good number of games (3d and 2d) I could see the bounty being safe enough. Perhaps there could be a discord room for testing, bug reports, updates, etc where the developers, testers, and contributors could correspond in real-time.

I was also able to test @Meetem early WIP of his tool. I like the concept of being able to see the textures populate real-time in the tool but I believe that being able to turn the feature on and off while the tool is still open in the background would allow users to focus on the exact textures they're looking to extract at any given moment.

What I liked about @Meetem tool was the easy setup. Though it's not quite fully functional I feel like it has a lot of potentials.

@inactive123
Copy link
Contributor

I have setup a Discord room on RetroArch's Discord - it's called #texture-replacements.

@lyonhrt is already in there so we could use it for further discussion and research/development.

https://discord.com/invite/27Xxm2h

@saeedAlshaikh
Copy link

Hi folks ,
I have done some testing on the new core update ( the official one)

https://forums.libretro.com/t/beetle-psx-hw-texture-replacement-testing-feedback/28954

According to the Chrono Cross pack creator Tiriosaurus reddit , he used external tools to dump the textures which probably give better & bigger texture chunks of background games instead of the tiny ones dumped by the core

https://www.reddit.com/user/Tiriosaurus

@Bloguis3
Copy link

@twinaphex
Check the Resident Evil Seamless HD Project from @MoArtis:
https://www.reshdp.com
https://github.com/MoArtis/ResidentEvilSeamlessHdProject

They're aiming to restore the first 3 original resident evil games with AI upscaled textures.
They have already completed Resident Evil 2 and 3, using a custom dolphin emulator (for the gamecube versions of the games).

From their discord channel, they appear to be looking for a resident evil 1 engine\emulator that allows for texture replacement.

You're looking for a game to showcase beetle's texture replacement capabilities, they're looking for an emulator\engine that allows to replace RES1 textures, if both your teams could work together to accomplish this, it would be great.

@inactive123
Copy link
Contributor

Sure they can stop by in the Discord chat and talk with the real guys that are doing all this texture replacement work like @Meetem, @lyonhrt and @stoofin . I think it's important to emphasize that Libretro as a team is not necessarily doing the coding on this project.

Anyway, sounds great. I quite like the Seamless HD projects myself, would be great if they did packs like that for the PS1 games too.

@MoArtis
Copy link

MoArtis commented Jun 21, 2020

Thanks for pinging me! We heard about that feature. It's a great news for us and we will definitely look into it as soon as possible.
If we can get a good proof of concept running, we will share it here and on that dedicated libretro discord channel. :)

@eGax
Copy link

eGax commented Jul 12, 2020

It's really not. This is an open issue created requesting a feature, nothing to do with texture replacement bugs. It's in your best interest to please make your own issue instead of trying to hijack someone else's.

@saftle
Copy link
Author

saftle commented Jun 8, 2021

theflyingzamboni, Kupo and @lyonhrt, and anyone else that are working on projects or have tested this extensively, could you possibly list the current issues that would need to be fixed to get the ball rolling? Thanks!

@InfiniteT8
Copy link

Hi guys, I'm finding with the current implementation of Beetle PSX HW's texture replacement feature, I experience crashes when tracking is activated before the game starts. It doesn't exactly get pass the Now Loading screen and it fails to grab some background textures, and loading screens (duckstation's latest unofficial release covers those bases). I expereince these crashes with Smackdown 2 specificially. I can't be sure if this happens to other games.

@saftle
Copy link
Author

saftle commented Jun 8, 2021

Here are a few issues opened by theflyingzamboni and Zychronix:

[Feature Request] Dump paletted textures as a single image #772
Some textures not dumping/replacing in The Legend of Dragoon #773
Track Textures reducing gameplay performance #778

theflyingzamboni also mentioned the following in the libretro discord:

Regarding palettes, certain types of textures not dumping or replacing, and certain performance hits from just having track textures turned on. An issue should probably be filed for transparency calculation too, as I think that's slightly incorrect currently

Edit: I also found the following issues:

Texture dump issue if palette is not 4bpp nor 8bpp #715
Texture replacement causes textbugs #692
Semi-Transparent texture replacement issues #686

@faospark
Copy link

faospark commented Jun 8, 2021

based on my experience... RE3 just crashes on dumping textures . also noticed that the textures it dumps actually has and alpha channel nope more like semi transparency on them. apologies if i dont know the technical terms for it. but for 2d games the texture dumping feature is fine. it does not have problem full on 3d games such as 40winks and crash bandicoot

@saftle
Copy link
Author

saftle commented Jun 8, 2021

Kupo in the libretro discord mentioned the following:

Besides the aspects that have been mentioned already I think at

  • a missing merging feature: In Harvest Moon I got over 30k dumps after only 10 minutes of playtime. 98% of them were just thin strips and upscaling these textures wouldn't work
  • an issue, that it dumps multiple files when the screen fades in/fades out. This for example happens during battles in Grandia. Whenever someone is casting a spell, the screen gets a bit darker and Beetle creates a new texture dump. At the end I had like 1000 slightly different dumps for a single battle background...
    hm there might be more issues that I encountered but atm I can't remember any of them

Raykusen mentioned this as well:

The main issue i have with that feature is the problem of the duping texture, where i get an insane amount of the same textures, duplicated, and that is a deal breaker for me
Not sure if it would be possible later on, but i'd love to not get duplicated textures and the dumps of pixel art (such as megaman x3) games not being all those small slim lines, and instead, they to be complete textures sizes

For example, if a game shows the capcom logo, i don't want it to divide the capcom logo in multiple small little lines, and just let it one big and complete image of it

@saftle
Copy link
Author

saftle commented Jun 9, 2021

Two more reports on the discord:

theflyingzamboni:

certain animated textures will dump as a ton of different states somehow, instead of dumping the actual texture/textures. Not even sure how this one occurs.

Kupo:

Oh and because I recently talked about the annoying blur with my replacements in Beetle. In Duckstation the textures indeed look sharper. Here is a comparison:

Beetle:
Retroarch

Duckstation:
Duckstation

@Kupo91
Copy link

Kupo91 commented Jun 9, 2021

  • an issue, that it dumps multiple files when the screen fades in/fades out. This for example happens during battles in Grandia. Whenever someone is casting a spell, the screen gets a bit darker and Beetle creates a new texture dump. At the end I had like 1000 slightly different dumps for a single battle background...

Can't remember if I included this one anywhere, but there's the issue where certain animated textures will dump as a ton of different states somehow, instead of dumping the actual texture/textures. Not even sure how this one occurs.

I think we described the same issue. Duckstation handles it different but also not perfect.
I made a video to better illustrate it.

So here is a short scene of a battle without texture replacement. The video shows animations in ui. Look at the hp and the battle bar. It also shows what I meant with fade in/fade out. If it's your turn the battle background gets a bit darker. If she casts her spell the background is turning red.

https://youtu.be/S1LGRlKv41M

This is now how beetle would dump this scene:

sdsdfgsdf

Several textures for each state.
That's actually okay, if there are not too many states. But the issue in my case is, that the battle background looks different with each spell. That's why I get like 1000 dumps of the battle background if I cast each available spell in the game. In this case I have to give up replacing it because the texture pack would be too big otherwise.

Now about how Duckstation handles it: It only dumps each texture one time. On the one hand it's good, because this way I could actually replace the battle background without being worried about the final texture pack size.
BUT the downside is, that the background won't change its color anymore and also the animations stop being.. animated. Here is a video what it looks like in Duckstation atm:

https://youtu.be/mBYtXo2nw5M

Note that Duckstation is WIP. The video only shows what it looks like atm. This could change in the future

@Mohsen865
Copy link

Kupo:

Oh and because I recently talked about the annoying blur with my replacements in Beetle. In Duckstation the textures indeed look sharper. Here is a comparison:

Beetle:
.............
....
...

From those screenshots, it looks like the character texture on Beetle is filtered (with bilinear or something), while the one on Duckstation is pixelated. If the replacement texture is large enough, there shouldn't be a blurred/pixelated texture issue... Perhaps the emulator in somewhere scales down the texture (in half size of final drawing resolution) and upscale it again before putting it in its place! But why? Also there's a problem with the 'shadow' in Duckstation:
Duckstation  Beetle

@Kupo91
Copy link

Kupo91 commented Jun 10, 2021

From those screenshots, it looks like the character texture on Beetle is filtered (with bilinear or something), while the one on Duckstation is pixelated. If the replacement texture is large enough, there shouldn't be a blurred/pixelated texture issue... Perhaps the emulator in somewhere scales down the texture (in half size of final drawing resolution) and upscale it again before putting it in its place! But why?

I don't know, texture filtering in both emus is set to Nearest Neighbor and the texture replacement has the size x4 of the original texture, which also matches my internal resolution x4

Also there's a problem with the 'shadow' in Duckstation

Ye, that probably is part of the issue two posts before.
If I dump the character sprites in Beetle. I get two different dumps. One for the character and one for the shadow:
Unbenannt

In Duckstation however I get only one dump for both textures:
Unbenannt2
So if I replace this texture, it uses the replacement for both, character and shadow.

It's the same issue with the animated textures and the battle backgrounds. It happens with textures where the hash id is the same.
Unbenannt3

@saftle
Copy link
Author

saftle commented Jun 18, 2021

@Kupo91 do you by chance have bilinear filtering enabled in the Video options of RetroArch itself?

@Kupo91
Copy link

Kupo91 commented Jun 19, 2021

@Kupo91 do you by chance have bilinear filtering enabled in the Video options of RetroArch itself?

No, I already checked this, it's disabled. Must be something else :/

@SirFancyBacon
Copy link

@Kupo91 sorry to ping for a long dead topic; But i've noticed in Digimon World 3 sometimes the textures have random filtering applied depending on the angle of the sprites.. so i don't think this issue is related to only replaced textures.

@Kupo91
Copy link

Kupo91 commented Dec 21, 2021

@Kupo91 sorry to ping for a long dead topic; But i've noticed in Digimon World 3 sometimes the textures have random filtering applied depending on the angle of the sprites.. so i don't think this issue is related to only replaced textures.

you're all good. it's a shame that it became so quiet here. i really wish that this feature gets some more attention so i can finish my texture packs one day.
about the filtering you mentioned, do you have screenshots from your findings? I don't remember experiencing anything like that.
but the blur on textures that you replace is pretty strong. you can easily test this by using the exact same texture as replacement that you dumped shortly before without upscaling or editing it in any way. here is an example:

ohne
mit

this is the result if you just move a texture from your dumps folder into your replacements folder. it's 1:1 the same texture, i didn't touch it, so it should look the same but it's blurry af

@stoofin
Copy link
Contributor

stoofin commented Feb 22, 2022

@Kupo91 Hi, sorry, my fork used hardcoded trilinear filtering, so that's what you're seeing there. There isn't any pixel art in chrono cross so I never bothered with any additional filtering options. Not terribly helpful for your use case, but, the more you know!

@Kupo91
Copy link

Kupo91 commented Feb 22, 2022

@Kupo91 Hi, sorry, my fork used hardcoded trilinear filtering, so that's what you're seeing there. There isn't any pixel art in chrono cross so I never bothered with any additional filtering options. Not terribly helpful for your use case, but, the more you know!

Oh, hi. Yea I noticed that I can reduce the blur if I just increase the resolution of my upscale, even if it's just Nearest Neighbor. And this way I can also smooth out the conturs, which was always a bit difficult without having different grades of transparency.
I think I'm more struggling with the missing-bug. In the game I tried to upscale, half of the UI was dumped properly and the other half had this missing-bug. That's odd and it also looks a bit weird if it only replaces half of the textures while the other half is still pixelated :/
That's probably what keeps the majority from making texture packs. That and the high number of paletted textures (200+ dumps for some tilesets in my game)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests