Missed serialization texture sampler name fixed. According to the glTF 2.0 specification it exists, the internal tinygltf structure contains 'name' field as well.
diff --git a/tiny_gltf.h b/tiny_gltf.h index 2159a17..ead4f2c 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h
@@ -7440,6 +7440,9 @@ } static void SerializeGltfSampler(const Sampler &sampler, json &o) { + if (!sampler.name.empty()) { + SerializeStringProperty("name", sampler.name, o); + } if (sampler.magFilter != -1) { SerializeNumberProperty("magFilter", sampler.magFilter, o); }