|
|
|
|
|
|
// TODO: Handle BC5 format, currently this code is for DXT5nm - After the change, rename this function UnpackNormalmapRGorAG |
|
|
|
// This version is use for the base normal map |
|
|
|
#define ADD_NORMAL_FUNC_SUFFIX(Name) Name |
|
|
|
#if defined(UNITY_NO_DXT5nm) |
|
|
|
#define UNPACK_NORMAL_FUNC UnpackNormalRGB |
|
|
|
#define UNPACK_DERIVATIVE_FUNC UnpackDerivativeNormalRGB |
|
|
|
#else |
|
|
|
#endif |
|
|
|
#include "SampleUVMappingNormalInternal.hlsl" |
|
|
|
#undef ADD_NORMAL_FUNC_SUFFIX |
|
|
|
#undef UNPACK_NORMAL_FUNC |
|
|
|
|
|
|
#define ADD_NORMAL_FUNC_SUFFIX(Name) Name##AG |
|
|
|
#if defined(UNITY_NO_DXT5nm) |
|
|
|
#define UNPACK_NORMAL_FUNC UnpackNormalRGB |
|
|
|
#define UNPACK_DERIVATIVE_FUNC UnpackDerivativeNormalRGB |
|
|
|
#else |
|
|
|
#endif |
|
|
|
#include "SampleUVMappingNormalInternal.hlsl" |
|
|
|
#undef ADD_NORMAL_FUNC_SUFFIX |
|
|
|
#undef UNPACK_NORMAL_FUNC |
|
|
|