Hello there,
I am looking for a way to update a PBRCustomMaterial in real time using Vertex_Before_PositionUpdated.
If you take a look at the playground below and switch the if statement to true, you’ll notice nothing seems to happen to the material after the 1 second delay.
I suspect the vertex shader needs recompiling but I didn’t succeed in finding a solution. Hence why I am requesting your help to better understand my issue and hopefully solve this problem.
Thanks for your help and time !
im not sure why you are updating UV from materials
you can scale your texture “uScale” to get what you want
updated PG
but if you want to do it with material
i think PBRCustomMaterial is not recompiled ( I do not found any thing to do so)
but i think you can do that with material plugins
here is material plugin version
1 Like
Hi @morteza_norabadi,
I need to manage the UVs on a per instance basis. Using uScale on a texture is therefore not an option. Sadly, it looks like material plugins won’t cater to my needs for the same reason.
if PBRCustomMaterials don’t recompile, i’ll have to investigate recreating the material from scratch or maybe handling things differently on my side.
Thank you very much for your input.
Hello @Lecornflake
Instead of editing the shader code, you could set it from the beginning, and only change the ground.instancedBuffers
:
Is it what you are looking for ?
1 Like
Hi ! I forgot to respond but I found another solution to my issue, which is too specific to my project to share here.
I didn’t know this trick, though. Thanks for sharing it !