Skip to content

Commit

Permalink
Fix "mismatching output texture dimension" error
Browse files Browse the repository at this point in the history
  • Loading branch information
daleeidd committed Nov 8, 2022
1 parent 2a62a03 commit d952cd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crest/Assets/Crest/Crest/Scripts/Helpers/XRHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static Texture2DArray WhiteTexture
public static RenderTextureDescriptor GetRenderTextureDescriptor(Camera camera)
{
#if _XR_ENABLED
if (IsRunning)
if (camera.stereoEnabled)
{
return XRSettings.eyeTextureDesc;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ internal void FixMaskArtefacts(CommandBuffer buffer, RenderTextureDescriptor des
}

buffer.SetComputeTextureParam(_fixMaskComputeShader, _fixMaskKernel, ShaderIDs.s_CrestOceanMaskTexture, target);
_fixMaskComputeShader.SetKeyword("STEREO_INSTANCING_ON", XRHelpers.IsSinglePass);
// XR SPI will have a volume depth of two. If using RTHandles, then set manually as will be two for all cameras.
_fixMaskComputeShader.SetKeyword("STEREO_INSTANCING_ON", descriptor.volumeDepth > 1);

buffer.DispatchCompute
(
Expand Down
1 change: 1 addition & 0 deletions docs/about/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Fixed
.. only:: birp or urp

- Fixed *Underwater Curtain* lighting not matching the water surface causing a visible seam at the far plane.
- Fixed "mismatching output texture dimension" error when using XR `SPI`. `[BIRP] [URP]`

.. only:: birp

Expand Down

0 comments on commit d952cd4

Please sign in to comment.