浏览代码

Remove remaining Base Mask code

/main
Anis Benyoub 6 年前
当前提交
e98fd739
共有 1 个文件被更改,包括 0 次插入8 次删除
  1. 8
      com.unity.render-pipelines.high-definition/HDRP/Material/Fabric/FabricData.hlsl

8
com.unity.render-pipelines.high-definition/HDRP/Material/Fabric/FabricData.hlsl


// The base color of the object mixed with the base color texture
surfaceData.baseColor = SAMPLE_TEXTURE2D(_BaseColorMap, sampler_BaseColorMap, uvBase).rgb * _BaseColor.rgb;
#ifdef _DETAIL_MAP
float aoDetailSpeed = saturate(abs(detailAO) * _DetailAOScale);
float3 baseColorOverlay = lerp(sqrt(surfaceData.baseColor), (detailAO < 0.0) ? float3(0.0, 0.0, 0.0) : float3(1.0, 1.0, 1.0), aoDetailSpeed * aoDetailSpeed);
baseColorOverlay *= baseColorOverlay;
surfaceData.baseColor = lerp(surfaceData.baseColor, saturate(baseColorOverlay), detailMask.x);
#endif
// Extract the alpha value (will be useful if we need to trigger the alpha test)
float alpha = SAMPLE_TEXTURE2D(_BaseColorMap, sampler_BaseColorMap, uvBase).a * _BaseColor.a;

float aoOverlay = lerp(surfaceData.ambientOcclusion, (aoDetailSpeed < 0.0) ? 0.0 : 1.0, aoDetailSpeed);
surfaceData.ambientOcclusion = lerp(surfaceData.ambientOcclusion, saturate(aoOverlay), detailMask.x);
#endif
// Propagate the fuzz tint
surfaceData.fuzzTint = _FuzzTint.xyz;

正在加载...
取消
保存