浏览代码

Merge branch 'master' into ssao-test

/Branch_Batching2
sebastienlagarde 8 年前
当前提交
13e14f67
共有 58 个文件被更改,包括 152 次插入127 次删除
  1. 2
      Assets/GraphicsTests/Framework/Editor/TestFramework.cs
  2. 2
      Assets/GraphicsTests/Framework/Editor/TestFrameworkCustomBuild.cs
  3. 8
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/SimpleCube.unity
  4. 7
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderReflection.unity
  5. 10
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderMaps.unity
  6. 2
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes.unity
  7. 2
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitBakedEmission.unity
  8. 2
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Camera/LDPipe_Camera_TargetTexture.unity
  9. 7
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Camera/LDPipe_Camera_Ortho.unity
  10. 7
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Camera/LDPipe_Camera_Clip.unity
  11. 6
      Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowAlgorithms.hlsl
  12. 33
      Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs
  13. 2
      Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset
  14. 14
      Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
  15. 4
      Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc
  16. 16
      Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
  17. 6
      Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesMultiply.shader
  18. 6
      Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesAdd.shader
  19. 12
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineUpgraders.cs
  20. 4
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineMaterialEditor.cs
  21. 6
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs
  22. 10
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLightweightPipelineUpgrader.cs
  23. 2
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/UpgradeCommon.cs
  24. 9
      Assets/GraphicsTests/RenderPipeline/LightweightPipeline.meta
  25. 9
      Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset.meta
  26. 32
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLightweightMaterialUpgrader.cs
  27. 9
      Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline.meta
  28. 9
      Assets/ScriptableRenderPipeline/LightweightPipeline/TestScenes/LDRenderPipelineBasicScene/LightingData.asset.meta
  29. 32
      Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLowEndMaterialUpgrader.cs
  30. 9
      Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipelineAsset.asset.meta
  31. 0
      /Assets/GraphicsTests/RenderPipeline/LightweightPipeline
  32. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline
  33. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs.meta
  34. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs
  35. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset
  36. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs.meta
  37. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
  38. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineShadows.cginc.meta
  39. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineShadows.cginc
  40. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc.meta
  41. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc
  42. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader.meta
  43. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
  44. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesMultiply.shader.meta
  45. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesMultiply.shader
  46. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesAdd.shader.meta
  47. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesAdd.shader
  48. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLightweightMaterialUpgrader.cs.meta
  49. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineUpgraders.cs.meta
  50. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineUpgraders.cs
  51. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineMaterialEditor.cs.meta
  52. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineMaterialEditor.cs
  53. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs.meta
  54. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs
  55. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLightweightPipelineUpgrader.cs.meta
  56. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLightweightPipelineUpgrader.cs
  57. 0
      /Assets/ScriptableRenderPipeline/LightweightPipeline.meta
  58. 0
      /ImageTemplates/LightweightPipeline

2
Assets/GraphicsTests/Framework/Editor/TestFramework.cs


private static readonly string[] s_PipelinePath =
{
"LowEndMobilePipeline",
"LightweightPipeline",
"HDRenderPipeline",
};

2
Assets/GraphicsTests/Framework/Editor/TestFrameworkCustomBuild.cs


{
public class TestFrameworkCustomBuild
{
private static readonly string s_TestSceneFolder = "/GraphicsTests/RenderPipeline/LowEndMobilePipeline/Scenes";
private static readonly string s_TestSceneFolder = "/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes";
private static readonly string s_BuildFolder = "/TestScenesBuild";
[MenuItem("RenderPipeline/TestFramework/Build-iOS")]

8
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/SimpleCube.unity


m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.18022086, g: 0.2256495, b: 0.30683416, a: 1}
m_IndirectSpecularColor: {r: 0.18028377, g: 0.22571409, b: 0.30692285, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0

manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &380492249
GameObject:

m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
hdr: 0
width: 1280
height: 720
--- !u!1 &707831285

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

7
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderReflection.unity


manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &167879083
GameObject:

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

10
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderMaps.unity


manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &35430816
GameObject:

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

2
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitShaderLightProbes.unity


m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

2
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Shaders/LDPipe_LitBakedEmission.unity


m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

2
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Camera/LDPipe_Camera_TargetTexture.unity


m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

7
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Camera/LDPipe_Camera_Ortho.unity


manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &418390279
GameObject:

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

7
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Camera/LDPipe_Camera_Clip.unity


manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &418390279
GameObject:

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1

m_Script: {fileID: 11500000, guid: c20dfc007a9a74ad8a2bfd0d59abe398, type: 3}
m_Name:
m_EditorClassIdentifier:
renderPipeline: {fileID: 11400000, guid: 877878ed40e8ad94095582ff91179016, type: 2}
renderPipeline: {fileID: 11400000, guid: e6987eea1dd29074597d54ed91a54a26, type: 2}
cameraToUse: {fileID: 971756574}
hdr: 0
width: 1280

6
Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowAlgorithms.hlsl


dirShadowSplitSphereSqRadii.z = dirShadowSplitSpheres[2].w;
dirShadowSplitSphereSqRadii.w = dirShadowSplitSpheres[3].w;
if( distances2.w > dirShadowSplitSphereSqRadii.w )
return -1;
return int( 4.0 - dot( weights, float4(4.0, 3.0, 2.0, 1.0 ) ) );
int idx = int( 4.0 - dot( weights, float4( 4.0, 3.0, 2.0, 1.0 ) ) );
return idx <= 3 ? idx : -1;
}
uint EvalShadow_LoadSplitSpheres( ShadowContext shadowContext, int index, out float4 splitSpheres[4] )

33
Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs


namespace UnityEngine.Experimental.Rendering.LowendMobile
namespace UnityEngine.Experimental.Rendering.LightweightPipeline
{
public enum ShadowCascades
{

_2048 = 2048
}
public class LowEndMobilePipelineAsset : RenderPipelineAsset
public class LightweightPipelineAsset : RenderPipelineAsset
#region AssetAndPipelineCreation
private static readonly string m_PipelineFolder = "Assets/ScriptableRenderPipeline/LightweightPipeline";
private static readonly string m_AssetName = "LightweightPipelineAsset.asset";
[UnityEditor.MenuItem("RenderPipeline/LowEndMobilePipeline/Create Pipeline Asset")]
static void CreateLowEndPipeline()
[UnityEditor.MenuItem("RenderPipeline/LightweightPipeline/Create Pipeline Asset")]
static void CreateLightweightPipeline()
var instance = ScriptableObject.CreateInstance<LowEndMobilePipelineAsset>();
UnityEditor.AssetDatabase.CreateAsset(instance,
"Assets/LowEndMobilePipeline/LowEndMobilePipelineAsset.asset");
}
var instance = ScriptableObject.CreateInstance<LightweightPipelineAsset>();
string[] paths = m_PipelineFolder.Split('/');
string currentPath = paths[0];
for (int i = 1; i < paths.Length; ++i)
{
string folder = currentPath + "/" + paths[i];
if (!UnityEditor.AssetDatabase.IsValidFolder(folder))
UnityEditor.AssetDatabase.CreateFolder(currentPath, paths[i]);
currentPath = folder;
}
UnityEditor.AssetDatabase.CreateAsset(instance, m_PipelineFolder + "/" + m_AssetName);
}
return new LowEndMobilePipeline(this);
return new LightweightPipeline(this);
#endregion
#region PipelineAssetSettings

2
Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset


m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: LowEndMobilePipelineAsset
m_Name: LightweightPipelineAsset
m_EditorClassIdentifier:
m_MaxPixelLights: 1
m_SupportsVertexLight: 1

14
Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


using System.Collections.Generic;
using UnityEngine.Rendering;
namespace UnityEngine.Experimental.Rendering.LowendMobile
namespace UnityEngine.Experimental.Rendering.LightweightPipeline
{
[Serializable]
public class ShadowSettings

public int shadowResolution;
}
public class LowEndMobilePipeline : RenderPipeline, IComparer<VisibleLight>
public class LightweightPipeline : RenderPipeline, IComparer<VisibleLight>
private readonly LowEndMobilePipelineAsset m_Asset;
private readonly LightweightPipelineAsset m_Asset;
private static readonly int kMaxCascades = 4;
private static readonly int kMaxLights = 8;

private int m_DepthBufferBits = 24;
private Vector4[] m_DirectionalShadowSplitDistances = new Vector4[kMaxCascades];
private static readonly ShaderPassName m_ForwardBasePassName = new ShaderPassName("LowEndMobileForward");
private static readonly ShaderPassName m_ForwardBasePassName = new ShaderPassName("LightweightForward");
private Vector4[] m_LightPositions = new Vector4[kMaxLights];
private Vector4[] m_LightColors = new Vector4[kMaxLights];

private ShadowSettings m_ShadowSettings = ShadowSettings.Default;
private ShadowSliceData[] m_ShadowSlices = new ShadowSliceData[kMaxCascades];
public LowEndMobilePipeline(LowEndMobilePipelineAsset asset)
public LightweightPipeline(LightweightPipelineAsset asset)
{
m_Asset = asset;

public override void Render(ScriptableRenderContext context, Camera[] cameras)
{
var prevPipe = Shader.globalRenderPipeline;
Shader.globalRenderPipeline = "LowEndMobilePipeline";
Shader.globalRenderPipeline = "LightweightPipeline";
base.Render(context, cameras);
foreach (Camera camera in cameras)

}
else
{
Debug.LogWarning("Only spot and directional shadow casters are supported in lowend mobile pipeline");
Debug.LogWarning("Only spot and directional shadow casters are supported in lightweight pipeline");
return false;
}

4
Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc


half4 spotDir;
};
struct LowendVertexInput
struct LightweightVertexInput
{
float4 vertex : POSITION;
float3 normal : NORMAL;

half4 _ReflectColor;
#ifdef _SHADOWS
#include "LowEndMobilePipelineShadows.cginc"
#include "LightweightPipelineShadows.cginc"
#endif
inline void NormalMap(v2f i, out half3 normal)

16
Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader


// Shader targeted for LowEnd mobile devices. Single Pass Forward Rendering. Shader Model 2
Shader "ScriptableRenderPipeline/LowEndMobile/NonPBR"
// Shader targeted for low end devices. Single Pass Forward Rendering. Shader Model 2
Shader "ScriptableRenderPipeline/LightweightPipeline/NonPBR"
{
// Keep properties of StandardSpecular shader for upgrade reasons.
Properties

SubShader
{
Tags { "RenderType" = "Opaque" "RenderPipeline" = "LowEndMobilePipeline" }
Tags { "RenderType" = "Opaque" "RenderPipeline" = "LightweightPipeline" }
Tags { "LightMode" = "LowEndMobileForward" }
Tags { "LightMode" = "LightweightForward" }
// Use same blending / depth states as Standard shader
Blend[_SrcBlend][_DstBlend]

#include "UnityStandardBRDF.cginc"
#include "UnityStandardInput.cginc"
#include "UnityStandardUtils.cginc"
#include "LowEndMobilePipelineCore.cginc"
#include "LightweightPipelineCore.cginc"
v2f vert(LowendVertexInput v)
v2f vert(LightweightVertexInput v)
{
v2f o = (v2f)0;

#pragma shader_feature EDITOR_VISUALIZATION
#include "UnityStandardMeta.cginc"
#include "LowEndMobilePipelineCore.cginc"
#include "LightweightPipelineCore.cginc"
fixed4 frag_meta_ld(v2f_meta i) : SV_Target
{

}
}
Fallback "Standard (Specular setup)"
CustomEditor "LowendMobilePipelineMaterialEditor"
CustomEditor "LightweightPipelineMaterialEditor"
}

6
Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesMultiply.shader


Shader "ScriptableRenderPipeline/LowEndMobile/Particles/Multiply"
Shader "ScriptableRenderPipeline/LightweightPipeline/Particles/Multiply"
{
Properties
{

Category
{
Tags{"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "RenderPipeline" = "LowendMobile" "PreviewType" = "Plane"}
Tags{"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "RenderPipeline" = "LightweightPipeline" "PreviewType" = "Plane"}
Blend Zero SrcColor
Cull Off Lighting Off ZWrite Off

{
Tags { "LightMode" = "LowEndMobileForward" }
Tags { "LightMode" = "LightweightForward" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag

6
Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesAdd.shader


Shader "ScriptableRenderPipeline/LowEndMobile/Particles/Additive"
Shader "ScriptableRenderPipeline/LightweightPipeline/Particles/Additive"
{
Properties
{

Category
{
Tags{"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "RenderPipeline" = "LowEndPipeline" "PreviewType" = "Plane"}
Tags{"Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "RenderPipeline" = "LightweightPipeline" "PreviewType" = "Plane"}
Blend SrcAlpha One
Cull Off Lighting Off ZWrite Off

{
Tags{"LightMode" = "LowEndMobileForward"}
Tags{"LightMode" = "LightweightForward"}
CGPROGRAM
#pragma vertex vert
#pragma fragment frag

12
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineUpgraders.cs


using UnityEngine;
using UnityEngine.Rendering;
namespace UnityEditor.Experimental.Rendering.LowendMobile
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
{
public static class SupportedUpgradeParams
{

{
public LegacyBlinnPhongUpgrader(string oldShaderName, UpgradeParams upgradeParams)
{
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile/NonPBR", UpdateMaterialKeywords);
RenameShader(oldShaderName, "ScriptableRenderPipeline/LightweightPipeline/NonPBR", UpdateMaterialKeywords);
SetFloat("_Mode", (float)upgradeParams.blendMode);
SetFloat("_SpecSource", (float)upgradeParams.specularSource);
SetFloat("_GlossinessSource", (float)upgradeParams.glosinessSource);

{
public ParticlesMultiplyUpgrader(string oldShaderName)
{
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile/Particles/Multiply");
RenameShader(oldShaderName, "ScriptableRenderPipeline/LightweightPipeline/Particles/Multiply");
}
}

{
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile/Particles/Additive");
RenameShader(oldShaderName, "ScriptableRenderPipeline/LightweightPipeline/Particles/Additive");
}
}

{
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile/NonPBR");
RenameShader(oldShaderName, "ScriptableRenderPipeline/LightweightPipeline/NonPBR");
}
}

{
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile/NonPBR");
RenameShader(oldShaderName, "ScriptableRenderPipeline/LightweightPipeline/NonPBR");
SetFloat("_Shininess", 1.0f);
}
}

4
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineMaterialEditor.cs


using UnityEditor;
using UnityEngine;
using UnityEngine.Rendering;
using UnityEditor.Experimental.Rendering.LowendMobile;
using UnityEditor.Experimental.Rendering.LightweightPipeline;
public class LowendMobilePipelineMaterialEditor : ShaderGUI
public class LightweightPipelineMaterialEditor : ShaderGUI
{
private const float kMinShininessValue = 0.01f;
private MaterialProperty blendModeProp = null;

6
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs


using UnityEditor;
namespace UnityEngine.Experimental.Rendering.LowendMobile
namespace UnityEngine.Experimental.Rendering.LightweightPipeline
[CustomEditor(typeof(LowEndMobilePipelineAsset))]
public class LowendPipelineAssetInspector : Editor
[CustomEditor(typeof(LightweightPipelineAsset))]
public class LightweightAssetInspector : Editor
{
internal class Styles
{

10
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLightweightPipelineUpgrader.cs


using System.Collections.Generic;
namespace UnityEditor.Experimental.Rendering.LowendMobile
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
public class LegacyShadersToLowEndUpgrader
public class LegacyShadersToLightweightPipelineUpgrader
[MenuItem("RenderPipeline/LowEndMobilePipeline/Material Upgraders/Upgrade Legacy Materials to LowEndMobile - Project", false, 3)]
[MenuItem("RenderPipeline/LightweightPipeline/Material Upgraders/Upgrade Legacy Materials to LightweightPipeline - Project", false, 3)]
public static void UpgradeMaterialsToLDProject()
{
List<MaterialUpgrader> materialUpgraders = new List<MaterialUpgrader>();

}
[MenuItem("RenderPipeline/LowEndMobilePipeline/Material Upgraders/Upgrade Legacy Materials to LowEndMobile - Selection", false, 4)]
[MenuItem("RenderPipeline/LightweightPipeline/Material Upgraders/Upgrade Legacy Materials to LightweightPipeline - Selection", false, 4)]
MaterialUpgrader.UpgradeSelection(materialUpgraders, "Upgrade to LD Materials");
MaterialUpgrader.UpgradeSelection(materialUpgraders, "Upgrade to Lightweight Materials");
}
private static void GetUpgraders(ref List<MaterialUpgrader> materialUpgraders)

2
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/UpgradeCommon.cs


namespace UnityEditor.Experimental.Rendering.LowendMobile
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
{
public enum UpgradeBlendMode
{

9
Assets/GraphicsTests/RenderPipeline/LightweightPipeline.meta


fileFormatVersion: 2
guid: 5eed0f1819197f04c9071c09acc86e96
folderAsset: yes
timeCreated: 1496228959
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset.meta


fileFormatVersion: 2
guid: e6987eea1dd29074597d54ed91a54a26
timeCreated: 1489068733
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

32
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLightweightMaterialUpgrader.cs


using System.Collections.Generic;
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
{
public class StandardToLightweightMaterialUpgrader
{
[MenuItem("RenderPipeline/LightweightPipeline/Material Upgraders/Upgrade Standard Materials to Lightweight Mobile - Project Folder", false, 1)]
private static void UpgradeMaterialsToLDProject()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();
GetUpgraders(ref upgraders);
MaterialUpgrader.UpgradeProjectFolder(upgraders, "Upgrade to LD Materials");
}
[MenuItem("RenderPipeline/LightweightPipeline/Material Upgraders/Upgrade Standard Materials to Lightweight Mobile - Selection", false, 2)]
private static void UpgradeMaterialsToLDSelection()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();
GetUpgraders(ref upgraders);
MaterialUpgrader.UpgradeSelection(upgraders, "Upgrade to LD Materials");
}
private static void GetUpgraders(ref List<MaterialUpgrader> upgraders)
{
upgraders.Add(new StandardUpgrader("Standard (Specular setup)"));
upgraders.Add(new StandardUpgrader("Standard"));
upgraders.Add(new TerrainUpgrader("TerrainSurface"));
}
}
}

9
Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline.meta


fileFormatVersion: 2
guid: 6cc80706fb944a2499efc62666d48a2b
folderAsset: yes
timeCreated: 1495206216
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/ScriptableRenderPipeline/LightweightPipeline/TestScenes/LDRenderPipelineBasicScene/LightingData.asset.meta


fileFormatVersion: 2
guid: 740b181ab47c46a47ae28377711d7097
timeCreated: 1488962999
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 25800000
userData:
assetBundleName:
assetBundleVariant:

32
Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLowEndMaterialUpgrader.cs


using System.Collections.Generic;
namespace UnityEditor.Experimental.Rendering.LowendMobile
{
public class StandardToLowEndMaterialUpgrader
{
[MenuItem("RenderPipeline/LowEndMobilePipeline/Material Upgraders/Upgrade Standard Materials to Low End Mobile - Project Folder", false, 1)]
private static void UpgradeMaterialsToLDProject()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();
GetUpgraders(ref upgraders);
MaterialUpgrader.UpgradeProjectFolder(upgraders, "Upgrade to LD Materials");
}
[MenuItem("RenderPipeline/LowEndMobilePipeline/Material Upgraders/Upgrade Standard Materials to Low End Mobile - Selection", false, 2)]
private static void UpgradeMaterialsToLDSelection()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();
GetUpgraders(ref upgraders);
MaterialUpgrader.UpgradeSelection(upgraders, "Upgrade to LD Materials");
}
private static void GetUpgraders(ref List<MaterialUpgrader> upgraders)
{
upgraders.Add(new StandardUpgrader("Standard (Specular setup)"));
upgraders.Add(new StandardUpgrader("Standard"));
upgraders.Add(new TerrainUpgrader("TerrainSurface"));
}
}
}

9
Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipelineAsset.asset.meta


fileFormatVersion: 2
guid: 877878ed40e8ad94095582ff91179016
timeCreated: 1489068733
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

/Assets/GraphicsTests/RenderPipeline/LowEndMobilePipeline → /Assets/GraphicsTests/RenderPipeline/LightweightPipeline

/Assets/ScriptableRenderPipeline/LowEndMobilePipeline → /Assets/ScriptableRenderPipeline/LightweightPipeline

/Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipelineAsset.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipelineAsset.cs → /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs

/Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipelineAsset.asset → /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset

/Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipeline.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/LowEndMobilePipeline.cs → /Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndMobilePipelineShadows.cginc.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineShadows.cginc.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndMobilePipelineShadows.cginc → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineShadows.cginc

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndMobilePipelineCore.cginc.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndMobilePipelineCore.cginc → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndMobilePipeline.shader.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndMobilePipeline.shader → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndParticlesMultiply.shader.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesMultiply.shader.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndParticlesMultiply.shader → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesMultiply.shader

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndParticlesAdd.shader.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesAdd.shader.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LowEndParticlesAdd.shader → /Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightParticlesAdd.shader

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLowEndMaterialUpgrader.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/StandardToLightweightMaterialUpgrader.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LowendUpgraders.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineUpgraders.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LowendUpgraders.cs → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineUpgraders.cs

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LowendMobilePipelineMaterialEditor.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineMaterialEditor.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LowendMobilePipelineMaterialEditor.cs → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightPipelineMaterialEditor.cs

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LowendPipelineAssetInspector.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LowendPipelineAssetInspector.cs → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLowEndUpgrader.cs.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLightweightPipelineUpgrader.cs.meta

/Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLowEndUpgrader.cs → /Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LegacyShadersToLightweightPipelineUpgrader.cs

/Assets/ScriptableRenderPipeline/LowEndMobilePipeline.meta → /Assets/ScriptableRenderPipeline/LightweightPipeline.meta

/ImageTemplates/LowEndMobilePipeline → /ImageTemplates/LightweightPipeline

正在加载...
取消
保存