How to access custom data of multimesh instance from shader?

weilweil Posts: 8Member
edited June 11 in Shaders

Hey guys, I need your help again.

I want to pass some custom data for my shader. I'm setting this data in the way that's described in the docs:

multimeshes.buildings.mm.multimesh.set_instance_custom_data(
    i,
    data
)

This mesh have material that's my custom shader. I need it to access data. Do I need to setup an uniform with some specific name? Or is there a built-in that allows to access it somehow?

Best Answer

  • weilweil Posts: 8
    Accepted Answer

    Sorry, I just noticed it's mentioned in the docs. There's a builtin called INSTANCE_CUSTOM that's available in vertex.

Answers

  • weilweil Posts: 8Member
    Accepted Answer

    Sorry, I just noticed it's mentioned in the docs. There's a builtin called INSTANCE_CUSTOM that's available in vertex.

  • cyberealitycybereality Posts: 1,049Moderator

    Thanks for following up with the answer.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file