Skip to content

Commit b4ecad0

Browse files
Paulm-UnityEvergreen
authored andcommitted
fix test and test images
This PR makes changes to the shader and scene used in the RenderRequest URP Foundation graphics test and updates the corresponding reference images. Jira [https://jira.unity3d.com/browse/UUM-28838] The scene setup and Cubemap reflection sampling shader used for this test were confusing in terms of verifying correct functioning of the RenderRequest feature. In addition the reference images were inconsistent between platforms and some were depicting incorrect results. The cubemap test shader used was not accounting for the y-flip that occurs during render to texture and was rendering it upside down, however the reference image was expecting it to be the correct way up. Originally this issue was incorrectly classified as a regression. I was able to reproduce the upside down rendering of the cubemap test on the very first revision when it landed in Trunk, my conclusion is that the reference image wasn't correctly generated. Summary of changes: Change the test meshes to be quads rather than spheres. This makes it easier to visualize and debug the resulting render texture result of RenderRequest. Sphere: ![image](https://media.github.cds.internal.unity3d.com/user/760/files/7ef4749d-c1de-451a-9da6-a6218c69ec7d) Quad: ![image](https://media.github.cds.internal.unity3d.com/user/760/files/85414873-c683-49d8-aaa6-392b6d198054) Change the shader graph cubemap sample node from reflected cubemap to direct cubemap sample ![image](https://media.github.cds.internal.unity3d.com/user/760/files/6c374f10-e5f5-43b2-b04e-3515f141cf08) The input vector to cubemap sample has -1.01 in its x component to select the -x face that RenderRequest renders into in the test. The UVs from the quad are mapped to y,z components of the input vector. Since we are in the x plane with y up, u is mapped to z and v is mapped to y going from 0..1 to -1..1 space and accounting for the y-flip in the y axis, since render to textures are never flipped back in Unity. ![image](https://media.github.cds.internal.unity3d.com/user/760/files/d23041c4-7140-431b-83be-f26fa774fd75)
1 parent 49d8f74 commit b4ecad0

File tree

2 files changed

+851
-154
lines changed

2 files changed

+851
-154
lines changed

Tests/SRPTests/Projects/UniversalGraphicsTest_Foundation/Assets/Scenes/252_RenderRequest.unity

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ MeshFilter:
365365
m_PrefabInstance: {fileID: 0}
366366
m_PrefabAsset: {fileID: 0}
367367
m_GameObject: {fileID: 659318412}
368-
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
368+
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
369369
--- !u!4 &659318416
370370
Transform:
371371
m_ObjectHideFlags: 0
@@ -470,7 +470,7 @@ MeshFilter:
470470
m_PrefabInstance: {fileID: 0}
471471
m_PrefabAsset: {fileID: 0}
472472
m_GameObject: {fileID: 788431999}
473-
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
473+
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
474474
--- !u!4 &788432003
475475
Transform:
476476
m_ObjectHideFlags: 0
@@ -1027,7 +1027,7 @@ MeshFilter:
10271027
m_PrefabInstance: {fileID: 0}
10281028
m_PrefabAsset: {fileID: 0}
10291029
m_GameObject: {fileID: 1877926305}
1030-
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
1030+
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
10311031
--- !u!4 &1877926309
10321032
Transform:
10331033
m_ObjectHideFlags: 0
@@ -1356,7 +1356,7 @@ MeshFilter:
13561356
m_PrefabInstance: {fileID: 0}
13571357
m_PrefabAsset: {fileID: 0}
13581358
m_GameObject: {fileID: 2102121318}
1359-
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
1359+
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
13601360
--- !u!4 &2102121322
13611361
Transform:
13621362
m_ObjectHideFlags: 0
@@ -1461,7 +1461,7 @@ MeshFilter:
14611461
m_PrefabInstance: {fileID: 0}
14621462
m_PrefabAsset: {fileID: 0}
14631463
m_GameObject: {fileID: 2116977060}
1464-
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
1464+
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
14651465
--- !u!4 &2116977064
14661466
Transform:
14671467
m_ObjectHideFlags: 0

0 commit comments

Comments
 (0)