ytdtool icon indicating copy to clipboard operation
ytdtool copied to clipboard

[Bug] Textures are heavily distorted when packed

Open Techhz opened this issue 3 years ago • 7 comments

Tried on both Windows 10 & 11 Pro machines with same result.

Steps Taken: https://i.gyazo.com/74b36132546f08b37eee534cb8a055cb.mp4 Result: https://cdn.discordapp.com/attachments/877846456348844053/878997357373587466/unknown.png

Techhz avatar Aug 23 '21 03:08 Techhz

Hi it'd be to have some files to reproduce the issue with. In the meantime you could try other formats (e.x. put {"Format":32} in a patchOut.png.json), you can find the valid formats here: https://github.com/kngrektor/ytdtool/blob/master/ytdtoolio/src/Utils.cs and their ids here https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dformat

kngrektor avatar Aug 23 '21 12:08 kngrektor

Hi @kngrektor - changing the format to 32 resolved this issue for me. I will attach a PNG you can use for your debugging, feel free to close this. textOut

Techhz avatar Aug 24 '21 05:08 Techhz

It's worth to mention that 32 is A8B8G8R8 which takes 32bits per pixel, which is like 4x whatever I put as default (dxt5?). Storing everything as A8B8G8R8 is a good way to run out of texture memory and have overly long download times for no noticeable gain.

kngrektor avatar Sep 06 '21 21:09 kngrektor

Same thing for https://cdn.discordapp.com/attachments/801403150917042197/974637811447783474/chu_ad_adobeBrickWall_B01.png

In A8R8 it's good But in DXT5 not

Texture don't have transparency so no need to use A8R8

Identity-labs avatar May 13 '22 11:05 Identity-labs

Hi :) Try A8R8 and its still cut only part of image :(

image

Here source image

rcore_logo_dark

And here in zip generated YTD file. Is there anything what can I do?

rcore_logo_dark_debug.zip

Isigar avatar May 22 '22 18:05 Isigar

Hi it'd be to have some files to reproduce the issue with. In the meantime you could try other formats (e.x. put {"Format":32} in a patchOut.png.json), you can find the valid formats here: https://github.com/kngrektor/ytdtool/blob/master/ytdtoolio/src/Utils.cs and their ids here https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dformat

Where did you put patchOut.png.json file ?

xenicle avatar Dec 07 '23 09:12 xenicle

D3DFMT_A8 is not correct working image

unnick94 avatar Feb 07 '24 15:02 unnick94