Skip to content

Commit ae5ff5f

Browse files
** Fixing DLSS failing when MV are disabled ** (#6292)
* Using texture types instead of RenderTexture types for DLSSPass * Changelog * Formatting Co-authored-by: sebastienlagarde <[email protected]>
1 parent 0129228 commit ae5ff5f

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919
- Fixed edges and ghosting appearing on shadow matte due to the shadow being black outside the range of the light (case 1371441).
2020
- Fixed interpolation issue with wind orientation (case 1379841).
2121
- Fixed range fields for depth of field (case 1376609).
22+
- Fixed exception on DLSS when motion vectors are disabled (case # 1377986).
2223

2324
## [12.1.2] - 2021-10-22
2425

com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/RenderPass/DLSSPass.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ public static ViewResources GetViewResources(in ViewResourceHandles handles)
4040
{
4141
var resources = new ViewResources
4242
{
43-
source = (RenderTexture)handles.source,
44-
output = (RenderTexture)handles.output,
45-
depth = (RenderTexture)handles.depth,
46-
motionVectors = (RenderTexture)handles.motionVectors
43+
source = (Texture)handles.source,
44+
output = (Texture)handles.output,
45+
depth = (Texture)handles.depth,
46+
motionVectors = (Texture)handles.motionVectors
4747
};
4848

49-
resources.biasColorMask = (handles.biasColorMask.IsValid()) ? (RenderTexture)handles.biasColorMask : (RenderTexture)null;
49+
resources.biasColorMask = (handles.biasColorMask.IsValid()) ? (Texture)handles.biasColorMask : (Texture)null;
5050

5151
return resources;
5252
}
@@ -115,11 +115,11 @@ public struct Parameters
115115

116116
public struct ViewResources
117117
{
118-
public RenderTexture source;
119-
public RenderTexture output;
120-
public RenderTexture depth;
121-
public RenderTexture motionVectors;
122-
public RenderTexture biasColorMask;
118+
public Texture source;
119+
public Texture output;
120+
public Texture depth;
121+
public Texture motionVectors;
122+
public Texture biasColorMask;
123123
}
124124

125125
public struct CameraResources
@@ -390,11 +390,11 @@ public void UpdateViewState(
390390
}
391391

392392
public void SubmitDlssCommands(
393-
RenderTexture source,
394-
RenderTexture depth,
395-
RenderTexture motionVectors,
396-
RenderTexture biasColorMask,
397-
RenderTexture output,
393+
Texture source,
394+
Texture depth,
395+
Texture motionVectors,
396+
Texture biasColorMask,
397+
Texture output,
398398
CommandBuffer cmdBuffer)
399399
{
400400
if (m_DlssContext == null)

0 commit comments

Comments
 (0)