~500 one color box static mesh actors, performance

Awesome diagram, though I’ve made some improvements to better describe my scenario. Notice the 26x19 squares take up the entire static mesh’s 638.7x512.3, but they do not take up the entire 2048x2048 texture. Top-left of the squares relative to the textures is not (0,0).

So we map 2048x2048 texture onto static mesh (only the 2048x1643 region). We also map 26x19 squares onto a sub-region of the static mesh…

I made some progress on using the 32x32 texture, but my math is still a bit off, so I think I need to review the details to get the math exactly right in my material. My material takes as input texture coordinates for the 2048x2048 texture, so we need to use those inputs to get the correct texel from the 32x32 texture (which we can blend with the texel we get from the 2048x2048 texture)…

The input to the material is UNORM so UV = (0 to 1, 0 to 1). Actually for my scenario the input is really (0.19775 to 1, 0.19775 to 1) because the 2048x2048 texture is actually 2048x1643 with padding. So basically we need to map from (0.19775 to 1, 0.19775 to 1) to be in the range of (0 to 25, 0 to 18). But actually there’s a slight offset from the top-left so I think it’s really (0.19775 + dx to 1, 0.19775 + dy to 1) mapped to (0 to 25, 0 to 18).

I may need to verify this but my notes say TL Edge 68,54; BR Edge 76,502. That’s pixels I measured in my original texture which was 6387x5123 (which I later resized to 2048x1643) (and I made the static mesh 638.7x512.3). So in terms of the static mesh, edgeRight is 7.6 and edgeBottom is 50.2.