Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom renderMaterial performance (for animated textures) #186

Open
MCArth opened this issue Dec 7, 2022 · 2 comments
Open

custom renderMaterial performance (for animated textures) #186

MCArth opened this issue Dec 7, 2022 · 2 comments

Comments

@MCArth
Copy link
Contributor

MCArth commented Dec 7, 2022

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 :)

@fenomas
Copy link
Owner

fenomas commented Dec 7, 2022

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!

@MCArth
Copy link
Contributor Author

MCArth commented Dec 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants