CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
358 stars 83 forks source link

Support textures with less than four channels #405

Closed j9liu closed 9 months ago

j9liu commented 9 months ago

Depends on #404, so merge that first.

While working on polygon clipping, I saw that the rasterized polygon textures were importing incorrectly, appearing very corrupted. In TextureLoader.cpp, we were not supporting texture formats with less than four pixels, which was causing problems for the single-channel RasterPolygonOverlay textures.

This PR adds support for it. I did this on my polygon-clipping branch, but didn't want this change to be dependent on it.

kring commented 9 months ago

👍 I'll merge this one after #404.