浏览代码

LayerLit layer mask is now rgb (layer0 is always 100%)

/main
Julien Ignace 8 年前
当前提交
dce07c5d
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 16
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/LitData.hlsl

16
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/LitData.hlsl


return result;
}
void ComputeMaskWeights(float4 inputMasks, out float outWeights[_MAX_LAYER])
void ComputeMaskWeights(float3 inputMasks, out float outWeights[_MAX_LAYER])
masks[0] = inputMasks.r;
masks[1] = inputMasks.g;
masks[2] = inputMasks.b;
masks[3] = inputMasks.a;
masks[0] = 1.0f; // Layer 0 is always full
masks[1] = inputMasks.r;
masks[2] = inputMasks.g;
masks[3] = inputMasks.b;
// calculate weight of each layers
float left = 1.0f;

void GetSurfaceAndBuiltinData(FragInput input, out SurfaceData surfaceData, out BuiltinData builtinData)
{
float4 maskValues = float4(1.0, 0.0, 0.0, 0.0);// input.vertexColor;
// Mask Values : Layer 1, 2, 3 are r, g, b
float3 maskValues = float3(0.0, 0.0, 0.0);// input.vertexColor;
float4 maskMap = SAMPLE_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, input.texCoord0);
maskValues = maskMap;
maskValues = SAMPLE_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, input.texCoord0).rgb;
#endif
float weights[_MAX_LAYER];

正在加载...
取消
保存