Skip to content

Commit 3b933ec

Browse files
seungchan-jeongEvergreen
authored andcommitted
Add graphics test for Modern SSAO
1 parent d7fb00d commit 3b933ec

35 files changed

Lines changed: 1649 additions & 8 deletions

Packages/com.unity.render-pipelines.universal/ShaderLibrary/SSAO.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ float3 ReconstructViewPos(float2 uv, float linearDepth)
200200
viewPos *= zScale;
201201
#endif
202202

203-
return half3(viewPos);
203+
return viewPos;
204204
}
205205

206206
// Try reconstructing normal accurately from depth buffer.

Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/CommonAssets/URPAssets/DefaultURPAsset.asset

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
1313
m_Name: DefaultURPAsset
1414
m_EditorClassIdentifier:
15-
k_AssetVersion: 12
16-
k_AssetPreviousVersion: 12
15+
k_AssetVersion: 13
16+
k_AssetPreviousVersion: 13
1717
m_RendererType: 1
1818
m_RendererData: {fileID: 0}
1919
m_RendererDataList:
@@ -30,6 +30,11 @@ MonoBehaviour:
3030
- {fileID: 11400000, guid: 7c7a4f27be43bd847a58021195aeadb0, type: 2}
3131
- {fileID: 11400000, guid: b347de46caf7551439f5930790d3c0f6, type: 2}
3232
- {fileID: 11400000, guid: 2724f69ce5c29884cbddc10513ecb4ab, type: 2}
33+
- {fileID: 11400000, guid: 597b9f1a0b1557c448178217c078d942, type: 2}
34+
- {fileID: 11400000, guid: cd2ef63e3ab2d8040b42e100d9ecd08b, type: 2}
35+
- {fileID: 11400000, guid: 6c7f4485aa22e9c4e984f7c496b248dd, type: 2}
36+
- {fileID: 11400000, guid: 4a3d021c6a1d2474cad4ea4e31dee9ef, type: 2}
37+
- {fileID: 11400000, guid: 74814309f9845fb4cbcf8b25b1708df0, type: 2}
3338
m_DefaultRendererIndex: 0
3439
m_RequireDepthTexture: 1
3540
m_RequireOpaqueTexture: 1
@@ -65,6 +70,7 @@ MonoBehaviour:
6570
m_AdditionalLightsShadowResolutionTierHigh: 512
6671
m_ReflectionProbeBlending: 0
6772
m_ReflectionProbeBoxProjection: 0
73+
m_ReflectionProbeAtlas: 0
6874
m_ShadowDistance: 56
6975
m_ShadowCascadeCount: 4
7076
m_Cascade2Split: 0.25
@@ -85,7 +91,6 @@ MonoBehaviour:
8591
m_MixedLightingSupported: 0
8692
m_SupportsLightCookies: 0
8793
m_SupportsLightLayers: 0
88-
m_DebugLevel: 0
8994
m_StoreActionsOptimization: 0
9095
m_UseAdaptivePerformance: 1
9196
m_ColorGradingMode: 0
@@ -118,6 +123,8 @@ MonoBehaviour:
118123
m_PrefilteringModeForwardPlus: 0
119124
m_PrefilteringModeDeferredRendering: 1
120125
m_PrefilteringModeScreenSpaceOcclusion: 0
126+
m_PrefilteringModeScreenSpaceReflection: 1
127+
m_PrefilterWriteSmoothness: 1
121128
m_PrefilterDebugKeywords: 1
122129
m_PrefilterWriteRenderingLayers: 1
123130
m_PrefilterHDROutput: 1
@@ -139,8 +146,14 @@ MonoBehaviour:
139146
m_PrefilterSoftShadowsQualityHigh: 0
140147
m_PrefilterSoftShadows: 0
141148
m_PrefilterScreenCoord: 0
149+
m_PrefilterScreenSpaceIrradiance: 0
142150
m_PrefilterNativeRenderPass: 1
143151
m_PrefilterUseLegacyLightmaps: 0
152+
m_PrefilterBicubicLightmapSampling: 0
153+
m_PrefilterReflectionProbeRotation: 0
154+
m_PrefilterReflectionProbeBlending: 0
155+
m_PrefilterReflectionProbeBoxProjection: 0
156+
m_PrefilterReflectionProbeAtlas: 0
144157
m_ShaderVariantLogLevel: 0
145158
m_ShadowCascades: 3
146159
m_Textures:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using UnityEngine;
2+
using UnityEngine.Rendering.Universal;
3+
4+
public class ResetAttachedCameraHistory : MonoBehaviour
5+
{
6+
void Start()
7+
{
8+
if (TryGetComponent<UniversalAdditionalCameraData>(out var data))
9+
{
10+
// Reset Temporal-Antialiasing and other postprocess history for consistent test results.
11+
data.resetHistory = true;
12+
}
13+
}
14+
}

Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/150_TAA/150_ResetHistory.cs.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:8f62b4a1adfd9d09a38f3a8ca9570094395f13d27665b5a330b6eda29824c467
3-
size 57768
2+
oid sha256:93f47e6ae76aa1e417e90b8adf8387ed96c22572d378ef3e30ea3b00cb3b80c6
3+
size 59787
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:14cc4fc65cd3db04a1646e0111910682a5749b547d657a65a28b7686061a3be7
3-
size 57768
2+
oid sha256:7fe60bf92dbf788d7626b8eb114f40aacab202d7acbdf81064772d904dfa9968
3+
size 59787

Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/500_SSAO.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"width": 960,
3+
"height": 540,
4+
"ssaoParams": [
5+
2.0,
6+
1.5,
7+
1.0,
8+
100.0
9+
],
10+
"ssaoParams2": [
11+
0.0,
12+
0.0,
13+
0.0,
14+
0.0
15+
],
16+
"aoDepthToViewParams": [
17+
0.0,
18+
0.0,
19+
0.0,
20+
0.0
21+
],
22+
"projectionParams2": [
23+
3.3333332538604738,
24+
0.0,
25+
0.0,
26+
0.0
27+
],
28+
"sourceSize": [
29+
960.0,
30+
540.0,
31+
0.0010416667209938169,
32+
0.0018518518190830947
33+
],
34+
"zBufferParams": [
35+
3332.333251953125,
36+
1.0,
37+
3.3323333263397219,
38+
0.0010001659393310547
39+
],
40+
"depthTexelSize": [
41+
0.0010416667209938169,
42+
0.0018518518190830947,
43+
960.0,
44+
540.0
45+
],
46+
"viewMatrix": [
47+
-1.0, 0.0, 0.0, 0.0,
48+
0.0, 0.9396926, 0.3420201, 0.0,
49+
0.0, -0.3420201, 0.9396927, 0.0,
50+
8.0, -11.95345, -25.63426, 1.0
51+
],
52+
"cameraViewProjection": [
53+
-0.974278569,
54+
0.0,
55+
0.0,
56+
0.0,
57+
0.0,
58+
1.62759531,
59+
-0.342225373,
60+
-0.3420201,
61+
0.0,
62+
-0.5923962,
63+
-0.9402567,
64+
-0.9396927,
65+
7.79422855,
66+
-20.7039833,
67+
25.0494671,
68+
25.63426
69+
],
70+
"cameraViewTopLeftCorner": [
71+
0.3079202,
72+
0.06015352,
73+
-0.341147453,
74+
0.0
75+
],
76+
"cameraViewXExtent": [
77+
-0.6158404,
78+
0.0,
79+
0.0,
80+
0.0
81+
],
82+
"cameraViewYExtent": [
83+
0.0,
84+
-0.325519145,
85+
0.118479267,
86+
0.0
87+
],
88+
"cameraViewZExtent": [
89+
0.0,
90+
-341.922668,
91+
-939.4248,
92+
0.0
93+
],
94+
"blueNoiseParams": [
95+
3.75,
96+
2.109375,
97+
1.0,
98+
1.0
99+
],
100+
"keywords": [
101+
"_BLUE_NOISE",
102+
"_SAMPLE_COUNT_HIGH",
103+
"_SOURCE_DEPTH_NORMALS"
104+
],
105+
"aoMode": "Legacy",
106+
"aoMethod": "BlueNoise",
107+
"sampleCount": "High",
108+
"depthSource": "DepthNormals",
109+
"normalQuality": "High",
110+
"blurQuality": "High",
111+
"downsample": false,
112+
"intensity": 2.0,
113+
"radius": 1.0,
114+
"falloff": 100.0,
115+
"isComputeShader": false,
116+
"directionCount": 0,
117+
"stepCount": 0
118+
}

Tests/SRPTests/Projects/UniversalGraphicsTest_PostPro/Assets/Scenes/500_SSAO/Legacy_BN_High.json.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"width": 960,
3+
"height": 540,
4+
"ssaoParams": [
5+
2.0,
6+
1.5,
7+
0.5,
8+
100.0
9+
],
10+
"ssaoParams2": [
11+
0.0,
12+
0.0,
13+
0.0,
14+
0.0
15+
],
16+
"aoDepthToViewParams": [
17+
0.0,
18+
0.0,
19+
0.0,
20+
0.0
21+
],
22+
"projectionParams2": [
23+
3.3333332538604738,
24+
0.0,
25+
0.0,
26+
0.0
27+
],
28+
"sourceSize": [
29+
960.0,
30+
540.0,
31+
0.0010416667209938169,
32+
0.0018518518190830947
33+
],
34+
"zBufferParams": [
35+
3332.333251953125,
36+
1.0,
37+
3.3323333263397219,
38+
0.0010001659393310547
39+
],
40+
"depthTexelSize": [
41+
0.0010416667209938169,
42+
0.0018518518190830947,
43+
960.0,
44+
540.0
45+
],
46+
"viewMatrix": [
47+
-1.0, 0.0, 0.0, 0.0,
48+
0.0, 0.9396926, 0.3420201, 0.0,
49+
0.0, -0.3420201, 0.9396927, 0.0,
50+
8.0, -11.95345, -25.63426, 1.0
51+
],
52+
"cameraViewProjection": [
53+
-0.974278569,
54+
0.0,
55+
0.0,
56+
0.0,
57+
0.0,
58+
1.62759531,
59+
-0.342225373,
60+
-0.3420201,
61+
0.0,
62+
-0.5923962,
63+
-0.9402567,
64+
-0.9396927,
65+
7.79422855,
66+
-20.7039833,
67+
25.0494671,
68+
25.63426
69+
],
70+
"cameraViewTopLeftCorner": [
71+
0.3079202,
72+
0.06015352,
73+
-0.341147453,
74+
0.0
75+
],
76+
"cameraViewXExtent": [
77+
-0.6158404,
78+
0.0,
79+
0.0,
80+
0.0
81+
],
82+
"cameraViewYExtent": [
83+
0.0,
84+
-0.325519145,
85+
0.118479267,
86+
0.0
87+
],
88+
"cameraViewZExtent": [
89+
0.0,
90+
-341.922668,
91+
-939.4248,
92+
0.0
93+
],
94+
"blueNoiseParams": [
95+
3.75,
96+
2.109375,
97+
1.0,
98+
1.0
99+
],
100+
"keywords": [
101+
"_BLUE_NOISE",
102+
"_SAMPLE_COUNT_MEDIUM",
103+
"_SOURCE_DEPTH_NORMALS"
104+
],
105+
"aoMode": "Legacy",
106+
"aoMethod": "BlueNoise",
107+
"sampleCount": "Medium",
108+
"depthSource": "DepthNormals",
109+
"normalQuality": "Medium",
110+
"blurQuality": "Medium",
111+
"downsample": true,
112+
"intensity": 2.0,
113+
"radius": 1.0,
114+
"falloff": 100.0,
115+
"isComputeShader": false,
116+
"directionCount": 0,
117+
"stepCount": 0
118+
}

0 commit comments

Comments
 (0)