浏览代码

HDRenderLoop: LayeredLit Remove BlendMaskMap variant

/main
sebastienlagarde 8 年前
当前提交
c75df233
共有 3 个文件被更改,包括 3 次插入12 次删除
  1. 1
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/Editor/LayeredLitUI.cs
  2. 1
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/LayeredLit.shader
  3. 13
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitData.hlsl

1
Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/Editor/LayeredLitUI.cs


SetKeyword(material, "_HEIGHTMAP", material.GetTexture(kHeightMap + i));
}
SetKeyword(material, "_LAYER_MASK_MAP", material.GetTexture(kLayerMaskMap));
SetKeyword(material, "_LAYER_MASK_VERTEX_COLOR", material.GetFloat(kLayerMaskVertexColor) != 0.0f);
}

1
Assets/ScriptableRenderLoop/HDRenderLoop/Material/LayeredLit/LayeredLit.shader


#pragma shader_feature _EMISSIVE_COLOR_MAP
#pragma shader_feature _HEIGHTMAP
#pragma shader_feature _DETAIL_MAP
#pragma shader_feature _LAYER_MASK_MAP
#pragma shader_feature _LAYER_VERTEX_COLOR
#pragma shader_feature _ _LAYEREDLIT_3_LAYERS _LAYEREDLIT_4_LAYERS

13
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitData.hlsl


float alpha3 = GetSurfaceData3(input, layerTexCoord, surfaceData3);
// Mask Values : Layer 1, 2, 3 are r, g, b
float3 maskValues = float3(0.0, 0.0, 0.0);
#if defined(_LAYER_MASK_MAP)
maskValues = SAMPLE_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, input.texCoord0).rgb;
#endif
float3 maskValues = SAMPLE_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, input.texCoord0).rgb;
maskValues = input.vertexColor.rgb;
#endif
#if defined(_LAYER_MASK_MAP) && defined(_LAYER_MASK_VERTEX_COLOR)
maskValues = input.vertexColor.rgb * SAMPLE_TEXTURE2D(_LayerMaskMap, sampler_LayerMaskMap, input.texCoord0).rgb;
maskValues *= input.vertexColor.rgb;
#endif
float weights[_MAX_LAYER];

GetBuiltinData(input, surfaceData, alpha, builtinData);
}
#endif // #ifndef LAYERED_LIT_SHADER
#endif // #ifndef LAYERED_LIT_SHADER
正在加载...
取消
保存