diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 9af87e486b2..799ae2bdc6a 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -17,6 +17,7 @@ The version number for this package has increased due to a version update of a r ### Fixed - Fixed the Unlit shader not being SRP Batcher compatible on OpenGLES/OpenGLCore. [case 1263720](https://issuetracker.unity3d.com/issues/urp-mobile-srp-batcher-is-not-visible-on-mobile-devices-in-frame-debugger) - Fixed an issue with soft particles not rendering correctly for overlay cameras with post processing. [case 1241626](https://issuetracker.unity3d.com/issues/soft-particles-does-not-fade-out-near-the-opaque-surfaces-when-post-processing-is-enabled-on-a-stacked-camera) +- Fixed latest mockHMD renderviewport scale doesn't fill whole view after scaling. [case 1286161] (https://issuetracker.unity3d.com/issues/xr-urp-renderviewportscale-doesnt-fill-whole-view-after-scaling) ## [10.1.0] - 2020-10-12 ### Added diff --git a/com.unity.render-pipelines.universal/Shaders/XR/XRMirrorView.hlsl b/com.unity.render-pipelines.universal/Shaders/XR/XRMirrorView.hlsl index 2b001c83bdd..e898c290b63 100644 --- a/com.unity.render-pipelines.universal/Shaders/XR/XRMirrorView.hlsl +++ b/com.unity.render-pipelines.universal/Shaders/XR/XRMirrorView.hlsl @@ -28,6 +28,11 @@ Varyings VertQuad(Attributes input) Varyings output; output.positionCS = GetQuadVertexPosition(input.vertexID) * float4(_ScaleBiasRt.x, _ScaleBiasRt.y, 1, 1) + float4(_ScaleBiasRt.z, _ScaleBiasRt.w, 0, 0); output.positionCS.xy = output.positionCS.xy * float2(2.0f, -2.0f) + float2(-1.0f, 1.0f); //convert to -1..1 + +#if UNITY_UV_STARTS_AT_TOP + // Unity viewport convention is bottom left as origin. Adjust Scalebias to read the correct region. + _ScaleBias.w = 1 - _ScaleBias.w - _ScaleBias.y; +#endif output.texcoord = GetQuadTexCoord(input.vertexID) * _ScaleBias.xy + _ScaleBias.zw; return output; }