Texture created with IImageWrapper appears distorted on PS4
I'm using the IImageWrapper to create a texture from a downloaded PNG at runtime. It appears fine in my editor tests, but when we run it on the PS4 the texture appears distorted:
Does anyone have any idea what this might be? I'm just using the standard Image creation example which you'll find if you search for 'texture from URL':
Any help would be much appreciated!
asked Mar 30 '17 at 09:47 AM in C++ Programming
Solved it on PS4, but not on XBoxOne unfortunately. Any Idea ?
answered Jul 10 '18 at 01:12 PM
texture->bNoTiling = true; is not enough to make it work on XBoxOne because the low-level creation of the texture is done via a function called CreateVirtualTexture() which does not handle tiling as intended (at least, that's my understanding of it).
So, I modified the code of FTexture2DResource::InitRHI() to force the call of SafeCreateTexture2D() instead of CreateVirtualTexture(). In /Engine/Source/Runtime/Engine/Private/Texture2D.cpp, do the following :
It's kind of a hack but it works fine for me.
Follow this question
Once you sign in you will be able to subscribe for any updates here