This is the testing Godot forums! All forum posts unique to this forum will be deleted! Please use the main forums here for any posts you want to keep. All forum rules still apply.

How to access custom data of multimesh instance from shader?

weilweil Posts: 6Member
edited June 2020 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: 6
    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: 6Member
    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: 928Moderator

    Thanks for following up with the answer.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.