浏览代码

Further renaming to keep consistency with documentation.

/vr_sandbox
Felipe Lira 8 年前
当前提交
f48ff264
共有 9 个文件被更改,包括 230 次插入31 次删除
  1. 2
      Assets/LowEndMobilePipeline/Editor/LegacyMobileToLowendMobileUpgrader.cs
  2. 4
      Assets/LowEndMobilePipeline/Editor/StandardToLowEndMaterialUpgrader.cs
  3. 2
      Assets/LowEndMobilePipeline/LowEndMobilePipeline.cs
  4. 2
      Assets/LowEndMobilePipeline/LowEndMobilePipeline.shader
  5. 4
      Assets/LowEndMobilePipeline/LowEndMobilePipelineAsset.asset
  6. 232
      Assets/LowEndMobilePipeline/TestScenes/LDRenderPipelineBasicScene.unity
  7. 3
      Assets/LowEndMobilePipeline/TestScenes/Materials/LDRenderPipeMaterials/LDSpecularSphere0.mat
  8. 2
      Assets/LowEndMobilePipeline/TestScenes/Materials/LDRenderPipeMaterials/MobileColors.mat
  9. 10
      Assets/LowEndMobilePipeline/TestScenes/Materials/LDRenderPipeMaterials/MobilePlane.mat

2
Assets/LowEndMobilePipeline/Editor/LegacyMobileToLowendMobileUpgrader.cs


LegacyMobileToLowendMobileUpgrader(string oldShaderName)
{
RenameShader(oldShaderName, "LowEndMobilePipeline/Specular");
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile");
RenameFloat("_Shininess", "_Glossiness");
}
}

4
Assets/LowEndMobilePipeline/Editor/StandardToLowEndMaterialUpgrader.cs


public class StandardToLowEndMaterialUpgrader : MaterialUpgrader
{
[MenuItem("LowEndMobilePipeline/Material Upgraders/Upgrade Standard Materials to LDRenderPipeline")]
[MenuItem("LowEndMobilePipeline/Material Upgraders/Upgrade Standard Materials to Low End Mobile")]
private static void UpgradeMaterialsToLD()
{
List<MaterialUpgrader> upgraders = new List<MaterialUpgrader>();

StandardToLowEndMaterialUpgrader(string oldShaderName)
{
RenameShader(oldShaderName, "LowEndMobilePipeline/Specular");
RenameShader(oldShaderName, "ScriptableRenderPipeline/LowEndMobile");
}
}

2
Assets/LowEndMobilePipeline/LowEndMobilePipeline.cs


int vertexLightCount = (m_Asset.SupportsVertexLight)
? Mathf.Min(lights.Length - pixelLightCount, kMaxLights)
: 0;
int totalLightCount = pixelLightCount + vertexLightCount;
int totalLightCount = Mathf.Min(pixelLightCount + vertexLightCount, kMaxLights);
for (int i = 0; i < totalLightCount; ++i)
{

2
Assets/LowEndMobilePipeline/LowEndMobilePipeline.shader


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

4
Assets/LowEndMobilePipeline/LowEndMobilePipelineAsset.asset


m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: LowEndMobilePipelineAsset
m_EditorClassIdentifier:
m_MaxPixelLights: 1
m_MaxPixelLights: 4
m_ShadowAtlasResolution: 1024
m_ShadowAtlasResolution: 2048
m_ShadowNearPlaneOffset: 2
m_ShadowDistance: 50
m_ShadowBias: 0.05

232
Assets/LowEndMobilePipeline/TestScenes/LDRenderPipelineBasicScene.unity


LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_GIWorkflowMode: 1
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4
m_IsActive: 1
m_IsActive: 0
--- !u!23 &261580743
MeshRenderer:
m_ObjectHideFlags: 0

m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 531853420}
m_LocalRotation: {x: -0.034737714, y: 0.1382549, z: -0.07101164, w: 0.98723674}
m_LocalRotation: {x: 0.27499261, y: 0.15350865, z: -0.024334844, w: 0.9488003}
m_LocalEulerAnglesHint: {x: -2.8060002, y: 16.156, z: -8.627001}
m_LocalEulerAnglesHint: {x: 31.958002, y: 19.121, z: 2.584}
--- !u!1 &541576035
GameObject:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &660517136
Transform:
m_ObjectHideFlags: 0

- {fileID: 525272708}
- {fileID: 73631108}
- {fileID: 648566550}
- {fileID: 1911408598}
- {fileID: 2025477086}
- {fileID: 1449522779}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &1254169578
Transform:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &1366180536
Transform:
m_ObjectHideFlags: 0

m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1447851825}
m_LocalRotation: {x: 0.18362224, y: -0.27254936, z: 0.05307446, w: 0.9429649}
m_LocalPosition: {x: 1.2794738, y: 3.0590448, z: 0.3753147}
m_LocalRotation: {x: 0.16927242, y: -0.1764768, z: 0.030815331, w: 0.9691508}
m_LocalPosition: {x: 2.0080936, y: 4.252656, z: -1.3381472}
--- !u!1 &1449522778
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1449522779}
- component: {fileID: 1449522780}
m_Layer: 0
m_Name: DynamicPointLightRed (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1449522779
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1449522778}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.21, y: 2.2, z: 5.55}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 722899211}
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &1449522780
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1449522778}
m_Enabled: 1
serializedVersion: 8
m_Type: 2
m_Color: {r: 0, g: 1, b: 0.21379304, a: 1}
m_Intensity: 3
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 2
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &1459238217
GameObject:
m_ObjectHideFlags: 0

m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1485985477}
m_LocalRotation: {x: -0.45457986, y: -0.24911958, z: 0.7948072, w: -0.31556}
m_LocalPosition: {x: 0.11000013, y: 1.55, z: 1.63}
m_LocalRotation: {x: -0.33872133, y: -0.39239174, z: 0.63421464, w: -0.5736449}
m_LocalPosition: {x: 0.508, y: 1.31, z: 1.63}
m_LocalEulerAnglesHint: {x: 43.071003, y: -50.710003, z: 202.125}
m_LocalEulerAnglesHint: {x: 62.416004, y: 2.5430002, z: 265.799}
--- !u!1 &1499111012
GameObject:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!4 &1659249726
Transform:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!108 &1677622457
Light:
m_ObjectHideFlags: 0

m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1714697412}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalRotation: {x: -0.31310043, y: -0, z: -0, w: 0.94972}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: -36.492, y: 0, z: 0}
--- !u!1 &1749252039
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 1592048727}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1911408597
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1911408598}
- component: {fileID: 1911408599}
m_Layer: 0
m_Name: DynamicPointLightBlue (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1911408598
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1911408597}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4.21, y: 2.2, z: 3.35}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 722899211}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &1911408599
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1911408597}
m_Enabled: 1
serializedVersion: 8
m_Type: 2
m_Color: {r: 0, g: 0.08965492, b: 1, a: 1}
m_Intensity: 3
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 2
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &2025477085
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2025477086}
- component: {fileID: 2025477087}
m_Layer: 0
m_Name: DynamicPointLightRed (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2025477086
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2025477085}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.21, y: 2.2, z: 3.35}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 722899211}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &2025477087
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2025477085}
m_Enabled: 1
serializedVersion: 8
m_Type: 2
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_Intensity: 3
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 2
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &2031315345
GameObject:
m_ObjectHideFlags: 0

m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4
m_IsActive: 1
m_IsActive: 0
--- !u!23 &2031315346
MeshRenderer:
m_ObjectHideFlags: 0

3
Assets/LowEndMobilePipeline/TestScenes/Materials/LDRenderPipeMaterials/LDSpecularSphere0.mat


m_PrefabInternal: {fileID: 0}
m_Name: LDSpecularSphere0
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_ShaderKeywords: _SPECULAR_COLOR
m_ShaderKeywords: _GLOSSINESS_FROM_BASE_ALPHA _SPECULAR_COLOR
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1

- _DstBlend: 0
- _GlossMapScale: 0.186
- _Glossiness: 1
- _GlossinessSource: 0
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0

2
Assets/LowEndMobilePipeline/TestScenes/Materials/LDRenderPipeMaterials/MobileColors.mat


- _SmoothnessTextureChannel: 0
- _SpecSource: 0
- _SpecularHighlights: 1
- _SpecularStrength: 200
- _SpecularStrength: 240
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1

10
Assets/LowEndMobilePipeline/TestScenes/Materials/LDRenderPipeMaterials/MobilePlane.mat


m_PrefabInternal: {fileID: 0}
m_Name: MobilePlane
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3}
m_ShaderKeywords: _EMISSION _GLOSSINESS_FROM_BASE_ALPHA _NORMALMAP _SPECULAR_COLOR
m_ShaderKeywords: _EMISSION _GLOSSINESS_FROM_BASE_ALPHA _NORMALMAP _SHARED_SPECULAR_DIFFUSE
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1

- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecSource: 0
- _SpecSource: 1
- _SpecularStrength: 200
- _SpecularStrength: 64.1
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 0.541}
- _SpecColor: {r: 0.5294118, g: 0.5294118, b: 0.5294118, a: 1}
- _SpecColor: {r: 1, g: 1, b: 1, a: 1}
正在加载...
取消
保存