Are texture coordinates required by meshes?

I’m looking to write an importer for a niche, legacy 3D graphics file format. It has some unusual graphics primitives, for which it seems that my best approach is to define some new custom mesh types to represent them.

It’s clear how I can do this. :smiling_face:

However, there is never going to be any texture mapping taking place with any of these primitives.

So, my question is, do I need to enter texture coordinates in the mesh’s buffers, or can I get by without doing that? In other words, will the meshes render OK if there is no texture coordinate buffer?

(Adding the additional vertices and texture coordinates is definitely possible, but it seems like a lot of overhead if it’s never going to be used.)

I am like 99.99% sure you do not need to add any vertex data you do not need

2 Likes

If your shapes do not have textures then you do not need texture coordinates.

But it’s a somewhat vague question because it ultimately depends on what the shader will be doing. A custom shader can use texture coordinates for whatever it wants.

Since you are asking the question, I’m going to guess that you are just using the standard shaders. And they won’t even look at the texture coordinates if you don’t have a texture.

2 Likes

Thanks, guys! Things certainly look OK without any texture coords. :smiling_face:

2 Likes