You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:

Quad:

Change the shader graph cubemap sample node from reflected cubemap to direct cubemap sample

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.

0 commit comments