CesiumGS / cesium-native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature ID textures ignore sampler wrap values

j9liu opened this issue · comments

Although feature ID textures should only use NEAREST filtering, they are allowed to use any wrap mode. However, it was assumed that they must also use CLAMP_TO_EDGE based on misleading CesiumJS code. In reality, the sampler wrap should be accounted for.

This is a rather simple task but due to time restraints I'll leave it on the backburner. It would be similar to how sampler wraps are used in PropertyTexturePropertyView.

  • Move applySamplerWrapS and applySamplerWrapT to separate header and cpp files (for now, they are in PropertyTexturePropertyView
  • Add a _pSampler member variable to FeatureIdTextureView
  • Use _pSampler's wrap mode in get(U, V)'s implementation (look at PropertyTexturePropertyView for reference)
  • Add an error to FeatureIdTextureViewStatus for if the sampler is invalid
  • Add unit tests (can just copy the ones in TestPropertyTexturePropertyView)