CesiumGS / cesium-native

Apache License 2.0
414 stars 210 forks source link

Account for `KHR_texture_transform` in feature ID texture + property texture property views #811

Closed j9liu closed 6 months ago

j9liu commented 7 months ago

Depends on #802 so merge that first.

Closes #801.

This adds a new KhrTextureTransform utility class to parse a KHR_texture_transform extension. If successfully parsed, UVs can be transformed via the applyTransform function.

Both FeatureIDTextureView and PropertyTexturePropertyView will now account for KHR_texture_transform when their respective get functions are called.

j9liu commented 6 months ago

@kring Following your comment, I decided to untangle the texture transform implementation from the texture views. If a client doesn't understand / implement KHR_texture_transform, we should probably respect that. The texture transform associated with the textures can still be retrieved; it's just up to clients to apply the transform themselves.

j9liu commented 6 months ago

@kring Made some changes based on our discussion. Let me know what you think!

kring commented 6 months ago

Looks great, thanks @j9liu!