kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
432 stars 21 forks source link

Support for 8K textures #210

Closed caiiiycuk closed 2 years ago

caiiiycuk commented 2 years ago

Hi, is it possible to add support for 8K textures? I found that some android devices does not support 16K textures. Maybe it's because OpenGL limitation.

Reporduced on Huawei Mate 10PRO, video: Mali-G72 MP12

Original error:

2022-09-15 13:50:32.958 28629-28856/com.caiiiycuk.github.vangers E/log_panics: thread '<unnamed>' panicked at 'wgpu error: Validation Error

    Caused by:
        In Device::create_texture
          note: label = Terrain height
        Dimension 16384 value 16384 exceeds the limit of 8192

Other phones: изображение

caiiiycuk commented 2 years ago

Android testers stats

I am curious why max texture size is 16383 (not 4 sic!) for some phones ...

caiiiycuk commented 2 years ago

Ohh I see it's a duplicate for #200, however it android related. Currently it's a blocker to go live on android. I didn't fully understand the optimizations of #199, maybe I am saying same thing: probably we can split the map into pieces to pack it into texture 8192x8129 (to avoid array of textures)?

caiiiycuk commented 2 years ago

But anyway it will not help for phones with 4096 max tex size