Add custom attribute to CustomMaterial

Hello,

i am trying to add custom vertex attributes to my CustomMaterial, but only existing attributes are being sent to the vertex shader.
Here is my PG. I’m just copying uv coordinates to uv6 and try to use them in the shader, however they are not sent.

material.getEffect().getAttributesNames() = ["position", "normal", "uv"].

Is there any way how to add them? Or should i use ShaderMaterial and copy StandardMaterials vertex and fragment shaders and modify them?

Thanks
L

Pinging @nasimiasl who is the author of the CustomMaterial

You can’t currently do it, but this PR should help:

2 Likes

Looks exactly like what i was looking for :wink:

I have updated my PG.
Works nicely, thanks.

1 Like