浏览代码

Merge pull request #800 from Unity-Technologies/FixFix_TestFrameworkTools

Fix fix test framework tools
/main
GitHub 7 年前
当前提交
10174353
共有 56 个文件被更改,包括 14374 次插入158 次删除
  1. 272
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity.png
  2. 1
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/CornelBox/Cornell Box.fbx.meta
  3. 1
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/Sphere/Sphere.fbx.meta
  4. 186
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity
  5. 9
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/EditorPlayModeTests.asset
  6. 4
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/CommonAssets/Cornell Box.fbx.meta
  7. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/040_UpgradeScene/Models/Environment/Floor.fbx.meta
  8. 14
      Tests/Scripts/Editor/GraphicTests/Framework/EditorPlayModeTests_Editor.cs
  9. 11
      Tests/Scripts/Editor/GraphicTests/Framework/TestFramework.cs
  10. 14
      Tests/Scripts/GraphicTests/Framework/SetupSceneForRenderPipelineTest.cs
  11. 34
      Tests/Scripts/GraphicTests/Framework/TestFrameworkPlayMode.cs
  12. 35
      Tests/Scripts/GraphicTests/Framework/TestFrameworkTools.cs
  13. 24
      Tests/Scripts/GraphicTests/HDRenderPipeline/DebugViewController.cs
  14. 5
      Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs
  15. 2
      Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs.meta
  16. 744
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity.png
  17. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity.png.meta
  18. 465
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity.png
  19. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity.png.meta
  20. 1001
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity.png
  21. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity.png.meta
  22. 902
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity.png
  23. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity.png.meta
  24. 956
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity.png
  25. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity.png.meta
  26. 1001
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity.png
  27. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity.png.meta
  28. 1001
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity.png
  29. 83
      ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity.png.meta
  30. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity
  31. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity.meta
  32. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity
  33. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity.meta
  34. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity
  35. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity.meta
  36. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity
  37. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity.meta
  38. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity
  39. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity.meta
  40. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity
  41. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity.meta
  42. 1001
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity
  43. 7
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity.meta
  44. 14
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/EditorPlayModeTests.asset
  45. 8
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/EditorPlayModeTests.asset.meta
  46. 53
      Tests/Scripts/Editor/GraphicTests/HDRenderPipeline/DebugViewController_Editor.cs
  47. 34
      Tests/Scripts/GraphicTests/HDRenderPipeline/SinRotate.cs
  48. 11
      Tests/Scripts/GraphicTests/HDRenderPipeline/SinRotate.cs.meta
  49. 25
      Tests/Scripts/GraphicTests/HDRenderPipeline/SinScale.cs
  50. 11
      Tests/Scripts/GraphicTests/HDRenderPipeline/SinScale.cs.meta
  51. 27
      Tests/Scripts/GraphicTests/HDRenderPipeline/Sin_ChangeFOV.cs
  52. 11
      Tests/Scripts/GraphicTests/HDRenderPipeline/Sin_ChangeFOV.cs.meta
  53. 8
      Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/0xxx.meta
  54. 9
      Tests/ShaderGeneratorTests.meta
  55. 0
      /Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs
  56. 0
      /Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs.meta

272
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity.png
文件差异内容过多而无法显示
查看文件

1
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/CornelBox/Cornell Box.fbx.meta


2186277476908879420: ImportLogs
2186277476908879422: ImportLogs
2186277476908879424: ImportLogs
2186277476908879426: ImportLogs
externalObjects:
- first:
type: UnityEngine:Material

1
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/CommonAssets/3DObjects/Sphere/Sphere.fbx.meta


2186277476908879422: ImportLogs
2186277476908879424: ImportLogs
2186277476908879426: ImportLogs
2186277476908879428: ImportLogs
externalObjects: {}
materials:
importMaterials: 0

186
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity


m_Script: {fileID: 11500000, guid: c413a5df32c4fec4eb320c4465678193, type: 3}
m_Name:
m_EditorClassIdentifier:
localSpace: 0
fps: 60
--- !u!23 &12769661
MeshRenderer:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &29872219
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 29872223}
- component: {fileID: 29872222}
- component: {fileID: 29872221}
- component: {fileID: 29872220}
m_Layer: 0
m_Name: Rotate
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &29872220
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 29872219}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 14d7896b83927c247821fa13f452106f, type: 3}
m_Name:
m_EditorClassIdentifier:
localSpace: 0
angles: {x: 0, y: 0, z: 90}
frequency: 5
fps: 60
--- !u!23 &29872221
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 29872219}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 2100000, guid: 051804eacb0bc2144a9e96128a428a15, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &29872222
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 29872219}
m_Mesh: {fileID: 4300000, guid: b32e17769a31e9c4c8b3176dcb04dea9, type: 3}
--- !u!4 &29872223
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 29872219}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2.5, y: -3, z: 0}
m_LocalScale: {x: 2, y: 1.9999996, z: 1.9999996}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &176131434
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: c413a5df32c4fec4eb320c4465678193, type: 3}
m_Name:
m_EditorClassIdentifier:
localSpace: 0
fps: 60
--- !u!23 &176131436
MeshRenderer:
m_ObjectHideFlags: 0

m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &764440502
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 764440506}
- component: {fileID: 764440505}
- component: {fileID: 764440504}
- component: {fileID: 764440503}
m_Layer: 0
m_Name: Scale
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &764440503
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 764440502}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 382c9a87993196d4596a688b68b60221, type: 3}
m_Name:
m_EditorClassIdentifier:
min: {x: 1.5, y: 1.5, z: 1.5}
max: {x: 3, y: 3, z: 3}
frequency: 5
fps: 60
--- !u!23 &764440504
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 764440502}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 4294967295
m_Materials:
- {fileID: 2100000, guid: 051804eacb0bc2144a9e96128a428a15, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &764440505
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 764440502}
m_Mesh: {fileID: 4300000, guid: b32e17769a31e9c4c8b3176dcb04dea9, type: 3}
--- !u!4 &764440506
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 764440502}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -7, y: -3, z: 0}
m_LocalScale: {x: 2, y: 1.9999996, z: 1.9999996}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1243403287
GameObject:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: c413a5df32c4fec4eb320c4465678193, type: 3}
m_Name:
m_EditorClassIdentifier:
localSpace: 0
fps: 60
--- !u!23 &1243403289
MeshRenderer:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: a9ad82d3a5300af40a7a6a9927907436, type: 3}
m_Name:
m_EditorClassIdentifier:
settingType: 1
gBuffer: 0
fullScreenDebugMode: 9
--- !u!4 &1962206527
Transform:

- target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 2}
propertyPath: waitForFrames
value: 15
value: 29
objectReference: {fileID: 0}
- target: {fileID: 114733060649624252, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 2}

9
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/EditorPlayModeTests.asset


m_Name: EditorPlayModeTests
m_EditorClassIdentifier:
scenesPath:
- Assets/Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector.unity
- 3xxx_DebugView/3002_ObjectMotionVector.unity
- 3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity
- 3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity
- 3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity
- 3xxx_DebugView/3006_CameraMotionVector_RotateX.unity
- 3xxx_DebugView/3007_CameraMotionVector_RotateY.unity
- 3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity
- 3xxx_DebugView/3009_CameraMotionVector_FOV.unity

4
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/CommonAssets/Cornell Box.fbx.meta


fileFormatVersion: 2
guid: b56f0b54c8a1042f3ae9a8904a576f5d
timeCreated: 1493308431
licenseType: Pro
ModelImporter:
serializedVersion: 22
fileIDToRecycleName:

4300000: Cornell Box
7400000: Take 001
9500000: //RootNode
2186277476908879412: ImportLogs
externalObjects:
- first:
type: UnityEngine:Material

animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/040_UpgradeScene/Models/Environment/Floor.fbx.meta


4300026: SmallPlank
7400000: Take 001
9500000: //RootNode
2186277476908879412: ImportLogs
externalObjects:
- first:
type: UnityEngine:Material

animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5

14
Tests/Scripts/Editor/GraphicTests/Framework/EditorPlayModeTests_Editor.cs


using UnityEngine;
using UnityEditor;
using System;
using System.IO;
[DisallowMultipleComponent]
[CustomEditor(typeof(EditorPlayModeTests))]
class EditorPlayModeTests_Editor : Editor
{

if (newScene != null)
{
string newPath = AssetDatabase.GetAssetPath(newScene);
Debug.Log("New Path : " + newPath);
string listPath = AssetDatabase.GetAssetPath(target);
listPath = listPath.Remove(listPath.Length - 25, 25);
//Debug.Log("List path: " + listPath);
// Get scene path relative to the list file
newPath = newPath.Replace(listPath, "");
//Debug.Log("New Path : " + newPath);
if (newPath.EndsWith("unity"))
{
Debug.Log("Add the scene to the list");

11
Tests/Scripts/Editor/GraphicTests/Framework/TestFramework.cs


yield return null;
}
// Handle play mode and things to do before
if (testSetup.testInPlayMode)
{
//if (!testSetup.invokeAtStart) testSetup.thingToDoBeforeTest.Invoke();
//EditorApplication.isPlaying = true;
}
else
{
testSetup.thingToDoBeforeTest.Invoke();
}
testSetup.thingToDoBeforeTest.Invoke();
// Render the camera
Texture2D captured = TestFrameworkTools.RenderSetupToTexture(testSetup);

14
Tests/Scripts/GraphicTests/Framework/SetupSceneForRenderPipelineTest.cs


public UnityEvent thingToDoBeforeTest;
[Header("Run Play Mode for test")]
public bool testInPlayMode = false;
public bool invokeAtStart = true;
public IEnumerator Start()
{
// Wait for other things to happend, in particular allow for the render pipeline to reset
yield return new WaitForEndOfFrame();
if (invokeAtStart) thingToDoBeforeTest.Invoke();
if (!testInPlayMode) _readyForCapture = true;
Time.captureFramerate = forcedFrameRate;
}
public void Update()
{

34
Tests/Scripts/GraphicTests/Framework/TestFrameworkPlayMode.cs


using System.IO;
using System.Linq;
public class GraphicTestsPlayMode : IPrebuildSetup, IPostBuildCleanup
public class GraphicTestsPlayMode : IPrebuildSetup
{
public virtual string pipelineID { get { return "NoPipeline"; } }

Debug.Log("Setup for the test");
#if UNITY_EDITOR
oldScenes = UnityEditor.EditorBuildSettings.scenes;

#endif
}
[OneTimeTearDown]
//UnityEditor.EditorBuildSettings.scenes = oldScenes;
UnityEditor.EditorBuildSettings.scenes = oldScenes;
//public IEnumerator TestScene([ValueSource(typeof(TestFrameworkTools.CollectScenesPlayMode), "HDRP")]TestFrameworkTools.TestInfo testInfo)
string prjRelativeGraphsPath;
string filePath;
var prjRelativeGraphsPath = TestFrameworkTools.s_Path.Aggregate(TestFrameworkTools.s_RootPath, Path.Combine);
var filePath = Path.Combine(prjRelativeGraphsPath, testInfo.relativePath);
prjRelativeGraphsPath = TestFrameworkTools.s_Path.Aggregate(TestFrameworkTools.s_RootPath, Path.Combine);
filePath = Path.Combine(prjRelativeGraphsPath, testInfo.relativePath);
UnityEngine.SceneManagement.SceneManager.LoadScene( testInfo.relativePath , UnityEngine.SceneManagement.LoadSceneMode.Single);
UnityEngine.SceneManagement.SceneManager.LoadScene( testInfo.sceneListIndex , UnityEngine.SceneManagement.LoadSceneMode.Single);
//Assert.IsNotNull(testSetup, "No SetupSceneForRenderPipelineTest in scene " + testInfo.name);
//Assert.IsNotNull(testSetup.cameraToUse, "No configured camera in <SetupSceneForRenderPipelineTest>");
Time.captureFramerate = testSetup.forcedFrameRate;
// Initialize
testSetup.Setup();

var oldTarget = testSetup.cameraToUse.targetTexture;
testSetup.cameraToUse.targetTexture = tempTarget;
while (!testSetup.IsTestFinished) yield return null;
// Pause
float prevTimeScale = Time.timeScale;
Time.timeScale = 0f;
for (int f = 0; f < testSetup.waitForFrames; ++f) yield return null;
// render the scene

var captured = new Texture2D(tempTarget.width, tempTarget.height, TextureFormat.RGB24, false);
captured.ReadPixels(new Rect(0, 0, testSetup.width, testSetup.height), 0, 0);
RenderTexture.active = oldActive;
//Unpause
Time.timeScale = prevTimeScale;
// Load the template
Texture2D fromDisk = new Texture2D(2, 2);

35
Tests/Scripts/GraphicTests/Framework/TestFrameworkTools.cs


public static Dictionary<string, string> renderPipelineScenesFolder = new Dictionary<string, string>()
{
{ "HDRP", "HDRenderPipeline/Scenes" },
{ "LWRP", "LightweightPipeline" }
{ "LWRP", "LightweightPipeline/Scenes" }
};
// info that gets generated for use

public string relativePath;
public string templatePath;
public int frameWait;
public int sceneListIndex;
public override string ToString()
{

List<string> allPaths_List = new List<string>(allPaths);
allPaths_List.Sort();
// Get the play mode scenes
List<string> playModeScenes = new List<string>();
foreach( TestInfo ti in CollectScenesPlayMode.GetScenesForPipeline( _pipelinePath ) )
{
playModeScenes.Add(ti.templatePath);
}
// construct all the needed test infos
for (int i = 0; i < allPaths_List.Count; ++i)
{

var split = s_Path.Aggregate("", Path.Combine);
split = string.Format("{0}{1}", split, Path.DirectorySeparatorChar);
var splitPaths = p.FullName.Split(new[] { split }, StringSplitOptions.RemoveEmptyEntries);
// Filter out play mode tests from the list
if (playModeScenes.Contains(splitPaths.Last()))
continue;
TestInfo testInfo = new TestInfo()
{

public static IEnumerable GetScenesForPipeline(string _pipelinePath, bool fixtureParam = false)
{
#if UNITY_EDITOR
var absoluteScenesPath = s_Path.Aggregate("Assets", Path.Combine);
string absoluteScenesPath = s_Path.Aggregate(s_RootPath, Path.Combine);
string assetScenesPath = absoluteScenesPath.Replace(Application.dataPath, "");
assetScenesPath = Path.Combine("Assets", assetScenesPath.Remove(0, 1));
var filesPath = Path.Combine(absoluteScenesPath, _pipelinePath);
string filesPath = Path.Combine(assetScenesPath, _pipelinePath);
string listFilePath = Path.Combine(filesPath, "EditorPlayModeTests.asset");

AssetDatabase.CreateAsset(ScriptableObject.CreateInstance<EditorPlayModeTests>(), listFilePath);
AssetDatabase.Refresh();
foreach (string path in listFile.scenesPath)
for ( int i=0 ; i<listFile.scenesPath.Length ; ++i)
var p = new FileInfo(path);
string path = listFile.scenesPath[i];
var p = new FileInfo( Path.Combine(filesPath, path ) );
var split = s_Path.Aggregate("", Path.Combine);
split = string.Format("{0}{1}", split, Path.DirectorySeparatorChar);
var splitPaths = p.FullName.Split(new[] { split }, StringSplitOptions.RemoveEmptyEntries);

name = p.Name,
relativePath = path,
relativePath = p.ToString(),
frameWait = 100
frameWait = 100,
sceneListIndex = i
};
if (fixtureParam)

24
Tests/Scripts/GraphicTests/HDRenderPipeline/DebugViewController.cs


public class DebugViewController : MonoBehaviour
{
[SerializeField] FullScreenDebugMode fullScreenDebugMode = FullScreenDebugMode.None;
public enum SettingType { Material, Rendering }
public SettingType settingType = SettingType.Material;
MaterialDebugSettings materialDebugSettings = new MaterialDebugSettings();
[Header("Material")]
[SerializeField] int gBuffer = 0;
//DebugItemHandlerIntEnum(MaterialDebugSettings.debugViewMaterialGBufferStrings, MaterialDebugSettings.debugViewMaterialGBufferValues)
[Header("Rendering")]
[SerializeField] int fullScreenDebugMode = 0;
hdPipeline.debugDisplaySettings.fullScreenDebugMode = fullScreenDebugMode;
switch ( settingType )
{
case SettingType.Material:
hdPipeline.debugDisplaySettings.SetDebugViewGBuffer(gBuffer);
hdPipeline.debugDisplaySettings.fullScreenDebugMode = FullScreenDebugMode.None;
break;
case SettingType.Rendering:
hdPipeline.debugDisplaySettings.SetDebugViewGBuffer(0);
hdPipeline.debugDisplaySettings.fullScreenDebugMode = (FullScreenDebugMode) fullScreenDebugMode;
break;
}
}
}

5
Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs


public class SinMove : MonoBehaviour
{
[SerializeField] bool localSpace = false;
[SerializeField] float fps = 60;
Vector3 startPosition = Vector3.zero;

// Update is called once per frame
void Update ()
{
transform.position = startPosition + Mathf.Sin(Mathf.PI * Time.time * frequency) * vector;
transform.position = startPosition + Mathf.Sin(Mathf.PI * frequency * Time.frameCount / fps) * (localSpace?transform.TransformDirection(vector):vector);
}
}

2
Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs.meta


fileFormatVersion: 2
guid: c413a5df32c4fec4eb320c4465678193
guid: 9311bd511d7afc04b95779ad6b218383
MonoImporter:
externalObjects: {}
serializedVersion: 2

744
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity.png

之前 之后
宽度: 853  |  高度: 480  |  大小: 137 KiB

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity.png.meta


fileFormatVersion: 2
guid: 196a05a9d25c75c41a5488213c68d68e
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

465
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity.png

之前 之后
宽度: 853  |  高度: 480  |  大小: 135 KiB

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity.png.meta


fileFormatVersion: 2
guid: 711363d4f145852418f72baec6c6b120
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

1001
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity.png
文件差异内容过多而无法显示
查看文件

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity.png.meta


fileFormatVersion: 2
guid: e7ea4bdd6b2d99447b094c1a32dfae02
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

902
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity.png

之前 之后
宽度: 853  |  高度: 480  |  大小: 253 KiB

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity.png.meta


fileFormatVersion: 2
guid: a97bb246a85dc1846bedbd03effb6e31
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

956
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity.png

之前 之后
宽度: 853  |  高度: 480  |  大小: 256 KiB

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity.png.meta


fileFormatVersion: 2
guid: 628c41c6730a1474586fa02455196702
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

1001
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity.png
文件差异内容过多而无法显示
查看文件

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity.png.meta


fileFormatVersion: 2
guid: fcc5dfdf493e3ec47b7e16102e643933
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

1001
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity.png
文件差异内容过多而无法显示
查看文件

83
ImageTemplates/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity.png.meta


fileFormatVersion: 2
guid: ce4af9e4bd53bea4c8e0dcc1ed4d77d0
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 5
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3003_CameraMotionVector_TranslateX.unity.meta


fileFormatVersion: 2
guid: 32624e48cd276b5418513150e7abd682
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3004_CameraMotionVector_TranslateY.unity.meta


fileFormatVersion: 2
guid: b8bed96a3181ffe49b8e54bc9a3c7687
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3005_CameraMotionVector_TranslateZ.unity.meta


fileFormatVersion: 2
guid: 55881ec59ae8d414cb8a77aa120a45ed
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3006_CameraMotionVector_RotateX.unity.meta


fileFormatVersion: 2
guid: 0225322b58c79bb4d87afeb169e0d119
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3007_CameraMotionVector_RotateY.unity.meta


fileFormatVersion: 2
guid: 01e6660110220214782d0ebf364fe7c9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3008_CameraMotionVector_RotateZ.unity.meta


fileFormatVersion: 2
guid: fabc53a9f87e8784580b4e75dc067ca3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity
文件差异内容过多而无法显示
查看文件

7
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3009_CameraMotionVector_FOV.unity.meta


fileFormatVersion: 2
guid: a5fb429214e9b2a4f8b3d258c0585630
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

14
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/EditorPlayModeTests.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0baa057a399734241b8f30441a73b429, type: 3}
m_Name: EditorPlayModeTests
m_EditorClassIdentifier:
scenesPath: []

8
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/EditorPlayModeTests.asset.meta


fileFormatVersion: 2
guid: 538fb100057717544bdaac8705d4a015
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

53
Tests/Scripts/Editor/GraphicTests/HDRenderPipeline/DebugViewController_Editor.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.Rendering.HDPipeline;
using UnityEditor.Experimental.Rendering;
using UnityEditor.Experimental.Rendering.HDPipeline;
[DisallowMultipleComponent]
[CustomEditor(typeof(DebugViewController))]
public class DebugViewController_Editor : Editor
{
SerializedProperty s_settingType;
SerializedProperty s_gBuffer;
SerializedProperty s_fullScreenDebugMode;
public void OnEnable()
{
s_settingType = serializedObject.FindProperty("settingType");
s_gBuffer = serializedObject.FindProperty("gBuffer");
s_fullScreenDebugMode = serializedObject.FindProperty("fullScreenDebugMode");
}
public override void OnInspectorGUI()
{
//base.OnInspectorGUI();
//EditorGUILayout.PropertyField(s_settingType);
int i_settingType = s_settingType.intValue;//= (int) (target as DebugViewController).settingType;
s_settingType.intValue = GUILayout.Toolbar(s_settingType.intValue, new string[] { "Material", "Rendering" });
switch ( (DebugViewController.SettingType) s_settingType.intValue )
{
case DebugViewController.SettingType.Material :
s_gBuffer.intValue = EditorGUILayout.IntPopup(new GUIContent("GBuffer"), s_gBuffer.intValue, MaterialDebugSettings.debugViewMaterialGBufferStrings, MaterialDebugSettings.debugViewMaterialGBufferValues);
break;
case DebugViewController.SettingType.Rendering:
s_fullScreenDebugMode.intValue = EditorGUILayout.IntPopup(new GUIContent("GBuffer"), s_fullScreenDebugMode.intValue, DebugDisplaySettings.renderingFullScreenDebugStrings, DebugDisplaySettings.renderingFullScreenDebugValues);
break;
}
if ( serializedObject.ApplyModifiedProperties() )
{
serializedObject.Update();
(target as DebugViewController).SetDebugView();
}
}
}

34
Tests/Scripts/GraphicTests/HDRenderPipeline/SinRotate.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SinRotate : MonoBehaviour
{
[SerializeField] bool localSpace = false;
[SerializeField] Vector3 angles = new Vector3(45f, 0f, 0f);
[SerializeField] float frequency = 1f;
[SerializeField] float fps = 60;
Vector3 startAngles = Vector3.zero;
// Use this for initialization
void Start()
{
startAngles = transform.eulerAngles;
}
// Update is called once per frame
void Update()
{
if (localSpace)
{
transform.eulerAngles = startAngles;
transform.Rotate(angles * Mathf.Sin(Mathf.PI * frequency * Time.frameCount / fps), Space.Self);
}
else
{
transform.eulerAngles = startAngles + Mathf.Sin(Mathf.PI * frequency * Time.frameCount / fps) * angles;
}
}
}

11
Tests/Scripts/GraphicTests/HDRenderPipeline/SinRotate.cs.meta


fileFormatVersion: 2
guid: 14d7896b83927c247821fa13f452106f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

25
Tests/Scripts/GraphicTests/HDRenderPipeline/SinScale.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SinScale : MonoBehaviour
{
[SerializeField] Vector3 min = new Vector3(1f, 1f, 1f);
[SerializeField] Vector3 max = new Vector3(2f, 2f, 2f);
[SerializeField] float frequency = 1f;
[SerializeField] float fps = 60;
Vector3 startAngles = Vector3.zero;
// Use this for initialization
void Start()
{
startAngles = transform.eulerAngles;
}
// Update is called once per frame
void Update()
{
transform.localScale = Vector3.Lerp(min, max, Mathf.Sin(Mathf.PI * frequency * Time.frameCount / fps) * 0.5f + 0.5f);
}
}

11
Tests/Scripts/GraphicTests/HDRenderPipeline/SinScale.cs.meta


fileFormatVersion: 2
guid: 382c9a87993196d4596a688b68b60221
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

27
Tests/Scripts/GraphicTests/HDRenderPipeline/Sin_ChangeFOV.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Camera))]
public class Sin_ChangeFOV : MonoBehaviour
{
[SerializeField] float min = 45f;
[SerializeField] float max = 90f;
[SerializeField] float frequency = 1f;
[SerializeField] float fps = 60;
new Camera camera;
// Use this for initialization
void Start()
{
camera = GetComponent<Camera>();
}
// Update is called once per frame
void Update()
{
camera.fieldOfView = min + (max - min) * Mathf.Sin(Mathf.PI * frequency * Time.frameCount / fps);
}
}

11
Tests/Scripts/GraphicTests/HDRenderPipeline/Sin_ChangeFOV.cs.meta


fileFormatVersion: 2
guid: b154df1eef1794b4a8de0a7c73131da1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/0xxx.meta


fileFormatVersion: 2
guid: 405d053465ae98342849302f26ddfee0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

9
Tests/ShaderGeneratorTests.meta


fileFormatVersion: 2
guid: 552442937a683d2479830866e050b035
folderAsset: yes
timeCreated: 1474988761
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

/Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector/SinMove.cs → /Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs

/Tests/GraphicsTests/RenderPipeline/HDRenderPipeline/Scenes/3xxx_DebugView/3002_ObjectMotionVector/SinMove.cs.meta → /Tests/Scripts/GraphicTests/HDRenderPipeline/SinMove.cs.meta

正在加载...
取消
保存