浏览代码

Fix terrain outline by tagging the terrain as opaque (otherwise the output alpha channel from terrain shader is tested and clipped).

/main
Yao Xiaoling 7 年前
当前提交
6e1f5e6c
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/TerrainLit/TerrainLit.shader
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/TerrainLit/TerrainLitSplatCommon.hlsl
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/TerrainLit/TerrainLit_Basemap.shader

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/TerrainLit/TerrainLit.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderPipeline" = "HDRenderPipeline" "RenderType" = "HDLitShader" "SplatCount"="8" }
Tags{ "RenderPipeline" = "HDRenderPipeline" "RenderType" = "Opaque" "SplatCount"="8" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not bethe meta pass.
Pass

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/TerrainLit/TerrainLitSplatCommon.hlsl


{ \
albedo[i] = float4(0, 0, 0, 0); \
normal[i] = float3(0, 0, 0); \
masks[i] = float4(-1, 0, 0, 0); \
masks[i] = float4(-1, 0, 0, 0); \
}
float2 dxuv = ddx(uv);

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/TerrainLit/TerrainLit_Basemap.shader


SubShader
{
// This tags allow to use the shader replacement features
Tags{ "RenderPipeline" = "HDRenderPipeline" "RenderType" = "HDLitShader" }
Tags{ "RenderPipeline" = "HDRenderPipeline" "RenderType" = "Opaque" }
// Caution: The outline selection in the editor use the vertex shader/hull/domain shader of the first pass declare. So it should not bethe meta pass.
Pass

正在加载...
取消
保存