Skip to content

[Fogbugz # 1377986] Fixing DLSS exception when motion vectors are disabled #6292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed objects belonging to preview scenes being marked as dirty during migration (case 1367204).
- Fixed interpolation issue with wind orientation (case 1379841).
- Fixed range fields for depth of field (case 1376609).
- Fixed exception on DLSS when motion vectors are disabled (case # 1377986).

### Changed
- Optimizations for the physically based depth of field.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ public static ViewResources GetViewResources(in ViewResourceHandles handles)
{
var resources = new ViewResources
{
source = (RenderTexture)handles.source,
output = (RenderTexture)handles.output,
depth = (RenderTexture)handles.depth,
motionVectors = (RenderTexture)handles.motionVectors
source = (Texture)handles.source,
output = (Texture)handles.output,
depth = (Texture)handles.depth,
motionVectors = (Texture)handles.motionVectors
};

resources.biasColorMask = (handles.biasColorMask.IsValid()) ? (RenderTexture)handles.biasColorMask : (RenderTexture)null;
resources.biasColorMask = (handles.biasColorMask.IsValid()) ? (Texture)handles.biasColorMask : (Texture)null;

return resources;
}
Expand Down Expand Up @@ -115,11 +115,11 @@ public struct Parameters

public struct ViewResources
{
public RenderTexture source;
public RenderTexture output;
public RenderTexture depth;
public RenderTexture motionVectors;
public RenderTexture biasColorMask;
public Texture source;
public Texture output;
public Texture depth;
public Texture motionVectors;
public Texture biasColorMask;
}

public struct CameraResources
Expand Down Expand Up @@ -390,11 +390,11 @@ public void UpdateViewState(
}

public void SubmitDlssCommands(
RenderTexture source,
RenderTexture depth,
RenderTexture motionVectors,
RenderTexture biasColorMask,
RenderTexture output,
Texture source,
Texture depth,
Texture motionVectors,
Texture biasColorMask,
Texture output,
CommandBuffer cmdBuffer)
{
if (m_DlssContext == null)
Expand Down