浏览代码

Fix static compilation issues.

/main
Stephane Laroche 7 年前
当前提交
031ca429
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 14
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLit.hlsl

14
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/StackLit/StackLit.hlsl


#ifdef _MATERIAL_FEATURE_COAT
# define COAT_NB_LOBES 1
# define COAT_LOBE_IDX 0
# define BASE_LOBEA_IDX (COAT_LOBE_IDX+1)
# define BASE_LOBEB_IDX (BASE_LOBEA_IDX+1)
# define COAT_LOBE_IDX (-1)
# define COAT_LOBE_IDX 0
# define BASE_LOBEA_IDX 0
# define BASE_LOBEB_IDX (BASE_LOBEA_IDX+1)
#define BASE_LOBEA_IDX (COAT_LOBE_IDX+1)
#define BASE_LOBEB_IDX (BASE_LOBEA_IDX+1)
#define TOTAL_NB_LOBES (BASE_NB_LOBES+COAT_NB_LOBES)
//#define TOTAL_NB_LOBES (BASE_NB_LOBES+COAT_NB_LOBES)
#define TOTAL_NB_LOBES 3 // TODO, for now, this will do (fix compilation errors before static pruning on some platforms)
// TODO CLEANUP and put in proper define above

//
// Use loops and special case with IsVLayeredEnabled(bsdfData) which is statically known.
float3 iblN[TOTAL_NB_LOBES], iblR[TOTAL_NB_LOBES];
float3 iblN[TOTAL_NB_LOBES]; //ZERO_INITIALIZE(float3[TOTAL_NB_LOBES], iblN);
float3 iblR[TOTAL_NB_LOBES]; //ZERO_INITIALIZE(float3[TOTAL_NB_LOBES], iblR);
// We will need hacked N for the stretch anisotropic hack later.
float specularReflectivity[TOTAL_NB_LOBES];
float diffuseFGD[BASE_NB_LOBES];

正在加载...
取消
保存