浏览代码

fix(hlsl): Add else condition (#129)

/main
GitHub 4 年前
当前提交
1945e33b
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 14
      UOP1_Project/Assets/Shaders/CustomHLSL/CustomLighting.hlsl

14
UOP1_Project/Assets/Shaders/CustomHLSL/CustomLighting.hlsl


#if !defined(_MAIN_LIGHT_SHADOWS) || defined(_RECEIVE_SHADOWS_OFF)
ShadowAtten = 1.0h;
#endif
ShadowSamplingData shadowSamplingData = GetMainLightShadowSamplingData();
float shadowStrength = GetMainLightShadowStrength();
ShadowAtten = SampleShadowmap(shadowCoord, TEXTURE2D_ARGS(_MainLightShadowmapTexture,
sampler_MainLightShadowmapTexture),
shadowSamplingData, shadowStrength, false);
#else
ShadowSamplingData shadowSamplingData = GetMainLightShadowSamplingData();
float shadowStrength = GetMainLightShadowStrength();
ShadowAtten = SampleShadowmap(shadowCoord, TEXTURE2D_ARGS(_MainLightShadowmapTexture,
sampler_MainLightShadowmapTexture),
shadowSamplingData, shadowStrength, false);
#endif
#endif
}

正在加载...
取消
保存