Skip to content

Commit

Permalink
Fix accessing property table values
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed May 13, 2024
1 parent 2ec6838 commit a19a42f
Showing 1 changed file with 2 additions and 1 deletion.
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 a19a42f

Please sign in to comment.