godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.55k stars 21.27k forks source link

Godot generates PVRTC-compressed texture with all zeros #38040

Open DrMoriarty opened 4 years ago

DrMoriarty commented 4 years ago

Godot version: Godot 3.2.2.beta1

OS/device including version: MacOSX 10.14.6 (18G95)

Issue description: Set texture VRAM compressed, enable pvrtc compression. Reimport texture, after GDST header it contains only zeros.

Original file: background

Compressed file:

background.png-14973fd1de8b151436931643db6aa461.pvrtc.stex.zip

Steps to reproduce:

Minimal reproduction project:

DrMoriarty commented 4 years ago

It was broken after 3.1.1 For example this file generated by godot-3.1.1.stable: background.png-14973fd1de8b151436931643db6aa461.pvrtc.stex.zip

DrMoriarty commented 4 years ago

I'm trying to fix it and it seems that our pvrtc encoder completely broken. So my game looks on an emulator: Снимок экрана 2020-04-20 в 23 21 06

And this is screenshot from iphone: Screen Shot 2020-04-20 at 23 19 12

One texture (container in the center of screen) is vram packed.

Zireael07 commented 4 years ago

IIRC VRAM packing isn't supported on mobiles?

DrMoriarty commented 4 years ago

@Zireael07 what is it IIRC?

Zireael07 commented 4 years ago

IIRC = If I recall correctly

DrMoriarty commented 4 years ago

@Zireael07 therefore there is a reason to make it workable.

Calinou commented 4 years ago

Related to #28669, #28683?

DrMoriarty commented 4 years ago

@Calinou yes, exactly. Now I'm working on new pvrtc compressor for godot. Hope it will be ready in couple of days.