浏览代码

Minor UI changes to reflect docs.

/main
Felipe Lira 7 年前
当前提交
75898953
共有 4 个文件被更改,包括 29 次插入17 次删除
  1. 18
      ScriptableRenderPipeline/LightweightPipeline/Data/LightweightPipelineAsset.cs
  2. 22
      ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetEditor.cs
  3. 4
      ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLightweightMaterialUpgrader.cs
  4. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightUnlit.shader

18
ScriptableRenderPipeline/LightweightPipeline/Data/LightweightPipelineAsset.cs


[SerializeField] private Shader m_BlitShader;
[SerializeField] private Shader m_CopyDepthShader;
#if UNITY_EDITOR
#if UNITY_EDITOR
[UnityEditor.MenuItem("Assets/Create/Render Pipeline/Lightweight/Render Pipeline", priority = CoreUtils.assetCreateMenuPriority1)]
[UnityEditor.MenuItem("Assets/Create/Render Pipeline/Lightweight/Pipeline Asset", priority = CoreUtils.assetCreateMenuPriority1)]
static void CreateLightweightPipeline()
{
var instance = CreateInstance<LightweightPipelineAsset>();

// There's currently an issue that prevents FindAssets from find resources withing the package folder.
if (resourceAsset == null)
{
string path = "Packages/com.unity.render-pipelines.lightweight/Resources/LightweightPipelineResource.asset";
string path = "Packages/com.unity.render-pipelines.lightweight/Data/LightweightPipelineResource.asset";
resourceAsset = UnityEditor.AssetDatabase.LoadAssetAtPath<LightweightPipelineResource>(path);
}

public override Material GetDefaultMaterial()
{
#if UNITY_EDITOR
#else
return null;
#endif
#if UNITY_EDITOR
#else
return null;
#endif
}
public override Material GetDefaultLineMaterial()

public override Material GetDefaultTerrainMaterial()
{
#if UNITY_EDITOR
#else
return null;
#endif
}
public override Material GetDefaultUIMaterial()

22
ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetEditor.cs


public static GUIContent shadowLabel = new GUIContent("Shadows");
public static GUIContent defaults = new GUIContent("Defaults");
public static GUIContent renderScaleLabel = new GUIContent("Render Scale", "Allows game to render at a resolution different than native resolution. UI is always rendered at native resolution.");
public static GUIContent renderScaleLabel = new GUIContent("Render Scale", "Scales the camera render target allowing the game to render at a resolution different than native resolution. UI is always rendered at native resolution. When in VR mode, VR scaling configuration is used instead.");
public static GUIContent maxPixelLightsLabel = new GUIContent("Max Pixel Lights",
public static GUIContent maxPixelLightsLabel = new GUIContent("Pixel Lights",
public static GUIContent enableVertexLightLabel = new GUIContent("Enable Vertex Light",
"If enabled, shades additional lights exceeding maxAdditionalPixelLights per-vertex up to the maximum of 8 lights.");
public static GUIContent enableVertexLightLabel = new GUIContent("Enable Vertex Lighting",
"If enabled shades additional lights exceeding the maximum number of pixel lights per-vertex up to the maximum of 8 lights.");
public static GUIContent requireCameraDepthTexture = new GUIContent("Camera Depth Texture", "If enabled the the pipeline will generate depth texture necessary for some effects like soft particles.");
public static GUIContent requireCameraDepthTexture = new GUIContent("Camera Depth Texture", "If enabled the pipeline will generate camera's depth that can be bound in shaders as _CameraDepthTexture. This is necessary for some effect like Soft Particles.");
"Single directional shadow supported. SOFT_SHADOWS applies shadow filtering.");
"Global shadow settings. Options are NO_SHADOW, HARD_SHADOWS and SOFT_SHADOWS.");
"Offset shadow near plane to account for large triangles being distorted by pancaking");
"Offset shadow near plane to account for large triangles being distorted by pancaking.");
public static GUIContent shadowDistante = new GUIContent("Shadow Distance", "Max shadow drawing distance");
public static GUIContent shadowDistante = new GUIContent("Shadow Distance", "Max shadow rendering distance.");
"Resolution of shadow map texture. If cascades are enabled all cascades will be packed into this texture resolution.");
"Resolution of shadow map texture. If cascades are enabled, cascades will be packed into an atlas and this setting controls the max shadows atlas resolution.");
"Number of cascades for directional shadows");
"Number of cascades used in directional lights shadows");
public static GUIContent shadowCascadeSplit = new GUIContent("Shadow Cascade Split",
"Percentages to split shadow volume");

public static GUIContent defaultTerrainMaterial = new GUIContent("Default Terrain Material",
"Material to use in Terrains");
public static GUIContent msaaContent = new GUIContent("Anti Aliasing (MSAA)", "Controls the global anti aliasing applied to all cameras.");
public static GUIContent msaaContent = new GUIContent("Anti Aliasing (MSAA)", "Controls the global anti aliasing settings.");
}
private int kMaxSupportedPixelLights = 8;

4
ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLightweightMaterialUpgrader.cs


{
public class StandardToLightweightMaterialUpgrader
{
[MenuItem("Edit/Render Pipeline/Upgrade/Lightweight/Upgrade Standard Materials to Lightweight Pipeline (Project)", priority = CoreUtils.editMenuPriority2)]
[MenuItem("Edit/Render Pipeline/Upgrade/Lightweight/Upgrade Project Materials", priority = CoreUtils.editMenuPriority2)]
private static void UpgradeMaterialsToLDProject()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();

}
[MenuItem("Edit/Render Pipeline/Upgrade/Lightweight/Upgrade Standard Materials to Lightweight Pipeline (Selection)", priority = CoreUtils.editMenuPriority2)]
[MenuItem("Edit/Render Pipeline/Upgrade/Lightweight/Upgrade Selected Materials", priority = CoreUtils.editMenuPriority2)]
private static void UpgradeMaterialsToLDSelection()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightUnlit.shader


Shader "LightweightPipeline/Unlit"
Shader "LightweightPipeline/Standard Unlit"
{
Properties
{

正在加载...
取消
保存