浏览代码

Make the thickness scale affect the thickness map

/Branch_Batching2
Evgenii Golubev 8 年前
当前提交
ddd2e38b
共有 1 个文件被更改,包括 5 次插入6 次删除
  1. 11
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl

11
Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl


surfaceData.specular = 0.04;
surfaceData.subsurfaceProfile = _SubsurfaceProfile;
surfaceData.subsurfaceRadius = _SubsurfaceRadius;
surfaceData.thickness = _Thickness;
surfaceData.subsurfaceRadius = SAMPLE_UVMAPPING_TEXTURE2D(_SubsurfaceRadiusMap, sampler_SubsurfaceRadiusMap, layerTexCoord.base).r * _SubsurfaceRadius;
#else
surfaceData.subsurfaceRadius = _SubsurfaceRadius;
surfaceData.subsurfaceRadius *= SAMPLE_UVMAPPING_TEXTURE2D(_SubsurfaceRadiusMap, sampler_SubsurfaceRadiusMap, layerTexCoord.base).r;
surfaceData.thickness = SAMPLE_UVMAPPING_TEXTURE2D(_ThicknessMap, sampler_ThicknessMap, layerTexCoord.base).r;
#else
surfaceData.thickness = _Thickness;
surfaceData.thickness *= SAMPLE_UVMAPPING_TEXTURE2D(_ThicknessMap, sampler_ThicknessMap, layerTexCoord.base).r;
#endif
surfaceData.coatNormalWS = float3(1.0, 0.0, 0.0);

正在加载...
取消
保存