Here is the base idea what I would like to achieve right now in my game scene:
- Load up .glb model (with textures), lets say it is a floor tile of a map in game.
- Instantiate many floor tiles.
- Use vertex colors to create shadows for tiles.
Here is a little playground I stitched together to illustrate the problem more: https://playground.babylonjs.com/#ZRZIIZ#53
Basically I have two main questions:
- How to make the shadows individually and use instancing? Do I have to use a shaders to achieve this? Do the shader attributes work with instances?
- If I need to use shaders, how do I actually add it to my game? I know the deal with node material editor, but do I then have to use node material and add it to the mesh, and to deal with the previous material that Blender has assigned to it? Is there a documentation somewhere about this process?
Would be super helpful to get more insight to this matter Would not want to ditch instances, since they give so many performance gains…