Skip to content

Commit 0c98b0f

Browse files
author
devsh
committed
having a mesh manipulator (only to provide normal quantization cache) was a bad idea, if we want to optimize vertex formats, lets optimize all and after loading
1 parent 514d04d commit 0c98b0f

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

include/nbl/asset/interchange/IAssetLoader.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class NBL_API2 IAssetLoader : public virtual core::IReferenceCounted
107107
decryptionKey(rhs.decryptionKey),
108108
cacheFlags(rhs.cacheFlags),
109109
loaderFlags(rhs.loaderFlags),
110-
meshManipulatorOverride(rhs.meshManipulatorOverride),
111110
logger(rhs.logger),
112111
workingDirectory(rhs.workingDirectory)
113112
{
@@ -117,7 +116,6 @@ class NBL_API2 IAssetLoader : public virtual core::IReferenceCounted
117116
const uint8_t* decryptionKey;
118117
E_CACHING_FLAGS cacheFlags;
119118
E_LOADER_PARAMETER_FLAGS loaderFlags; //!< Flags having an impact on extraordinary tasks during loading process
120-
CPolygonGeometryManipulator* meshManipulatorOverride = nullptr; //!< pointer used for specifying custom mesh manipulator to use, if nullptr - default mesh manipulator will be used
121119
std::filesystem::path workingDirectory = "";
122120
system::logger_opt_ptr logger;
123121
};

src/nbl/asset/interchange/CSTLMeshFileLoader.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#ifdef _NBL_COMPILE_WITH_STL_LOADER_
99

1010
#include "nbl/asset/asset.h"
11-
#include "nbl/asset/utils/CQuantNormalCache.h"
1211

1312
#include "nbl/asset/IAssetManager.h"
1413

@@ -137,13 +136,6 @@ SAssetBundle CSTLMeshFileLoader::loadAsset(system::IFile* _file, const IAssetLoa
137136
_override
138137
};
139138

140-
if (_params.meshManipulatorOverride == nullptr)
141-
{
142-
_NBL_DEBUG_BREAK_IF(true);
143-
assert(false);
144-
}
145-
146-
CQuantNormalCache* const quantNormalCache = _params.meshManipulatorOverride->getQuantNormalCache();
147139

148140
const size_t filesize = context.inner.mainFile->getSize();
149141
if (filesize < 6ull) // we need a header
@@ -276,8 +268,6 @@ SAssetBundle CSTLMeshFileLoader::loadAsset(system::IFile* _file, const IAssetLoa
276268
const size_t vtxSize = hasColor ? (3 * sizeof(float) + 4 + 4) : (3 * sizeof(float) + 4);
277269
auto vertexBuf = asset::ICPUBuffer::create({ vtxSize * positions.size() });
278270

279-
using quant_normal_t = CQuantNormalCache::value_type_t<EF_A2B10G10R10_SNORM_PACK32>;
280-
281271
quant_normal_t normal;
282272
for (size_t i = 0u; i < positions.size(); ++i)
283273
{

0 commit comments

Comments
 (0)