浏览代码

Use the Lit shader variant stripper for terrain shaders.

/main
Yao Xiaoling 6 年前
当前提交
a740bb25
共有 3 个文件被更改,包括 4 次插入2 次删除
  1. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Lit/LitShaderPreprocessor.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLit.shader
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLit_Basemap_Gen.shader

2
com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Lit/LitShaderPreprocessor.cs


stripperFuncs.Add("HDRenderPipeline/LitTessellation", LitShaderStripper);
stripperFuncs.Add("HDRenderPipeline/LayeredLit", LitShaderStripper);
stripperFuncs.Add("HDRenderPipeline/LayeredLitTessellation", LitShaderStripper);
stripperFuncs.Add("HDRenderPipeline/TerrainLit", LitShaderStripper);
stripperFuncs.Add("Hidden/HDRenderPipeline/TerrainLit_Basemap", LitShaderStripper);
}
}
}

2
com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLit.shader


#pragma only_renderers d3d11 ps4 xboxone vulkan metal
#pragma shader_feature _TERRAIN_8_LAYERS
#pragma shader_feature _ _TERRAIN_BLEND_HEIGHT
#pragma shader_feature _TERRAIN_BLEND_HEIGHT
#pragma shader_feature _NORMALMAP
#pragma shader_feature _MASKMAP
// Sample normal in pixel shader when doing instancing

2
com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLit_Basemap_Gen.shader


#include "../Material.hlsl"
#pragma shader_feature _TERRAIN_8_LAYERS
#pragma shader_feature _TERRAIN_BLEND_HEIGHT
#pragma shader_feature _ _TERRAIN_BLEND_HEIGHT
#ifdef _MASKMAP
// Needed because unity tries to match the name of the used textures to samplers. Masks can be used without splats in Metallic pass.

正在加载...
取消
保存