floooh / sokol

minimal cross-platform standalone C headers
https://floooh.github.io/sokol-html5
zlib License
6.53k stars 468 forks source link

Missing ETC_R11 format #1041

Closed julhe closed 1 month ago

julhe commented 1 month ago

I tried to find the single-channel format from the ETC family, but only found the two-channel variant (SG_PIXELFORMAT_ETC2_RG11). For the BC family, there is BC4, so I guess it would make sense to have ETC2_R11 as well.

floooh commented 1 month ago

Hmm yeah, strange that I overlooked that since the two-channel variants are there...

Technically those should probably be changed to SG_PIXELFORMAT_EAC_* though, see the WebGPU extension (https://www.w3.org/TR/webgpu/#texture-compression-etc2).

floooh commented 1 month ago

Ok fixed in https://github.com/floooh/sokol/pull/1044

I actually also found a bug in the WebGPU backend where the RG11 formats were mapped to the wrong WebGPU texture formats.