projectcs

Members
  • Content count

    2
  • Joined

  • Last visited

  1. Thank you @Deltakosh, you solved my problem but explained it wrong. It's actually not because I was using a different material than the original mesh, but rather I did not know that in order to render transformed mesh instance with custom shader: 1. You need to use #include<instanceDeclaration> and #include<instanceVertex> in the custom shader. 2. You need to use ”viewprojection” and ”finalworld” instead of ”worldviewprojection” in the custom shader. However the above variables are not documented in the custom shader session. Wondering if there is any more hidden variables that we need to know when working with custom shader? Anyway thanks a lot for your solution!
  2. I was unable to transform mesh instance if the original mesh had a shader material. Is this a bug? I have created a playground example using box mesh. If you open the debug -> mesh panel, you realize there are 6 meshes, but only 5 are displayed. This is because one of the instances in the second row was not transformed properly. On the other hand, clones of meshes with shader material can be transformed properly. https://playground.babylonjs.com/#B2NZ1M#1