-
Notifications
You must be signed in to change notification settings - Fork 840
Add option to enable pure specular planar reflection (optimization) #2105
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
Add option to enable pure specular planar reflection (optimization) #2105
Conversation
- Added a rough distortion frame setting and and info box on distortion materials. - Added tests to cover the new features.
It appears that you made a non-draft PR! |
com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Override-Screen-Space-Reflection.md
Outdated
Show resolved
Hide resolved
- With Rough Refraction enabled and Distortion enabled, the color buffer included all transparents objects. | ||
- With Rough Refraction enabled and Distortion disabled, the color buffer included only transparents objects with [Rendering Pass](Surface-Type.md) **BeforeRefraction**. | ||
- With Rough Refraction disabled and Distortion disabled, the color buffer included all transparents objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- With both Rough Refraction and Distortion disabled, the color buffer includes all transparent GameObjects.
@@ -60,7 +60,9 @@ The following properties control the method that the Planar Reflection Probe use | |||
| **Probe Layer Mask** | Acts as a culling mask for environment lights (light from other Planar Reflection Probes and Reflection Probes). This Planar Reflection Probe ignores all Reflection Probes that are on Layers not included in this Layer mask, so use this property to ignore certain Reflection Probes when rendering this one. | | |||
| **Custom Frame Settings** | Allows you to define custom [Frame Settings](Frame-Settings.md) for this Probe. Disable this property to use the **Default Frame Settings** in your Unity Project’s [HDRP Asset](HDRP-Asset.md). | | |||
| **Resolution** | Sets the resolution for the probe camera. | | |||
| **Rough Reflections** | Disable the checkbox to inform HDRP that this planar reflection will be used as a mirror. It mean that the receiving surface must be perfectly smooth. If receiving surface is not smooth, the result will not be accurate. This option allow to save GPU performance when disabled for the case of mirror usage.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disable the checkbox to tell HDRP to use this Planar Reflection Probe as a mirror. If you do this, the receiving surface must be perfectly smooth or the reflection result is not accurate. If you want perfect reflection, disabling this option can be useful because it means HDRP does not need to process rough refraction and thus decreases the resource intensity of the effect.
| **Mirror Position** | Offsets the position of the mirror from the Transform Position. This is only available in **Advanced** mode. | | ||
| **Range Compression Factor** | The result of the rendering of the probe will be divided by this factor. When the probe is read, this factor is undone as the probe data is read. This is especially useful to deal with very bright or dark objects in the reflections that will otherwise be saturated. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The factor which HDRP divides the result of the probe's rendering by. This is useful to deal with very bright or dark objects in the reflections that would otherwise be saturated.
com.unity.render-pipelines.high-definition/Documentation~/Planar-Reflection-Probe.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Planar-Reflection-Probe.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2020.1-to-2020.2.md
Outdated
Show resolved
Hide resolved
com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2020.1-to-2020.2.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some suggestions for the docs.
PR is ready, no need more QA. I have done it on top of Anis test. Checked that the various planar of the provided scene works correctly with differents settings in HDRP assets. |
* Fix warning in ShaderPassDecal.hlsl * Tooltip for microshadows (#2100) * Update Alembic version to stop Alembic complaining * Disable quad overdraw on ps4 (#2107) * disable quad overdraw on ps4 * update doc Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Enable the DXR Vertex Format test for RG (#2022) * Add option to enable pure specular planar reflection (optimization) (#2105) * - Added a rough refraction option on planar reflections. - Added a rough distortion frame setting and and info box on distortion materials. - Added tests to cover the new features. * review changes * removed PerceptualRoughnessToMipmapLevel_LODFlag which isn't required. * clean more code (remove OutputSmoothPlanarReflection) * missing one update * removed rough distortion * remove distortion test scene * Update DistortionUIBlock.cs * clean distortion * update documentation * address doc feedback * Update Upgrading-from-2020.1-to-2020.2.md * Update Upgrading-from-2020.1-to-2020.2.md * update test 2220 * update smoothness test * Create 2220_SmoothPlanarReflection.png * update reference screenshots Co-authored-by: Anis <anis@unity3d.com> * Implementing scalabity settings for planar resolutions (#2059) * - Added a rough refraction option on planar reflections. - Added a rough distortion frame setting and and info box on distortion materials. - Added tests to cover the new features. * review changes * Added scalability settings for the planar reflection resolution. * support migration. * renamed the resolution parameters for the planar reflections * removed PerceptualRoughnessToMipmapLevel_LODFlag which isn't required. * clean more code (remove OutputSmoothPlanarReflection) * missing one update * removed rough distortion * remove distortion test scene * Update DistortionUIBlock.cs * clean distortion * update documentation * address doc feedback * Update Upgrading-from-2020.1-to-2020.2.md * Update Upgrading-from-2020.1-to-2020.2.md * update test 2220 * Revert "renamed the resolution parameters for the planar reflections" This reverts commit 753af88. * cleanup migration code * update smoothness test * Create 2220_SmoothPlanarReflection.png * some cleanup * Revert "Revert "renamed the resolution parameters for the planar reflections"" This reverts commit fbf3572. * update doc Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Remove useless SampleSkyTexture function * Fix errors when resizing the compositor's output and when removing/adding the compositor (#2118) # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md * Remove BLEND keywords and replace with constant branch (#1884) * Removing blend keyword. * Changelog * Update DecalProperties.hlsl * revert change in AxF shader * fix compile issue with ordering when using VT * update comment * Update Upgrading-from-2020.1-to-2020.2.md * update comment + optimized code version (in case of bad compiler) * update comment revert (wrong) optimization * remove unused multicopmile in test * candidate fix for VFX * Revert "candidate fix for VFX" This reverts commit e3183f0. * Another tentative fix * Try differently * Fix compile issue. * Another vfx fix attempt. * Latest flavour of fix. * Remove old defines * Fix hybrid * Update includes in ray tracing * Update Upgrading-from-2020.1-to-2020.2.md Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Mixed cached shadow maps (Cached static + dynamic rendered every frame) (#1559) * UI for mixed cached shadows * Baby steps (# 1) * Baby steps (# 2) * Extrapolate the update request data into a function * Commit before blit code * Need to switch branch * Need to switch branch * Working as long the light does not move. * Fixed area light case * Make it render graph ready * Make sure we correctly update the freshly updated cached shadows * Raw update upon movement option (Missing API for threshold) * Threshold API * Add unity binary tag * New docs * Shader name change * Update docs * Fix bad merge * Update Shadows-in-HDRP.md * For now disable the directional light case. * Disable directional mixed. * Make it disabled under define * Remove docs * Implement rendergraph version * Remove superflous blit * Tentative fix for yamato. Co-authored-by: JordanL8 <lewis.jordan@hotmail.co.uk> * update meta file with wrong information Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Anis <anis@unity3d.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: JordanL8 <lewis.jordan@hotmail.co.uk>
Added a rough refraction option on planar reflections (on the reflection component, called Rough Reflections)
Added tests to cover the new features.
Did the rendergraph support.
Tested locally, all the test were green except an unrelated one.
I added one new tests to cover the feature.
I made sure that the button was checked by default (rough reflection on planar).
I made sure that unchecking changed the reflections of this planar only to smooth.
Tried different resolutions of the planar.
Note: from Seb: original PR from @anisunity was here: #1961 . I have split the PR in two.