I’m exploring defold. I haven’t written any code yet. I have a project that requires rendering dynamically-generated textured 2d polygons. How can this be accomplished in defold?
mesh component allows you to create polygon meshes at runtime, you can setup vertices, UVs, normals and vertex colors. For 2d just set the same Z-coord to each vertex. 3D meshes in Defold
When you say 2D polygons, that sounds like a sprite. Do the objects your looking to texture need to be a 3D object, or could they be 2D planes in a 3D world?
It’s a 2d application.
I need a texture to be tiled on a dynamically generated 2d polygon.
As far as I know there is no (easy) way to repeat textures on a sprite, but if you post an image of what you’re looking to do someone might be able to figure out a solution.
I have a “shader” (lol) that does this, but I need to tile the text on say a polygon shaped like the letter “T”. That’s what I need.
The way I am thinking of handling this, is the color key a polygon. But Need to be able to create the polygon dynamically, and then fill the space with the key color to test in the shader.