Skip to content

Keep SSR disabled when motion vectors are off#1113

Closed
pmavridis wants to merge 2 commits into
HDRP/stagingfrom
HDRP/fix_ssr
Closed

Keep SSR disabled when motion vectors are off#1113
pmavridis wants to merge 2 commits into
HDRP/stagingfrom
HDRP/fix_ssr

Conversation

@pmavridis
Copy link
Copy Markdown
Contributor

@pmavridis pmavridis commented Jul 2, 2020

Purpose of this PR

When disabling motion vectors on the HDRP asset, but SSR is enabled (in the asset and in the frame settings), we get a black screen and an error.

This PR does not allow enabling SSR (in both the asset and frame settings) when motion vectors are off.


Testing status

  1. Open sample HDRP project
  2. Set in the motion vectors to off in the HDRP Asset
    Outcome: the screen does not go black and the SSR options are grayed-out in both the asset and frame settings

using (new EditorGUI.DisabledScope(!serialized.renderPipelineSettings.supportMotionVectors.boolValue))
{
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportSSR, Styles.supportSSRContent);
serialized.renderPipelineSettings.supportSSR.boolValue &= serialized.renderPipelineSettings.supportMotionVectors.boolValue;
Copy link
Copy Markdown
Contributor Author

@pmavridis pmavridis Jul 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative is to let supportSSR = true in the asset, but sanitize the frame settings in FrameSettings::Sanitize.

Sanitizing the asset looks better to me because there are many places that query the supportSSR variable from the asset (and not the frame settings).

@pmavridis pmavridis closed this Jul 15, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/fix_ssr branch September 1, 2021 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants