-
Notifications
You must be signed in to change notification settings - Fork 842
[HDRP][Path Tracing] Force consistent normals to avoid black specular results #4142
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
Conversation
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Fixing hull constant shader's tesselation cull algorithm. Before it was comparing edges being out of the frustum. This is wrong because the camera could be inside a triangle, in which case the edges could be out of at least 1 frustum plane. Correct fix is to check all three vertices if they are out of at least 1 plane. Result packed tightly into the functions w return component. * Renamed to a new function so we keep backwards compatibility. Restored the shadow shader pass path, accidentally changed it to bool4 and use near plane. * Fixing type back to bool, instead of bool4 * Merging changelog information from rebase. * Making sure scene declaration pass is a bool4 * Adding new test for tesselation culling, with a weird camera angle which fails previous setup. * Fixing formatting of code, rearranging order of test in editor build settings. * Adding reference images for test. * Missing meta file for new tests * Fix bad merge issue * fix bad merge issue * fix bad merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com>
… m_FrameCount to the camera frame count (case 1301356). (#3032) Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
… dynamic res upscale (#3070) * Added a RenderGraph pass that resets the camera size after the dynamic res upscale * Updated changelog # Conflicts: # com.unity.render-pipelines.high-definition/CHANGELOG.md * fixed class name * update class name * PR fix * Fixed RTHandle scale Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * Apply the fix * Changelog * Mofified approach to the fix, this time also fixing override saving of light unit * Use more precise rect line offset calculation * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Apply the fix * Changelog * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * Fix labels style * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Changed the clamping approach for RTR and RTGI (in both perf and quality) to improve visual quality. (#3020) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Changed the warning message for ray traced area shadows (case 1303410). (#3029) * - Changed the warning message for ray traced area shadows (case 1303410). * Adds approximation information about ray-traced area shadows Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed side effect on styles during compositor rendering. * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Changed the clamping approach for RTR and RTGI (in both perf and quality) to improve visual quality. (#3020) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Changed the warning message for ray traced area shadows (case 1303410). (#3029) * - Changed the warning message for ray traced area shadows (case 1303410). * Adds approximation information about ray-traced area shadows Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Removed 2505_Area_Light_ShadowMask_Baking from baking queue (#3087) * Lightmaps / Removed scene from baking queue + meta files * update reference screenshots Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix size and spacing of compositor info boxes * Fix typo in changelog Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
…tor (#3105) * Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Changed the clamping approach for RTR and RTGI (in both perf and quality) to improve visual quality. (#3020) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Changed the warning message for ray traced area shadows (case 1303410). (#3029) * - Changed the warning message for ray traced area shadows (case 1303410). * Adds approximation information about ray-traced area shadows Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Removed 2505_Area_Light_ShadowMask_Baking from baking queue (#3087) * Lightmaps / Removed scene from baking queue + meta files * update reference screenshots Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Removed unused index parameter * Fix box light attenuation (#3056) * Fix box light attenuation * Update screenshots Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Revert "Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023)" This reverts commit 55bb6ff. * Revert "Revert "Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023)"" This reverts commit 57ee23b. * Fix default value of _SpecularOcclusionBlend * Fix color picker UI glitch in the Graphics Compositor Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060) * Fixed missing BeginCameraRendering call for custom render mode of a Camera (#3063) * Implement custom drawer for layer mask parameters (#3066) * Adding mixed light baking shadowmask test (#3052) * adding a shadow mask test * Update reference images * Changed the clamping approach for RTR and RTGI (in both perf and quality) to improve visual quality. (#3020) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed the condition on temporal accumulation in the reflection denoiser (case 1303504). (#3027) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Changed the warning message for ray traced area shadows (case 1303410). (#3029) * - Changed the warning message for ray traced area shadows (case 1303410). * Adds approximation information about ray-traced area shadows Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk> Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Disabled specular occlusion for what we consider medium and larger scale rtao > 1.25 with a 25cm falloff interval. (#3023) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix 1299233 ies resize bug * change log * Update CHANGELOG.md * fix merge issue Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com> Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com> Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
* create standalone_cache jobs * use cache jobs for trunk verification * fix commands so linux can recognise them need to wrap each string around "extra-editor-arg"
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * Fix undo redo on layered lit editor * Update CHANGELOG.md Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
* Added vulkan install in system requirements * Reworded content Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * Fix issue with compositor related custom passes still active after disabling the compositor Co-authored-by: JulienIgnace-Unity <julien@unity3d.com> Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
* Fixed Render Graph immediate mode. (#3033) Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> * Fix issue with shadow mask and area lights (#3019) * Not checking NdotL since it's not really valid for area lights (We have multiple valid light directions, not one) * Changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fix issue with capture callback (now includes post processing results) (#3035) Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix decal draw order for ShaderGraph decal materials (#3018) * Fixed ShaderGraph decal draw order * Updated changelog Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * Fixed various Look Dev issues after exiting Playmode (#2956) * Fixed access to invalid Contexts references after exiting playmode. * Fixed comparison gizmo after playmode. * Fixes from PR feedback * Fixed a few render texture memory leaks. * Update changelog * Added comment * Update CHANGELOG.md Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
* Fix runtim resource wizard fix regression * Update CHANGELOG.md Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fixed lookdev reload bug when viewing a scene object * Updated changelog * Re-added lookdev fix Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fix error in Depth Of Field near radius blur calculation * Fix typo Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fix gc alloc errors * Avoid setting the name of an object during render (gc alloc) * Avoid gc allocs (for real this time)
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Removed backplate from rendering of lighting cubemap as it did not really work conceptually and caused artefacts. * Update changelog * Remove useless code * Compilation fix. * Update doc * Update Override-HDRI-Sky.md Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Added alpha support changes for path tracing in bugfix branch. * Updated changelog and added doc. Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Histogram and scalarization warnings. * Fix warning in probe * Changelog * Update CHANGELOG.md Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>
Hey @eturquin, thanks for the PR and nice description. To add on that, would be good if you could list the things you have tested yourself as well, I assume the repro project? Anything else or any other specific cases that you could list? |
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.
Did multiple tests on different materials and geometry.
While this fix the black outline issue with the specular contribution, it can reduce substantially the effect of the normal making meshes appear way flater than they look compared to raster since the shading normal is pushed back "closer" to its geometric normal.
This effect is amplified the more the shading normal is facing away from the view vector (grazing angle on a plane for example).
From here there's 2 options :
- Push this changes by default (that still corrects a few behaviors) and allow users to disable pathtracer from tampering the normal.
- Since the issue comes mostly from specular, the idea would be to keep two shading normal, one for diffuse, and one from specular. That way we can only tamper the one we want and have results closer to what someone would expect with the normal map.
Hey, sorry if the description wasn't more verbose here, it's been discussed in detail with RemiC offline. :)
I think that, with Remi's many additional tests, this covers well all challenging scenarios. |
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.
Did another round of tests. Much better than the previous versions, most of the tests results are expected except one case with white spots with fabric.
-
Coarse geometry (when shading normal can be very different than geometric normal). Can't seem to repro the black outline ✔️
-
High normal map intensity with a rough normal map. We seem to recover some lost specularity ✔️
-
Real world example on amalienborg pavved ground ✔️ (it seems to flatten a little bit the normal effect
Also note for self to update the path tracer normal 5008 test to increase the coverage of it with more cases |
Test are 🟢 on yamato 🥳 |
Addresses: https://fogbugz.unity3d.com/f/cases/1323455/
Before:
Smooth normals + normal or bump mapping could result in shading normals that end up being inconsistent with the tessellated geometry (for instance, 'N dot V' is negative whereas the polygon is front facing, or specular direction ending up on the wrong side of the primitive). This results in undefined BSDF computations, which we avoid by simply returning null values, and can appear as black edges on coarsely tessellated (yet supposedly smooth) meshes, or when using strong bump/normal mapping.
Now:
The shading normal is now guaranteed to produce a reflection main direction in the right geometric hemisphere (the same as the incoming view vector's). This means that we avoid the undefined situations described above.
To test:
In addition to the test scene in the associated bug report, any scene with coarse tessellations, or strong bump/normal mapping are good candidates to detect any potential new issue.
Whereas this change is needed for specular (or more generally, view-dependant) BSDFs, it shouldn't be required for diffuse BSDFs. For the time being, the same consistent normal is used everywhere, but if needs be, we could use the modified normal for spec, and the original one for diffuse lobes.
EDIT:
Following further tests from @remi-chapelain and myself, the approach has been changed to the separate diffuse/spec normals mentioned previously. This seems to keep the result closer to the original look, while fixing the issues reported in the associated ticket.