Jump to content

Best practice for drawing different text on multiple meshes


devour
 Share

Recommended Posts

Hey Guys, i need a best practice for drawing text on multiple meshes with the same material.

In my first attempt i created a StandardMaterial and DynamicTexture for each mesh and called the drawText method on the DynamicTexture. This works but it reduces the performance. The framerate drops till it become unplayable (browser freezes).

I would be grateful if u have solution for this.

Link to comment
Share on other sites

Hi and welcome @devour

 Have you tried applying the same dynamicTexture to each mesh? 

In this playground different text is written on different rectangles using  SPS system and one large dynamicTexture. It should be extendable to meshes other than rectangles.

https://www.babylonjs-playground.com/#A9K31I#2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...