Skip to content

Conversation

Vic-Cooper
Copy link
Contributor

Updated Dynamic Resolution doc to include changes made in technical and editorial review.

Updated to include changes made in docs technical and editorial review.
@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://yamato.cds.internal.unity3d.com/jobs/902-Graphics
Search for your PR branch using the sidebar on the left, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/.yamato%252Fall-hdrp.yml%2523PR_HDRP_trunk
With changes to HDRP packages, you should also run
/.yamato%252Fall-lightmapper.yml%2523PR_LightMapper_trunk

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions github-actions bot added the HDRP label Sep 14, 2021
2. For every [Camera](HDRP-Camera.md) you want to perform dynamic resolution, go to the **General** section and enable **Allow Dynamic Resolution**.

Dynamic resolution is not automatic, so you need to manually call the `DynamicResolutionHandler.SetDynamicResScaler(PerformDynamicRes scaler, DynamicResScalePolicyType scalerType)` function.
HDRP does not use dynamic resolution automatically. To use dynamic resolution in your scene, call the following function:
Copy link
Contributor

Choose a reason for hiding this comment

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

"HDRP does not perform the scaling for dynamic resolution" rather than that.

Dynamic res is enabled in the asset etc. Technically it can be used even when no scaling happens.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this clarification!

HDRP supports values from 5% to 100% and clamps anything above 100%. It is best practice to keep the screen percentage above 50%.

The example below shows how to call this function. In a real production environment, you would call this function depending on the performance of your application.
The example below demonstrates how to call this function. During development, call this function depending on the performance of your application.
Copy link
Contributor

Choose a reason for hiding this comment

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

This change kinda loses the purpose of the original one that was meant to say "This is just a dumb example, please do something more proper"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see :D Thanks!

| Temporal Anti-Aliasing (TAA) Upscale | This upscale filter uses temporal integration to produce a sharp image. This method is performance effective as it is performed alongside the normal anti-aliasing.<br />HDRP executes this upscale filter before post processing and at the same time as the TAA step. This means you can only use the TAA anti-aliasing method. This filter is not compatible with other anti-aliasing methods. <br /><br/>The filter also runs when at 100% resolution when Dynamic Resolution is enabled as it is responsible for anti-aliasing. <br />More information on [Notes on TAA Upscale](Dynamic-Resolution.md#Notes) section. |
| Catmull-Rom | Catmull-Rom uses four bilinear samples. This uses the least resources, but it can cause blurry images after HDRP performs the upscaling step.<br/><br/> Catmull-Rom has no dependencies and runs at the end of the post-processing pipeline. |
| Contrast Adaptive Sharpen (CAS) | Contrast Adaptive Sharpen (CAS) uses **FidelityFX (CAS) AMD™**. This method produces a sharp image with an aggressive sharpening step. Do not use this option when the dynamic resolution screen percentage is less than 50%. For information about FidelityFX and Contrast Adaptive Sharpening, see[ AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).<br/><br/> Contrast Adaptive Sharpen (CAS) has no dependencies and runs at the end of the post-processing pipeline. |
| FidelityFX Super Resolution 1.0 | FidelityFX Super Resolution 1.0 uses a spatial super-resolution method that balances quality and performance. For more information, see [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).<br/><br/> FidelityFX Super Resolution 1.0 has no dependencies and runs at the end of the post-processing pipeline.<br />FidelityFX Super Resolution 1.0also runs when at 100% resolution as it can have beneficial sharpening effects. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing a space "Resolution 1.0also runs"

Dynamic resolution reduces the workload on the GPU and maintains a stable target frame rate. The High Definition Render Pipeline (HDRP) uses dynamic resolution to lower the resolution of the render targets that the main rendering passes use.

Hardware Dynamic resolution is supported on:
HDRP uses hardware dynamic resolution automatically if your platform supports it. Otherwise, HDRP uses software dynamic resolution. Hardware dynamic resolution treats the render targets, up until the back buffer, as if they are all the scaled size. This means HDRP clears the render targets faster.
Copy link
Contributor

Choose a reason for hiding this comment

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

HDRP uses hardware dynamic resolution automatically if your platform supports it.

This is not true, it is just the default option. When that option is selected, but not available it fallbacks to software.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the original wording was bad as well :)

| Catmull-Rom | Catmull-Rom uses four bilinear samples. This uses the least resources, but it can cause blurry images after HDRP performs the upscaling step.<br/><br/> Catmull-Rom has no dependencies and runs at the end of the post-processing pipeline. |
| Contrast Adaptive Sharpen (CAS) | Contrast Adaptive Sharpen (CAS) uses **FidelityFX (CAS) AMD™**. This method produces a sharp image with an aggressive sharpening step. Do not use this option when the dynamic resolution screen percentage is less than 50%. For information about FidelityFX and Contrast Adaptive Sharpening, see[ AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).<br/><br/> Contrast Adaptive Sharpen (CAS) has no dependencies and runs at the end of the post-processing pipeline. |
| FidelityFX Super Resolution 1.0 | FidelityFX Super Resolution 1.0 uses a spatial super-resolution method that balances quality and performance. For more information, see [AMD FidelityFX](https://www.amd.com/en/technologies/radeon-software-fidelityfx).<br/><br/> FidelityFX Super Resolution 1.0 has no dependencies and runs at the end of the post-processing pipeline.<br />FidelityFX Super Resolution 1.0also runs when at 100% resolution as it can have beneficial sharpening effects. |
| Temporal Anti-Aliasing (TAA) Upscale | Temporal Anti-Aliasing (TAA) Upscale uses temporal integration to produce a sharp image. Unity performs this method alongside the normal anti-aliasing to optimise performance.<br />HDRP executes this upscale filter before post processing and at the same time as the TAA step. This means you can only use the TAA anti-aliasing method. This filter is not compatible with other anti-aliasing methods. <br /><br/>Temporal Anti-Aliasing (TAA) Upscale performs antialiasing on each frame. This means that it also runs when you enable Dynamic Resolution, even when the screen percentage is at 100% resolution. <br />For more information, see the section [Notes on TAA Upscale](Dynamic-Resolution.md#Notes). |
Copy link
Contributor

Choose a reason for hiding this comment

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

to optimise performance

I am fine keeping this here, but it is not the reason, it just needs to be there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, yeah I'll remove it in this case because it seems distracting. Thanks!


- Temporal Anti-Aliasing is the only the anti-aliasing method and no other post-process anti-aliasing option will work.
- The post-process pipeline runs at final resolution. Before HDRP applies TAA Upscaling, the pipeline uses a downscaled resolution. This gives a more precise post-processing result, but also uses more GPU resources.
- When TAA Upscaling is active, it is the only anti-aliasing method. No other post-process anti-aliasing option will work.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not what I meant with the original phrase, I actually meant TAA and not TAAU

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry being a bit confusing here, but it is when TAAU is active, TAA (without the U :D ) is the only anti-aliasing method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OH! Got it, thank you :D

- Temporal Anti-Aliasing is the only the anti-aliasing method and no other post-process anti-aliasing option will work.
- The post-process pipeline runs at final resolution. Before HDRP applies TAA Upscaling, the pipeline uses a downscaled resolution. This gives a more precise post-processing result, but also uses more GPU resources.
- When TAA Upscaling is active, it is the only anti-aliasing method. No other post-process anti-aliasing option will work.
- Before HDRP applies TAA Upscaling, the pipeline uses a downscaled resolution. This gives a more precise post-processing result, but also uses more GPU resources.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually the opposite of the message we want to give, the important part is that the upscaling happens before post processing, so postprocessing is at final resolution and so the remarks on precise and more resources make sense.


- It is important to be cautious when setting up speed rejection thresholds. Speed rejection heavily reduces the influence of the history in favor of current frame, this mean that at lower screen percentages speed rejection can lead to a fairly low resolution looking image.
- Given that the source data is low resolution, it is worth to explore the possibility of being more generous with the sharpening setting than what would be normally used at full resolution.
- Speed rejection can produce an image that appears to have a low resolution at lower screen percentages. This is because the speed rejection threshold can reduce the influence of the history buffer in favor of the current frame.
Copy link
Contributor

Choose a reason for hiding this comment

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

To me this reads a bit less linked to the previous point, it is less clear to me that it is low res because the current frame is low res and speed rejection takes contribution for current frame more heavily.

Because I know is like that I can read that into this, but I struggle a bit more, maybe is just me :D

- It is important to be cautious when setting up speed rejection thresholds. Speed rejection heavily reduces the influence of the history in favor of current frame, this mean that at lower screen percentages speed rejection can lead to a fairly low resolution looking image.
- Given that the source data is low resolution, it is worth to explore the possibility of being more generous with the sharpening setting than what would be normally used at full resolution.
- Speed rejection can produce an image that appears to have a low resolution at lower screen percentages. This is because the speed rejection threshold can reduce the influence of the history buffer in favor of the current frame.
- You can set the [Camera's](HDRP-Camera.md) **TAA Sharpen Strength** setting to higher values to compensate for low resolution source data.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is way too definite, put it like this makes it sound is something that is always to do. It is something worth exploring w.r.t the usual range a user would use in TAA

Copy link
Contributor

@FrancescoC-unity FrancescoC-unity left a comment

Choose a reason for hiding this comment

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

See comments above

Update based on Francesco's feedback.
Updated the docs based on the rest of Francesco's comments.
@Vic-Cooper
Copy link
Contributor Author

Thanks for your feedback @FrancescoC-unity. I've updated the docs based on your comments, please let me know what you think :)

@FrancescoC-unity
Copy link
Contributor

All good now except for a tiny thing here :) #5652 (comment)

Thanks!

@Vic-Cooper
Copy link
Contributor Author

@sebastienlagarde Ready to merge :)

@sebastienlagarde sebastienlagarde merged commit a339eae into master Sep 20, 2021
@sebastienlagarde sebastienlagarde deleted the HDRP/docs/dynamic_resolution_update branch September 20, 2021 15:19
sebastienlagarde pushed a commit that referenced this pull request Sep 20, 2021
* Updated Dynamic Resolution doc

Updated to include changes made in docs technical and editorial review.

* Technical improvements.

Update based on Francesco's feedback.

* Technical improvement pt.2

Updated the docs based on the rest of Francesco's comments.

* Fixed line 120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants