You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getTextureUV calls atlas.uv(), which requires looping over the entire atlas (roughly linear time in the number of textures). It then uses just one entry, and throws the rest of the data away. The mesher plugin calls this method at the innermost loop of the block model pipeline (it's called for every texture element in a block model, for every block in the scene)
I think some caching here would be very useful.
I'm rendering some maps using a chunk distance of 2-4, 32x32x32 chunks, with a very large set of block models. A hacky caching fix for this issue makes the difference between intolerable slowdowns and mostly-OK levels of performance. I was surprised to find that mesh creation is the slowest part of the pipeline, while the 3D renderer can keep up with camera movements at a very reasonable framerate.
Note to anyone addressing this: uv.slice() is a shallow copy, i.e. getTextureUV actually mutates the data on-demand. Any caching needs to make sure these mutations only happen once.
The text was updated successfully, but these errors were encountered:
getTextureUV
callsatlas.uv()
, which requires looping over the entire atlas (roughly linear time in the number of textures). It then uses just one entry, and throws the rest of the data away. The mesher plugin calls this method at the innermost loop of the block model pipeline (it's called for every texture element in a block model, for every block in the scene)I think some caching here would be very useful.
I'm rendering some maps using a chunk distance of 2-4, 32x32x32 chunks, with a very large set of block models. A hacky caching fix for this issue makes the difference between intolerable slowdowns and mostly-OK levels of performance. I was surprised to find that mesh creation is the slowest part of the pipeline, while the 3D renderer can keep up with camera movements at a very reasonable framerate.
Note to anyone addressing this:
uv.slice()
is a shallow copy, i.e.getTextureUV
actually mutates the data on-demand. Any caching needs to make sure these mutations only happen once.The text was updated successfully, but these errors were encountered: