Branimir Karadžić 10 ani în urmă
părinte
comite
2df65f4e25
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      src/image.cpp

+ 2 - 0
src/image.cpp

@@ -1118,6 +1118,8 @@ namespace bgfx
 	template<int32_t MantissaBits, int32_t ExpBits>
 	void encodeRgbE(float* _dst, const float* _src)
 	{
+		// Reference:
+		// https://www.opengl.org/registry/specs/EXT/texture_shared_exponent.txt
 		const int32_t expMax  = (1<<ExpBits) - 1;
 		const int32_t expBias = (1<<(ExpBits - 1) ) - 1;
 		const float   sharedExpMax = float( (1 << MantissaBits) - 1) / (1 << MantissaBits) * (1 << (expMax-expBias));