浏览代码

HDRenderPipeline: Fix issue with detail albedo using float instead of float3

/stochastic_alpha_test
sebastienlagarde 7 年前
当前提交
46cd94e9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl

2
ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl


surfaceData.baseColor = SAMPLE_UVMAPPING_TEXTURE2D(ADD_IDX(_BaseColorMap), ADD_ZERO_IDX(sampler_BaseColorMap), ADD_IDX(layerTexCoord.base)).rgb * ADD_IDX(_BaseColor).rgb;
#ifdef _DETAIL_MAP_IDX
// Use overlay blend mode for detail abledo: (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))
float baseColorOverlay = (detailAlbedo < 0.5) ?
float3 baseColorOverlay = (detailAlbedo < 0.5) ?
surfaceData.baseColor * PositivePow(2.0 * detailAlbedo, ADD_IDX(_DetailAlbedoScale)) :
1.0 - 2.0 * (1.0 - surfaceData.baseColor) * (1.0 - (detailAlbedo * ADD_IDX(_DetailAlbedoScale)));
// Lerp with details mask

正在加载...
取消
保存