The vector was divided by 32768 in VectorLoadSRGBA16N
And do this again outside.
Since this vector is used in normal only, final result is right after normalization.
FORCEINLINE VectorRegister4Float FPackedRGBA16N::GetVectorRegister() const { VectorRegister4Float VectorToUnpack = VectorLoadSRGBA16N((void*)this); VectorToUnpack = VectorMultiply(VectorToUnpack, VectorSetFloat1(1.0f / 32767.0f)); // Return unpacked vector register. return VectorToUnpack; }
// FPU FORCEINLINE VectorRegister4Float VectorLoadSRGBA16N(void* Ptr) { float V[4]; int16* E = (int16*)Ptr; V[0] = float(E[0]) / 32767.0f; V[1] = float(E[1]) / 32767.0f; V[2] = float(E[2]) / 32767.0f; V[3] = float(E[3]) / 32767.0f; return MakeVectorRegisterFloat(V[0], V[1], V[2], V[3]); } // NEON FORCEINLINE VectorRegister4Float VectorLoadSRGBA16N(const void* Ptr) { alignas(16) float V[4]; int16* E = (int16*)Ptr; V[0] = float(E[0]); V[1] = float(E[1]); V[2] = float(E[2]); V[3] = float(E[3]); VectorRegister4Float Vec = VectorLoad(V); VectorRegister4Float Div = vdupq_n_f32(1.0f / 32767.0f); return VectorMultiply(Vec, Div); }
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-151249 in the post.
1 |
Component | UE - Platform - Mobile |
---|---|
Affects Versions | 4.27, 5.0 |
Target Fix | 5.1 |
Created | May 6, 2022 |
---|---|
Resolved | May 10, 2022 |
Updated | Jun 16, 2022 |