noa icon indicating copy to clipboard operation
noa copied to clipboard

custom renderMaterial performance (for animated textures)

Open MCArth opened this issue 3 years ago • 2 comments

Hi, I was thinking about adding some blocks with animated textures into my game, but I'm a bit worried about the performance if large swathes of blocks are this type - e.g. water

I notice you comment "this can impact performance" next to the renderMaterial property (I imagine it's one face per exposed block face as it can't be greedy meshed).

Have you experienced any big performance issues using renderMaterial/to what extent?

Thanks :)

MCArth avatar Dec 07 '22 11:12 MCArth

Hey, great question... I'm not actively using render materials right now, but I believe they are currently meshed and displayed just like all other terrain - so I'm not aware of any performance impact. I'm not sure if there used to be, or why exactly I wrote that in the docs. 🤔

With that said, since terrain is merged there could be issues with stretching, like a material displaying the wrong way across merged voxel faces. Plain old textures should work okay, but I haven't tested anything else (procedural textures, for example). Would be interested to hear how it goes for you!

fenomas avatar Dec 07 '22 15:12 fenomas

Ahh I see, that's cool. I guess it would be an extra draw call per chunk with the blocktype but that's not awful

Will give it a go (might be a bit since I went without for the block I was considering using it for) but will definitely let you know

MCArth avatar Dec 07 '22 17:12 MCArth