mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Parsing validation for mesh UV when NULL
This commit is contained in:
@@ -163,9 +163,16 @@ namespace Nuake
|
||||
for (auto& v : j["Vertices"])
|
||||
{
|
||||
Vertex vertex;
|
||||
|
||||
try {
|
||||
DESERIALIZE_VEC2(v["UV"], vertex.uv)
|
||||
}
|
||||
catch(std::exception& e) {
|
||||
vertex.uv = { 0.0, 0.0 };
|
||||
}
|
||||
DESERIALIZE_VEC3(v["Position"], vertex.position)
|
||||
DESERIALIZE_VEC3(v["Normal"], vertex.normal)
|
||||
DESERIALIZE_VEC2(v["UV"], vertex.uv)
|
||||
|
||||
DESERIALIZE_VEC3(v["Tangent"], vertex.tangent)
|
||||
DESERIALIZE_VEC3(v["Bitangent"], vertex.bitangent)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user