#pragma once #include #include #include "../SmallNormal.h" #include "BaseQuantizer.h" // Super simple quantizer: takes the original value, sets some bits to zero so that only the given number of bits remain class NormalQuantizer : public BaseQuantizer, public QuickQuantizer { public: NormalQuantizer(unsigned8 bits); std::map* QuantizeMaterials(std::vector materials) const override; std::string GetQuantizerDescriptor() const override; SmallNormal Quantize(const SmallNormal& normal) const override; private: // if the number of bits is smaller than or equal to this number, all possible quantization values will be added. static const unsigned8 QUANTIZE_ALL_UP_TO = 14; unsigned8 mBits; unsigned32 mChannelMask; };