浏览代码

Fixed particles compilation errors

/2018.1
Felipe Lira 6 年前
当前提交
7dc1b91d
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Particles.hlsl

10
ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Particles.hlsl


{
#if defined(_NORMALMAP)
#if BUMP_SCALE_NOT_SUPPORTED
return UnpackNormal(readTexture(_BumpMap, sampler_BumpMap, IN));
return UnpackNormal(readTexture(TEXTURE2D_PARAM(_BumpMap, sampler_BumpMap), IN));
return UnpackNormalScale(readTexture(_BumpMap, sampler_BumpMap, IN), _BumpScale);
return UnpackNormalScale(readTexture(TEXTURE2D_PARAM(_BumpMap, sampler_BumpMap), IN), _BumpScale);
#endif
#else
return half3(0.0h, 0.0h, 1.0h);

half3 Emission(VertexOutputLit IN)
{
#if defined(_EMISSION)
return readTexture(_EmissionMap, sampler_EmissionMap, IN).rgb * _EmissionColor.rgb;
return readTexture(TEXTURE2D_PARAM(_EmissionMap, sampler_EmissionMap), IN).rgb * _EmissionColor.rgb;
#else
return half3(0.0h, 0.0h, 0.0h);
#endif

{
half4 specularGloss = half4(0.0h, 0.0h, 0.0h, 1.0h);
#ifdef _SPECGLOSSMAP
specularGloss = readTexture(_SpecGlossMap, sampler_SpecGlossMap, IN);
specularGloss = readTexture(TEXTURE2D_PARAM(_SpecGlossMap, sampler_SpecGlossMap), IN);
#elif defined(_SPECULAR_COLOR)
specularGloss = _SpecColor;
#endif

half4 albedo = Albedo(IN);
#if defined(_METALLICGLOSSMAP)
half2 metallicGloss = readTexture(_MetallicGlossMap, sampler_MetallicGlossMap, IN).ra * half2(1.0, _Glossiness);
half2 metallicGloss = readTexture(TEXTURE2D_PARAM(_MetallicGlossMap, sampler_MetallicGlossMap), IN).ra * half2(1.0, _Glossiness);
#else
half2 metallicGloss = half2(_Metallic, _Glossiness);
#endif

正在加载...
取消
保存