浏览代码

Decal keywords change.

/main
Yao Xiaoling 6 年前
当前提交
f74fc88a
共有 5 个文件被更改,包括 10 次插入9 次删除
  1. 4
      com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLit.shader
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLitData.hlsl
  3. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLitData_Basemap.hlsl
  4. 4
      com.unity.render-pipelines.high-definition/HDRP/Material/TerrainLit/TerrainLit_Basemap.shader
  5. 7
      com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDTerrainMaterial.mat

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


_MainTex("Albedo", 2D) = "white" {}
_Color("Color", Color) = (1,1,1,1)
[ToggleUI] _SupportDBuffer("Support DBuffer", Float) = 1.0
[ToggleUI] _SupportDecals("Support Decals", Float) = 1.0
}
HLSLINCLUDE

//#pragma shader_feature _ _LAYER_MAPPING_PLANAR2 _LAYER_MAPPING_TRIPLANAR2
//#pragma shader_feature _ _LAYER_MAPPING_PLANAR3 _LAYER_MAPPING_TRIPLANAR3
#pragma shader_feature _DISABLE_DBUFFER
#pragma shader_feature _DISABLE_DECALS
//enable GPU instancing support
#pragma multi_compile_instancing

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


surfaceData.specularOcclusion = 1.0;
#endif
#ifndef _DISABLE_DBUFFER
#if HAVE_DECALS
float alpha = 1;
AddDecalContribution(posInput, surfaceData, alpha);
#endif

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


else
surfaceData.specularOcclusion = 1.0f;
#ifndef _DISABLE_DBUFFER
#if HAVE_DECALS
float alpha = 1;
AddDecalContribution(posInput, surfaceData, alpha);
#endif

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


_MainTex("Albedo", 2D) = "white" {}
_Color("Color", Color) = (1,1,1,1)
[ToggleUI] _SupportDBuffer("Support DBuffer", Float) = 1.0
[ToggleUI] _SupportDecals("Support Decals", Float) = 1.0
}
HLSLINCLUDE

#pragma shader_feature _DISABLE_DBUFFER
#pragma shader_feature _DISABLE_DECALS
#pragma shader_feature _TERRAIN_INSTANCED_PERPIXEL_NORMAL
//enable GPU instancing support

7
com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/DefaultHDTerrainMaterial.mat


serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DefaultHDTerrainMaterial
m_Shader: {fileID: 4800000, guid: eb607f5e8fc16e140b732f33d26c8c31, type: 3}
m_ShaderKeywords: _TERRAIN_INSTANCED_PERPIXEL_NORMAL

m_Offset: {x: 0, y: 0}
m_Floats:
- _CullMode: 2
- _EnableHeightBlend: 0
- _LayerBlendMode: 0
- _SupportDBuffer: 1
- _SupportDecals: 1
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZWrite: 1

正在加载...
取消
保存