浏览代码

Remove vertex wind animation.

/main
Yao Xiaoling 7 年前
当前提交
9a2fed6e
共有 3 个文件被更改,包括 10 次插入19 次删除
  1. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/LayeredLit/TerrainUI.cs
  2. 17
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/BaseLitUI.cs
  3. 9
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/Terrain.shader

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/LayeredLit/TerrainUI.cs


{
BaseMaterialPropertiesGUI();
EditorGUILayout.Space();
VertexAnimationPropertiesGUI();
EditorGUILayout.Space();
}
if (EditorGUI.EndChangeCheck())
{

17
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Material/Lit/BaseLitUI.cs


tessellationBackFaceCullEpsilon = FindProperty(kTessellationBackFaceCullEpsilon, props, false);
// Wind
windEnable = FindProperty(kWindEnabled, props);
windInitialBend = FindProperty(kWindInitialBend, props);
windStiffness = FindProperty(kWindStiffness, props);
windDrag = FindProperty(kWindDrag, props);
windShiverDrag = FindProperty(kWindShiverDrag, props);
windShiverDirectionality = FindProperty(kWindShiverDirectionality, props);
windEnable = FindProperty(kWindEnabled, props, false);
windInitialBend = FindProperty(kWindInitialBend, props, false);
windStiffness = FindProperty(kWindStiffness, props, false);
windDrag = FindProperty(kWindDrag, props, false);
windShiverDrag = FindProperty(kWindShiverDrag, props, false);
windShiverDirectionality = FindProperty(kWindShiverDirectionality, props, false);
// Decal
supportDBuffer = FindProperty(kSupportDBuffer, props);

protected override void VertexAnimationPropertiesGUI()
{
if (windEnable == null)
return;
EditorGUILayout.LabelField(StylesBaseLit.vertexAnimation, EditorStyles.boldLabel);
EditorGUI.indentLevel++;

CoreUtils.SetKeyword(material, "_PIXEL_DISPLACEMENT_LOCK_OBJECT_SCALE", displacementLockObjectScale && enablePixelDisplacement);
CoreUtils.SetKeyword(material, "_DISPLACEMENT_LOCK_TILING_SCALE", displacementLockTilingScale && enableDisplacement);
bool windEnabled = material.GetFloat(kWindEnabled) > 0.0f;
bool windEnabled = material.HasProperty(kWindEnabled) && material.GetFloat(kWindEnabled) > 0.0f;
CoreUtils.SetKeyword(material, "_VERTEX_WIND", windEnabled);
// Depth offset is only enabled if per pixel displacement is

9
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/LayeredLit/Terrain.shader


_TexWorldScaleEmissive("Scale to apply on world coordinate", Float) = 1.0
[HideInInspector] _UVMappingMaskEmissive("_UVMappingMaskEmissive", Color) = (1, 0, 0, 0)
// Wind
[ToggleUI] _EnableWind("Enable Wind", Float) = 0.0
_InitialBend("Initial Bend", float) = 1.0
_Stiffness("Stiffness", float) = 1.0
_Drag("Drag", float) = 1.0
_ShiverDrag("Shiver Drag", float) = 0.2
_ShiverDirectionality("Shiver Directionality", Range(0.0, 1.0)) = 0.5
// Caution: C# code in BaseLitUI.cs call LightmapEmissionFlagsProperty() which assume that there is an existing "_EmissionColor"
// value that exist to identify if the GI emission need to be enabled.
// In our case we don't use such a mechanism but need to keep the code quiet. We declare the value and always enable it.

//-------------------------------------------------------------------------------------
#include "CoreRP/ShaderLibrary/Common.hlsl"
#include "CoreRP/ShaderLibrary/Wind.hlsl"
#include "../../ShaderPass/FragInputs.hlsl"
#include "../../ShaderPass/ShaderPass.cs.hlsl"

正在加载...
取消
保存