Closed webgrid closed 4 years ago
SharpGLTF.Geometry.VertexTypes.VertexColor1Texture1.TexCoord
just gives you the UV coordinates within the texture associated to the material used by the mesh primitive.
so if you want to know the color of the pixel of the texture at that coordinate you would need to:
Notice that this is usually done by a vertex/pixel shader in a graphics engine.
Thanks Vicente Penades!
I used MemoryImage to create a bitmap image, I get the color by GetPixel as you suggested, and I replaced the texture material by solid color material.
The result are generated files is reduced by around 80-90% in file size for my models.
Is it possible to get color information from a texture by using "TexCoord" ? (SharpGLTF.Geometry.VertexTypes.VertexColor1Texture1.TexCoord)
Thank you.