Skip to content

Commit 457cf2e

Browse files
author
Théo Penavaire
authored
Reformat HDRP_Tests (#5084)
* Remove HDRP_Tests from .repoconfig * Apply auto fixes * Add name exception for TestProjects
1 parent 56d0353 commit 457cf2e

File tree

39 files changed

+312
-319
lines changed

39 files changed

+312
-319
lines changed

.repoconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ path-ignore=<<EOT
2323
|TestProjects\/HDRP_HybridTests # So remove the test projects one by one as they are progressively being reformatted
2424
|TestProjects\/HDRP_PerformanceTests # New test projects folder will automatically be included in the formatting checks since they aren't in that list
2525
|TestProjects\/HDRP_RuntimeTests
26-
|TestProjects\/HDRP_Tests
2726
|TestProjects\/Shadergraph
2827
|TestProjects\/ShadergraphUniversalStereo
2928
|TestProjects\/SRP_SmokeTest
@@ -48,4 +47,5 @@ path=<<EOT
4847
|^com\.unity\.[^\/]*\/\w+~\/[^&]+$ # allows editor excluded folders, like Documentation~, for core package
4948
|^com\.unity\.[^\/]*\/Packages\/com\.unity\.[^\/]*\/\w+~\/ # as above but for embedded packages
5049
|^com\.unity\.[^\/]*\/[^@]+@\d+x\. # industry standard for icons with differnet resolution
50+
|^TestProjects\/ # allow all names for test files
5151
EOT

TestProjects/HDRP_Tests/Assets/FindMissingDocs/Editor/DocChecker.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ bool showOnOutput
4949

5050
public string undocumentedEntitiesFilePath => outputFolder + "/" + "undocumented_entities.txt";
5151

52-
[MenuItem ("Window/Doc Checker")]
52+
[MenuItem("Window/Doc Checker")]
5353
public new static void Show() => EditorWindow.GetWindow<DocChecker>();
5454

55-
void OnGUI ()
55+
void OnGUI()
5656
{
5757
UpdatePackagesList();
5858

5959
if (IsLoading())
6060
{
6161
EditorGUILayout.LabelField("Loading Packages ...");
62-
return ;
62+
return;
6363
}
6464

6565
if (collection == null)
@@ -207,7 +207,7 @@ void FindMissingDocs()
207207

208208
if (responseFilePath != null)
209209
File.Delete(responseFilePath);
210-
210+
211211
EditorUtility.ClearProgressBar();
212212
Debug.Log("Done !");
213213
}

TestProjects/HDRP_Tests/Assets/FindMissingDocs/Editor/ProcessOutputStreamReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ internal string[] GetOutput()
6464
return lines.ToArray();
6565
}
6666
}
67-
}
67+
}

TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1218_Lit_DiffusionProfiles/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
* One shader graph fabric with transmission referencing a diffusion profile saved inside the shader graph diffusion profile slot
88
* One shader graph stacklit with transmission referencing a diffusion profile saved inside a shader graph diffusion profile node
99
* One shader graph lit with a checkerboard pattern to choose the diffusion profile referencing diffusion profile saved inside two nodes.
10-
* One lit shader without diffusion profile but transmission enabled (it uses the default diffusion profile)
10+
* One lit shader without diffusion profile but transmission enabled (it uses the default diffusion profile)

TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1219_Lit_Light_on_Tesselation/ReflectionProbeToTexture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ReflectionProbeToTexture : MonoBehaviour
99
[SerializeField] private ReflectionProbe targetProbe = null;
1010
[SerializeField] private bool correctGamma = false;
1111
[SerializeField] private bool boxLayout = false;
12-
12+
1313
private Material blitMat;
1414
private Texture probeTexture;
1515
private Texture2D texture;
@@ -22,7 +22,7 @@ private void Start()
2222
}
2323

2424
[ContextMenu("Refresh")]
25-
public void Convert ()
25+
public void Convert()
2626
{
2727
if (targetProbe != null)
2828
{
@@ -37,7 +37,7 @@ public void Convert ()
3737

3838
RenderTexture dest = new RenderTexture(texture.width, texture.height, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Default);
3939

40-
while (!targetProbe.IsFinishedRendering(renderID)) { };
40+
while (!targetProbe.IsFinishedRendering(renderID)) {};
4141

4242
probeTexture = targetProbe.texture;
4343

@@ -52,7 +52,7 @@ public void Convert ()
5252

5353
GetComponent<RawImage>().texture = texture;
5454
}
55-
}
55+
}
5656

5757
[ContextMenu("RenderProbe")]
5858
public void RenderProbe()

TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/1x_Materials/1219_Lit_Light_on_Tesselation/TexCubeToTex2D.shader

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
Shader "Hiddent/HDRP/Tests/TexCubeToTex2D"
22
{
3-
Properties
4-
{
5-
_MainTex ("Texture", Cube) = "white" {}
3+
Properties
4+
{
5+
_MainTex ("Texture", Cube) = "white" {}
66
_CorrectGamma ("Correct Gamma", float ) = 0
77
_BoxLayout ("Box Layout", float) = 0
8-
}
9-
SubShader
10-
{
11-
Tags { "RenderType"="Opaque" }
12-
LOD 100
13-
14-
Pass
15-
{
16-
CGPROGRAM
17-
#pragma vertex vert
18-
#pragma fragment frag
19-
20-
#include "UnityCG.cginc"
21-
22-
struct appdata
23-
{
24-
float4 vertex : POSITION;
25-
float2 uv : TEXCOORD0;
26-
};
27-
28-
struct v2f
29-
{
30-
float2 uv : TEXCOORD0;
31-
float4 vertex : SV_POSITION;
32-
};
8+
}
9+
SubShader
10+
{
11+
Tags { "RenderType"="Opaque" }
12+
LOD 100
13+
14+
Pass
15+
{
16+
CGPROGRAM
17+
#pragma vertex vert
18+
#pragma fragment frag
19+
20+
#include "UnityCG.cginc"
21+
22+
struct appdata
23+
{
24+
float4 vertex : POSITION;
25+
float2 uv : TEXCOORD0;
26+
};
27+
28+
struct v2f
29+
{
30+
float2 uv : TEXCOORD0;
31+
float4 vertex : SV_POSITION;
32+
};
3333

3434
samplerCUBE _MainTex;
3535
bool _CorrectGamma;
3636
float _BoxLayout;
37-
38-
v2f vert (appdata v)
39-
{
40-
v2f o;
41-
o.vertex = UnityObjectToClipPos(v.vertex);
37+
38+
v2f vert (appdata v)
39+
{
40+
v2f o;
41+
o.vertex = UnityObjectToClipPos(v.vertex);
4242
o.uv = v.uv;
43-
return o;
44-
}
45-
46-
fixed4 frag (v2f i) : SV_Target
47-
{
43+
return o;
44+
}
45+
46+
fixed4 frag (v2f i) : SV_Target
47+
{
4848
float3 coords = float3(0,0,0);
4949

5050
coords.x = cos( i.uv.x * UNITY_PI * 2 );
@@ -121,14 +121,14 @@ Shader "Hiddent/HDRP/Tests/TexCubeToTex2D"
121121
coords = normalize(coords);
122122
}
123123

124-
col.rgb *= texCUBElod(_MainTex, float4(coords, 0)).rgb;
124+
col.rgb *= texCUBElod(_MainTex, float4(coords, 0)).rgb;
125125

126126
if (_CorrectGamma == 1)
127127
col.rgb = pow(col.rgb, 0.4545454545); // Gamma Correction
128128

129129
return col;
130-
}
131-
ENDCG
132-
}
133-
}
130+
}
131+
ENDCG
132+
}
133+
}
134134
}

TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/2x_Lighting/2004_AnimatedCookie/CookieUpdater.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
[ExecuteInEditMode]
66
public class CookieUpdater : MonoBehaviour
77
{
8-
[SerializeField] Material crtMaterial = null;
8+
[SerializeField] Material crtMaterial = null;
99

10-
[SerializeField] CustomRenderTexture[] customRenderTextures = null;
10+
[SerializeField] CustomRenderTexture[] customRenderTextures = null;
1111

12-
int frames = 0;
12+
int frames = 0;
1313

14-
void Start()
15-
{
16-
frames = 0;
17-
}
14+
void Start()
15+
{
16+
frames = 0;
17+
}
1818

19-
void Update()
20-
{
21-
if (crtMaterial != null)
22-
crtMaterial.SetFloat("_MyTime", frames / 60f);
19+
void Update()
20+
{
21+
if (crtMaterial != null)
22+
crtMaterial.SetFloat("_MyTime", frames / 60f);
2323

24-
if (customRenderTextures != null)
25-
foreach(CustomRenderTexture crt in customRenderTextures)
26-
if (crt != null)
27-
crt.Update();
24+
if (customRenderTextures != null)
25+
foreach (CustomRenderTexture crt in customRenderTextures)
26+
if (crt != null)
27+
crt.Update();
2828

29-
++frames;
30-
}
29+
++frames;
30+
}
3131
}

0 commit comments

Comments
 (0)