Skip to content

Commit

Permalink
Merge pull request #719 from CesiumGS/fix-property-table-access
Browse files Browse the repository at this point in the history
Fix point cloud styling
  • Loading branch information
lilleyse committed May 13, 2024
2 parents 2ec6838 + ea77be0 commit 21b4708
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### v0.21.0 - 2024-06-03

* Fixed point cloud styling.
* Added read-only attribute `ecefToUsdTransform` to `CesiumGeoreferencePrim`. Previously this was stored in `/CesiumSession` which has since been removed.
* Fixed crash when updating globe anchor when georeferencing is disabled.

Expand Down
3 changes: 2 additions & 1 deletion exts/cesium.omniverse/mdl/cesium.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,9 @@ float4 finalize_float4(float4 raw_value, bool has_no_data, float4 no_data, float

int2 get_property_table_pixel_index(int feature_id, uniform texture_2d property_table_texture) {
auto width = tex::width(property_table_texture);
auto height = tex::height(property_table_texture);
auto pixel_x = feature_id % width;
auto pixel_y = feature_id / width;
auto pixel_y = height - 1 - feature_id / width;
return int2(pixel_x, pixel_y);
}

Expand Down

0 comments on commit 21b4708

Please sign in to comment.