Skip to content
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

SSGI Improvements #1714

Merged
merged 4 commits into from Sep 14, 2020
Merged

SSGI Improvements #1714

merged 4 commits into from Sep 14, 2020

Conversation

anisunity
Copy link
Contributor

The PR is done on top of this PR: #1697

This PR improves the SSGI filtering code and fixes an issue with the usage of RTGI (bleding was wrong). This PR also removes ghosting issues when changing from full to half res for both effects.

Testing status

The DXR tests were green with and without render graph.

@anisunity anisunity self-assigned this Aug 31, 2020
@anisunity anisunity changed the title Hdrp/ssgi improvement SSGI Improvements Aug 31, 2020
@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page)
and cancel any jobs that started on Yamato.
See the PR template for more information.
Thank you!

@@ -199,7 +207,8 @@ static void Denoise(CommandBuffer cmd, SSGIDenoiserParameters parameters, SSGIDe
if (parameters.historyNeedsClear)
{
// clear it to black if this is the first pass to avoid nans
CoreUtils.SetRenderTarget(cmd, resources.indirectDiffuseHistory, ClearFlag.Color, clearColor: Color.black);
CoreUtils.SetRenderTarget(cmd, resources.indirectDiffuseHistory0, ClearFlag.Color, clearColor: Color.black);
Copy link
Collaborator

Choose a reason for hiding this comment

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

For just clearing buffers it'd be better to use CoreUtils.ClearRenderTarget for the sake of clarity.

@@ -50,24 +50,6 @@ public int raySteps
[Tooltip("Controls the number of steps used for ray marching.")]
private ClampedIntParameter m_RaySteps = new ClampedIntParameter(24, 16, 128);

/// <summary>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be considered a breaking change. Not sure if we can use the [Obsolete] attribute on volume parameters. Would need to check that. @sebastienlagarde can we consider doing it anyway if it's for version 10.x.x anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GlobalIllumination is officially in preview, so i think we can break it

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, SSGI was in preview up to now (and have been added in 10.x anyway), btw once we merge this PR we should remove preview from SSGI UI.

_IndirectDiffuseTexture1RW[COORD_TEXTURE2D_X(currentCoord)] = float4(outCoCg, invalid ? 0.0 : 1.0, length(motionVectorNDC * 10000.0f));
}

void ConvertYCoCgToRGBUtil(float4 inYSH, float2 inCoCg, float3 inNormal, out float3 outColor)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function should be in color.hlsl (and I guess it already exist there)

Copy link
Collaborator

Choose a reason for hiding this comment

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

can be done in another PR

@sebastienlagarde
Copy link
Collaborator

@anisunity can you merge, move the ycocr convertion funciton to color.hlsls and update the documentation of SSGI? thanks.
Also can you remove the "preview" from SSGI component named (and framesettings?)

Copy link
Contributor

@TomasKiniulis TomasKiniulis left a comment

Choose a reason for hiding this comment

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

Looks good to me. No issues found.
Validating that no ghosting issues appear anymore.
PR:
noGhostingSSGI
Staging:
ghostingStaging

SSGI filtering looks better than what was before. Attaching comparisons.
No SSGI:
image
PR SSGI High Quality:
image
HDRP staging high quality:
image

RTGI remains unaffected.
PR performance mode high quality:
image
HDRP/staging perf mode high quality:
image

@sebastienlagarde
Copy link
Collaborator

@anisunity can you merge latest HDRP/Staging and I will merge this PR (and maybe re run just the DXR test (not the other as they are red on staging). thanks!

@anisunity
Copy link
Contributor Author

Doing it right now

@anisunity
Copy link
Contributor Author

Done, had to update a screenshot. Would be great to merge this one as well #1845

@sebastienlagarde sebastienlagarde merged commit 7ac1d1f into HDRP/staging Sep 14, 2020
@sebastienlagarde sebastienlagarde deleted the HDRP/SSGI_Improvement branch September 14, 2020 10:52
sebastienlagarde added a commit that referenced this pull request Sep 14, 2020
@sebastienlagarde sebastienlagarde mentioned this pull request Sep 17, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants