diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-05-04 20:50:11 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-05-04 20:50:11 +0000 |
| commit | 56181ded4722f380f6c46524021905df6f55e433 (patch) | |
| tree | 3b75b3b1dcdc4795fd7aa664a0f4ca5f175740e7 /AssetLoader/src/GLTFLoader.cpp | |
| parent | GLTF Loader: fixed couple of issues with animation (diff) | |
| download | DiligentTools-56181ded4722f380f6c46524021905df6f55e433.tar.gz DiligentTools-56181ded4722f380f6c46524021905df6f55e433.zip | |
GLTF loader: setting default normal to (0,0,0) so that the shdare can compute it from ddx/ddy
Diffstat (limited to 'AssetLoader/src/GLTFLoader.cpp')
| -rw-r--r-- | AssetLoader/src/GLTFLoader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AssetLoader/src/GLTFLoader.cpp b/AssetLoader/src/GLTFLoader.cpp index 2c9b81b..c6151f3 100644 --- a/AssetLoader/src/GLTFLoader.cpp +++ b/AssetLoader/src/GLTFLoader.cpp @@ -307,7 +307,7 @@ void Model::LoadNode(IRenderDevice* pDevice, { Vertex vert{}; vert.pos = float4(float3::MakeVector(&bufferPos[v * 3]), 1.0f); - vert.normal = bufferNormals != nullptr ? normalize(float3::MakeVector(&bufferNormals[v * 3])) : float3{0,1,0}; + vert.normal = bufferNormals != nullptr ? normalize(float3::MakeVector(&bufferNormals[v * 3])) : float3{}; vert.uv0 = bufferTexCoordSet0 != nullptr ? float2::MakeVector(&bufferTexCoordSet0[v * 2]) : float2{}; vert.uv1 = bufferTexCoordSet1 != nullptr ? float2::MakeVector(&bufferTexCoordSet1[v * 2]) : float2{}; |
