浏览代码

added #pragma multicompile to StackLit and some comments

/main
Paul Melamed 7 年前
当前提交
f4e0f28f
共有 4 个文件被更改,包括 25 次插入1 次删除
  1. 1
      com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Decal/DecalUI.cs
  2. 10
      com.unity.render-pipelines.high-definition/HDRP/Material/Decal/Decal.shader
  3. 11
      com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs
  4. 4
      com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.shader

1
com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Decal/DecalUI.cs


}
protected string[] blendSourceNames = Enum.GetNames(typeof(BlendSource));
// relies on the order shader passes are declared in decal.shader
enum BlendMode
{
Metal_AO_Smoothness,

10
com.unity.render-pipelines.high-definition/HDRP/Material/Decal/Decal.shader


{
Tags{ "RenderPipeline" = "HDRenderPipeline"}
// c# code relies on the order in which the passes are declared, any change will need to be reflected in DecalUI.cs
// enum BlendMode
// {
// Metal_AO_Smoothness,
// Metal_Smoothness,
// Metal,
// Smoothness,
// AO
// }
Pass
{
Name "DBufferProjector_MAOS" // Name is not used

11
com.unity.render-pipelines.high-definition/HDRP/Material/Decal/DecalSystem.cs


return;
int batchIndex = 0;
int totalToDraw = m_NumResults;
int shaderPass = instance.perChannelMask ? (int)m_Material.GetFloat("_MaskBlendMode") : 0;
int shaderPass = instance.perChannelMask ? (int)m_Material.GetFloat("_MaskBlendMode") : 0; // relies on the order shader passes are declared in decal.shader and decalUI.cs
// enum BlendMode
// {
// Metal_AO_Smoothness,
// Metal_Smoothness,
// Metal,
// Smoothness,
// AO
// }
for (; batchIndex < m_NumResults / kDrawIndexedBatchSize; batchIndex++)
{
m_PropertyBlock.SetMatrixArray(HDShaderIDs._NormalToWorldID, m_NormalToWorld[batchIndex]);

4
com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.shader


#pragma shader_feature _STACKLIT_DEBUG
// decal 3RT or 4RT toggle
#pragma multi_compile _ _DECALS_PER_CHANNEL_MASK
//enable GPU instancing support
#pragma multi_compile_instancing

正在加载...
取消
保存