Skip to content

Commit

Permalink
Pospow and SG triplanar fix (#40)
Browse files Browse the repository at this point in the history
* Implement Semi-transparent Shadows for Point and Spot lights (#5490)

* Make the shadow behavior for  transparent and transmissive objects more intuitive.

* Update changelog

* Implementing semi transparent ray traced shadows for point and spot light
Adding a test scene for both cases
Moving contact shadow ray tracing code to a seperate file
Changing the direction of contact shadow rays to be coherent with the other shadows

* update changelog

* Update the test scenes

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* fix shader warning in termporal AA

* Support semi-transparent shadows for unlit shader and unlit shader graph (#5663)

* Not doing ray tracing when the stencil bit is off for ssr (#5665)

adding a test case for it

* Restored serialization of deprecated parameters to fix migration. (#5666)

* Shadow Atlas is no longer allocated for area lights when they are disabled in the shader config file. (#5662)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Updated HDRP documentation (#5664)

* Updated HDRP asset doc

* Update the upgrade guide for cookies and planars

* Added warning in the material sorting priority doc for depth write

* Added a section about surface option properties for ShaderGraphs

* Fix link name

* Alpha output documentation (#5658)

* Update documentation for HDRI-Sky-Backplate (AO) (#5670)

* Avoid MRT Clear on PS4 [Skip CI] (#5675)

* Avoid MRT Clear on PS4

* changelog

* Update HDRenderPipeline.cs

* Update HDRenderPipeline.cs

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Change name of option (#5681)

* More code share between inspector materials  (#5635)

* Share stencil code for inspector materials (Akin to what happens in shadergraph)

* changelog

* Add comment and fix issue

* Better handling of setting state (if not available, don't write it)

* Update BaseLitGUI.cs

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Expose alpha cutoff material for ShaderGraphs (#5667)

* Expose alpha clip to material UI for ShaderGraphs

* Updated changelog

* Replace #if by #ifdef

* Fix debug menu bitfield (#5683)

* Fixed runtime debug menu bitfield controls

* Updated changelog

* Hdrp/update default scenes (#5634)

* Replace default scenes with scene prepared for scene-template

* Update of DefaultSettingsProfile

* Update DXR scene

* fix missing profile in default scene dxr

* Update CHANGELOG.md

* Fix missing HDRI Sky references in DXR new scene

* Fixed VFX Tests Default volume profile

* Changed Default Volume settings to an empty one.

* Missing volume asset files + update manifest and meta

Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* - Fixed the radius value used for ray traced directional light. (#5682)

- Fixed compilation issues with the layered lit in ray tracing shaders.
- Changed the way the length parameter is used for ray traced contact shadows.
- Added contact shadow test scenes

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* fixed XR autotests viewport size rounding (#5684)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Material samples bis (#5686)

* Add ball

* update Material samples #5638

* Update CHANGELOG.md

* Remove unused version property from Material

* Updating the documentation for ray tracing (#5680)

* Updating the documentation for ray tracing

* review corrections

* Fix mip slider reflectionprobe (#5689)

* Remove the slider knob when the reflection probe preview has no mipmap

* Updated changelog

* edit VR documentation (#5685)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Better directional PCSS blur handling (#5688)

* Use correct penumbra calculation for directional.

* Update visual test

* Need cleaning uo

* Cleaning

* screenshot update

* Small cleanup

* typo leftover

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Update 001-HDTemplate.png

* Adding the initial implementation of sub-surface scattering (#5625)

* Initial implementation of ray traced sub surface scattering
Added a test scene for ray traced sub surface scaterring

* Update changelog

* Updating the tests

* Update 8103_PrePostPass.unity

* Remove unnecessary skip of material upgrade dialog box. (#5692)

* Remove unnecessary skip of material upgrade dialog box.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix warning after metal fixup (#5704)

* Various API doc update. (#5705)

* Various doc + FrameSettings WIP

* Finished frame settings API doc and added various other missing doc.

Also made internal wrongly public API in HDRP

* Fix density volume blend distance (#5698)

* Fixed adjusting positive axis of Blend Distance slides the negative axis

* Updated changelog

* edit VR doc (#5699)

* Hdrp/wizard update vr installation (#5706)

* Add installatation checker in UsedPackageRetriever

* Add PackageInstaller

* Add better control on the displayed HelpBox

* Update VR fixes

* fix typo

* Move Install Config Package Button above with HDRP Package info

* Update CHANGELOG.md

* Update documentation

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Removing unused alpha threshold depth prepass and post pass for fabric shader graph (#5711)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix default volume profiles location (#5710)

* Ray traced reflection smoothness fade and fallback fixes. (#5700)

* Fix fall back for ray traced reflections when denoising is enabled
Make Smoothness Fade start work with ray traced reflections
Fix the blend of reflections based on the weight
Add the contact shadow test scenes back

* Change the name of the weight function and add it to all shading models

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix iridescence color space (#5691)

* Fix iridescence color space

* Fixed compilation and updated test screenshots

* fix test

Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>

* Fix Terrain Detail Mesh (stop to spam) [Require C++ PR] (#5690)

* disable support of Terrain Detail

Fix for error spam issue in HDRP: https://fogbugz.unity3d.com/f/cases/1211848/

* Update CHANGELOG.md

* Update HDRenderPipeline.cs

* Update HDRenderPipeline.cs

* [Waiting for C++] Disable probes in renderers (#5648)

* Disable probes section in the Renderer editors

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Merge Hdrp/fix/case 1210058 to master (#5612)

* Fix for 1210058 - NaNs at certain view angles

Issue is caused by NaNs/INFs when computing basis on extremely thin (subpixel-width) geometry.  Putting some safeguards fixes the issue

* Update CHANGELOG.md to reflect 1210058 fix.

* Updated fix for issue #1210058

Overwrite the UVs to fix the derivatives.

* Updated fix for issue #1210058

Make sure the UVs are zero if unused to fix the derivatives.

* Undo last.change -- UV fix addresses NaNs

Zeroing the unused UV1 channel on the material seems to do the trick.

* Changelog adjustments to be moved

Current version puts everything in HDRP, so there is no change in core.

* Update CHANGELOG.md

Reflect fix for NaNs

* Fixed UV1 for lightmaps and detail maps.

* update comment

* Update NormalSurfaceGradient.hlsl

Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Minor code cleanup

* Added script documentation for SSR, SSAO (ray tracing), GI, Light Cluter, RayTracingSettings, Ray Counters, ray traced SSS andRecursive Rendering. (#5732)

* Added script documentation for SSR, SSAO (ray tracing), GI, Light Cluster, RayTracingSettings, Ray Counters, ray traced SSS andRecursive Rendering.

* udpate changelog

* Implementation of ScreenSpaceReflections for Transparent materials (#4968)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix HDRP duplicated frame settings (#5850)

* - Added a fallback for ray traced area light shadows in case the material is forward or the lit mode is forward. (#5749)

- Fixed a bug related to ray traced area light shadow history.

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix cookie index usage (#5871)

* Hdrp/merge staging (#5943)

* fix case 1205791 custom mesh issue (#5551)

* fic case 1205791 custom mesh issue

* Updated changelog

* Added a call to Dirty() (#5420)

* Added a call to Dirty()

* Updated changelog

Co-authored-by: Marc Templin <marctem@users.noreply.github.com>

* Fix shadergraph analytics. (#5912)

* Fix analytics.

* Added changelog

* Fix for case 1200161 Save as subgraph issue (#5503)

* Fix for case 1200161

* Edited CHANGELOG.md

* Added comment to the code

Co-authored-by: Sharlene Tan <43795986+sharlenet@users.noreply.github.com>
Co-authored-by: Marc Templin <marctem@users.noreply.github.com>

* fix for unreported keyword bug (#5863)

* Fixed fogbugz case 1197958 (#5671)

* * Fixed fogbugz case 1197958.

* * Updated CHANGELOG.md.

* * Added spacing.

* Added #if ENABLE_VR && ENABLE_VR_MODULE guard to XR code.

*  Added Logic to Inject render pass to base renderer (#5901)

*  Moved render pass injection code from Forward Renderer to ScriptableRenderer to be able to use for all renderers.

*  added changelog

* Disabling the GetDefaultRenderer() test for now until it is redone. (#5924)

* [Yamato] [skip ci] Setting up master to run on 2020.1 (#5936)

* added 2020.1 and fast to editors

* added 2020.1/staging and fast to the rest of the files

* [CI] Bors setup (#5841)

* Create bors.toml

* Update bors.toml

* Update bors.toml

* Update upm-ci-projects.yml

* Create testcommit

* Update bors.toml

* adding trying trigger

* add staging trigger

* Delete testcommit

* use squash merge

* updating job that bors will run

* [skip ci] update job that bors will run

* Fixed MAD and RCP definitions in OpenGL. (#5922)

Co-authored-by: Martin Thorzen <35328557+martint-unity@users.noreply.github.com>
Co-authored-by: Marc Templin <marctem@users.noreply.github.com>
Co-authored-by: Sharlene Tan <43795986+sharlenet@users.noreply.github.com>
Co-authored-by: Zachary Diller <zackd44@gmail.com>
Co-authored-by: thomas-zeng <49886741+thomas-zeng@users.noreply.github.com>
Co-authored-by: Felipe Lira <felipedrl@gmail.com>
Co-authored-by: Elvar Örn Unnþórsson <ellioman@ellioman.com>
Co-authored-by: Liis Kivistik <kivistik.liis@gmail.com>
Co-authored-by: Sophia <16596228+sophiaaar@users.noreply.github.com>

* Fix whitespace

* Misc fixes for the sky (#5974)

* Static lighting sky now takes the default volume into account.

* Fixed a leak in the PBR sky renderer.

* Added a tooltip to the Ambient Mode parameter in the Visual Environment volume component.

* Update changelog

* Fixed null ref

* Fixed an issue where having ambient mode set to dynamic might prevent the sky from being included in baking.

* Forces an update of static sky when changing it in the Environment panel.

* Fixed a problem with static sky when multiple skies are rendered at the same time.

* Revert probes renderer PR (#5990)

* Re-enable the probes section of renderers as it was not supposed to be disabled

* Updated changelog

* Fix a leak in the sky system. (#5967)

* Fixed a cubemap leak when rendering previews for the first time.

Also changed the debug name of the cubemap used for static lighting.

* Update changelog.

* Fixed an assert getting fired for the wrong reason.

* Added a new light layer debug mode (#5942)

* Moved lighting debug settings in containers

* Light layers debug mode

* Categories for Lighting Debug Panel Documentation

* Light layers debug mode documentation

* DebugUI.BitField now uses correct display names

* Added unit test scene

* Added changelog

* Revert "Added changelog"

This reverts commit a148fc2f97ef5288123f8f16485ba35f57b80f5e.

* Updated CHANGELOG

* Disable light layer debug mode after testing

* reset all debug display settings

* Renamed Shadow Layers option

* Editable layer color. Defaults to color blind friendly colors

* Fix when enabling an exclusive setting

* Updated screenshots with new colors

* Simplified variable API

* Renamed class

* Fix division by 0. Updated doc

Co-authored-by: Adrien <adrien.detocqueville@gmail.com>

* Hdrp/ssr toggle (#5996)

* Added an "enable" checkbox to the SSR volume component.

* Update changelog

* Fix build when not in editor (#6024)

* Fixed SSR in scene 1710 (#6028)

* Fix merge error

* Removed MSAA Buffers allocation when lit shader mode is set to "deferred only" (#6012)

* Removed MSAA Buffers allocation when lit shader mode is set to "deferred only".

* Removed MSAA SSS Buffer allocation when deferred only.

* Invalid cast for realtime reflection probes (case 1220504) (#6026)

* Invalid cast for realtime reflection probes (case 1220504)

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Aov Buffers tests (#6023)

* Deactivate Preview Camera for HDCameraEditor to prevent it from rende… (#6022)

* Deactivate Preview Camera for HDCameraEditor to prevent it from rendering in the render loop (case 1105163)

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Disable reflection probes section (#5994)

* Disable reflection probes in the renderer components

* Updated changelog

* Remove version guard for terrainDetailUnsupported

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Integrate first skeleton of post process in render graph. (#5856)

* Fixed execution error without raytracing

* Prepare Prepass refacto

* Another round of preparation

* Renamed XRPassScope to XRSinglePassScope

* RenderAfterPostProcess is now static

* Add AfterPostProcess to RenderGraph (WIP)

* AfterPostProcess implementation

* Fixed wrong RTHandle allocation

* Fixed light layers texture binding during deferred lighting pass

* Implemented Post Process Final Pass with RenderGraph

* Post merge fixes

* Fixed some issues with missing buffers in SSS and deferred lighting compute shaders.

* Fixed alpha in post processes

* Fix DXR Tests (#6073)

* Made ssr enable parameter true by default. (#6076)

* Add comment (#6056)

* Hdrp /tests/shuriken light module (#6021)

* Add shurikent light module test

* Fixed Simulate

* Fix texts and image ratio

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Hdrp/pt7 (#5831)

* Added support for anisotropy.

* Tidied the code up, plus moved to correlated G term for aniso GGX.

* Added anisotropic refractive sampling.

* Disable path tracing for the shading graph preview camera.

* Added support for alpha culling.

* Fixed issue with transmission rays.

* Updated Changelog.

* Added support for punctual and directional light cookies.

* Updated Changelog.

* Added support for area light cookies.

* Fixed bug with area cookies atlas not being properly generated when
rebuilding library.

* Made sure maxDepth > minDepth always, and added support for AO from mask.

* Added support for transparent shadows.

* Updated Changelog.

* Toggling path tracing on/off does not reset iteration anymore.

* Reverted change on enable, was causing minor issues.

* Made sure we don't have transparent behaviour when shader is set to
opaque.

* Minor changes.

* Tweaks on transparency behaviour.

* Updated changelog.

* Added path-tracing specific payload.

* Added support for iridescence.

* Updated Changelog.

* Added multiple scattering compensation for specular.

* Added Path tracing test.

* PT test part 2.

* Updated Changelog.

* Added proper area light range attenuation.

* Fixed issue with alpha clipping in ray-tracing.

* Cosmetic.

* Fix on the rect area light range.

* In the editor, dragging manipulators around now resets accumulation.

* Added material dirtiness tracking.

* Does not apply intensity clamping to camera rays.

* Reste PT iteration when saving a shader graph.

* Added dirtiness tracking for acceleration structure and lights.

* Added support for bg color.

* Minor change to progress bar display.

* Minor change to iteration counter, so that it never goes over the max.

* Updated path tracing test.

* Hdrp/rendergraph cleanup (#6083)

* Fixed execution error without raytracing

* Prepare Prepass refacto

* Another round of preparation

* Renamed XRPassScope to XRSinglePassScope

* RenderAfterPostProcess is now static

* Add AfterPostProcess to RenderGraph (WIP)

* AfterPostProcess implementation

* Fixed wrong RTHandle allocation

* Fixed light layers texture binding during deferred lighting pass

* Implemented Post Process Final Pass with RenderGraph

* Post merge fixes

* Fixed some issues with missing buffers in SSS and deferred lighting compute shaders.

* Fixed alpha in post processes

* Removed RenderGraphResource and RenderGraphMutableResource in favor of more explicit RendererListHandle and TextureHandle

* Fixed decal normal patch pass

* Fixed stencil resolve render pass

* Fixed RenderDBuffer render pass function capturing variables.

* Fixed wrong variable capture and restored ClearLightList to the render graph implementation of BuildGPULightList

* Various fixes of things that diverged compared to regular path.

* Unified renderer list and texture invalid handle error.

* Revert wrong change

* post merge fix

* Removed useless comment.

* Missing doc

* Hdrp /fix light prefab infinite reload on inspector gui (#6054)

* fix infinite reload loop for light prefab

* Update CHANGELOG.md

* Fixed an issue where fog sky color mode could sample NaNs in the sky cubemap (#6027)

* Fixed an issue where fog sky color mode could sample NaNs in the sky cubemap.

* Update changelog.

# Conflicts:
#	com.unity.render-pipelines.high-definition/CHANGELOG.md

* Fixed sampling of the sky texture in a more general way (not just fog)

updated tests screenshots as well.

* Missing screenshot

* Fixed the issue properly by generating 7 mips of convolution.

* Reverted screenshots

* Reverted useless change.

* Fix  culling group was not disposed error in the build (#5880)

* Fix culling group was not disposed error in build

* Fix culling was not disposed error in build

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix Material Samples : Revert correct GUIDs (#5875)

* Revert correct GUID

Change the GUID of the prefab to the correct one referenced in the scene

* Fix fern material GUID

* Hdrp/light multiplier (#6077)

* Allow the light dimmer to get values higher than one

* Changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Update documentation typo (#5860)

* Add warning and workaround instructions if XR single-pass is enabled after the first frame with XR SDK (#5853)

* added warning and workaround instructions if XR single-pass is enabled after the first frame with XR SDK

* edit VR doc

* Updated CHANGELOG.md

* Updated VR-Overview.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
Co-authored-by: Sharlene Tan <43795986+sharlenet@users.noreply.github.com>

* Remove info box on Visual Environment and replaced it with info on documentation (#6099)

* Remove info box and update documentation

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Update 9801_ShurikenLightModule.png

* Add missing exposure and mipmap sliders to the planar reflection probe preview (#5847)

* Added planar reflection probe preview mip and exposure sliders

* Updated changelog

* Disable mip map as we don't have them anymore

* Re-edited changelog

* Use SRP macros in shader

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix upgrade cookie planar size (#6104)

* Fixed the size of the planar reflection / cookie atlas after an upgrade of the HDRP asset

* Updated changelog

* Fixing merge issue for SSR transparent

* Fix universal and yamato after merge.

* fixuniversal after merge

* renormalize files

* Update 9801_ShurikenLightModule.unity

* Make isEditorCameraPreview and sky public (#6147)

* Update HDAdditionalCameraData.cs

* Update SkySettings.cs

* Update 9801_ShurikenLightModule.unity

* Update HDAdditionalCameraData.cs

* Update 9801_ShurikenLightModule.unity

* Fixing ray tracing tests (#6158)

* Fixed transparent SSR for shader graph. (#6163)

* - Fixed transparent SSR for shader graph.

* changelog

* Added old graphics tests and modifications (#6143)

* Update scenes

* update blendstates

* added OSX reference images

* win reference images

* fix lit light difference

* Update blendstates-c-lit-unlit

* disable check memory alloc due to ref probe issues

* update ref images

* rename test 1709 to 1711

* rename test 1709 to 1711 - bis

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix issue with blend mode and with keyword (#6164)

* Fixed an issue with emissive light meshes not being in the RAS (#6174)

* Hdrp/pt8 (#6090)

* Added support for anisotropy.

* Tidied the code up, plus moved to correlated G term for aniso GGX.

* Added anisotropic refractive sampling.

* Disable path tracing for the shading graph preview camera.

* Added support for alpha culling.

* Fixed issue with transmission rays.

* Updated Changelog.

* Added support for punctual and directional light cookies.

* Updated Changelog.

* Added support for area light cookies.

* Fixed bug with area cookies atlas not being properly generated when
rebuilding library.

* Made sure maxDepth > minDepth always, and added support for AO from mask.

* Added support for transparent shadows.

* Updated Changelog.

* Toggling path tracing on/off does not reset iteration anymore.

* Reverted change on enable, was causing minor issues.

* Made sure we don't have transparent behaviour when shader is set to
opaque.

* Minor changes.

* Tweaks on transparency behaviour.

* Updated changelog.

* Added path-tracing specific payload.

* Added support for iridescence.

* Updated Changelog.

* Added multiple scattering compensation for specular.

* Added Path tracing test.

* PT test part 2.

* Updated Changelog.

* Added proper area light range attenuation.

* Fixed issue with alpha clipping in ray-tracing.

* Cosmetic.

* Fix on the rect area light range.

* In the editor, dragging manipulators around now resets accumulation.

* Added material dirtiness tracking.

* Does not apply intensity clamping to camera rays.

* Reste PT iteration when saving a shader graph.

* Added dirtiness tracking for acceleration structure and lights.

* Added support for bg color.

* Minor change to progress bar display.

* Minor change to iteration counter, so that it never goes over the max.

* Updated path tracing test.

* Added finer estimates of lights during global pdf computation.

* Refined light estimates during light list creation.

* Updated PT test after changes to light sampling.

* Minor change on samples count dirtiness handling.

* Cosmetic, plus include guards.

* Separated the path intersection structure from the ray tracing one.

* Cosmetic, plus taking SSS weight into account to reduce diffuse.

* Added SSS support for path tracing, and made some minor changes to the
ray-traced version.

* Minor code refactor.

* ...

* ...

* Post-merge cleansing.

* Fixed minor issues in CreateMaterialData().

* Fixed issue with test framework and resolution change.

* Avoid error msg on null instance in PathTracing.cs.

* Pathtracer new automated scenes (#6053)

* Add global GI automated test scene

* Adding transparency test scene

* Update max samples of transparency scene to 32

* Added area light test scene / Updating reference image

* Transparency scene settings + ref image

* Scene added to build (Editor build settings)

* Update tranparency image ref

* Updating scene to 1 spp and ref image

Also moving the asset to common assets folder

* Re-added support for unlit shader graph.

Co-authored-by: remi-chapelain <57442369+remi-chapelain@users.noreply.github.com>

* Update RTSSS Screenshots (#6177)

* Fix DX12 and DXR Player build and Updating the test screenshots for DXR player tests (#6130)

* Fix DX12 and DXR Player build
Updating the test screenshots for DXR player tests

* fix shader graph case

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Update CHANGELOG.md

* Fix shader compilation issue with Vulkan and Raytracing (#6181)

* update path tracing and 1219 test

* Fix hdasset migration code not being called after a package upgrade (#6179)

* Fix the HDRP asset migration code not being called after a package upgrade

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix custom pass out of bounds (#6176)

* Fix draw renderers custom pass out of bound exception

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix PBR master node (#6182)

* Fix PBR shader render states

* Updated changelog

* Fix some typos in the debug menu (#6097)

* fix some typos

* Revert typo fix that break public API

* Changelog

* Add regenerated shader includes

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed ray traced point and spot lights shadows not rejecting history when semi-transparent or colored. (#6108)

* Fixed ray traced point and spot lights shadows not rejecting history when semi-transparent or colored.

* Removing unwanted skip closest hit

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Diffuse Shadow Denoiser Improvement. (#5851)

* - Added a new mode that improves the filtering of ray traced shadows (directional, point and spot) based on the distance to the occluder.
Added new test scenes to test the denoiser improvement

* Update changelog

* Fix an issue with the shadow denoiser grabiing data outside of the screen

* changing light parameter to internal

* Fixed a warning due to StaticLightingSky when reloading domain in some cases. (#6193)

* Fixed the MaxLightCount being display when the light volume debug menu is on ColorAndEdge. (#6211)

* Fixed the MaxLightCount being display when the light volume debug menu is on ColorAndEdge.

* Update com.unity.render-pipelines.high-definition/CHANGELOG.md

Co-Authored-By: Motiejus Viltrakis <36502659+iM0ve@users.noreply.github.com>

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
Co-authored-by: Motiejus Viltrakis <36502659+iM0ve@users.noreply.github.com>

* Update documentation to mention more explicitely the lack of support of vertex animation (#6207)

* Update documentation to mention more explicitely the lack of support of vertex animation

* Update Ray-Tracing-Getting-Started.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Make subsection in decal debug menu to specify "affect transparents"  (#6200)

* Make subsection in decal debug menu

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Added coverage for Enabled GPU Instanced material (#6183)

For light layers automated test

* Support cookie on light backing for Disc Area Light (#6138)

* Added support for light cookies in the baking backends.

* Updated light conversion script to reflect the latest changes made to the API.

* Added support for directional light cookie sizes.

* Added support for cookies on rectangular area lights.

* Enable Area::Disc Light on backing with cookie

* Update ChangeLog

* Update CHANGELOG.md

Co-authored-by: uygar <uygar@unity3d.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Hdrp /lookdev/fix crash on adding volume as viewed game object (#6129)

* Update Volume's Layer when moving them to LookDev's stage

* Update CHANGELOG.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Add smoothness remark (#6226)

* Removed unexpected file

* Removed legacy VR code from HDRP (#5923)

* Removed legacy VR code

* do not set CullingOptions.Stereo with xrsdk

* re-add and tag previous function signature as obsolete

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Improve light clipping and culling #2 (#4711)

* Improve area light culling

* Simplify

* Clip box lights at the attenuation range

* Save 1x ALU

* Add missing feature flags

* Chanelog

Co-authored-by: EvgeniiG <7ee2cc898cca1b5fc49df740c2081dfc681e0a28>
Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Hdrp/fix/decal material ui errors (#6225)

* Fixed error in the console when switching shader to decal in the material UI

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fix z-fighting in sceneview when scene lighting is off (#6213)

* Do not override the depth state of transparent materials in RenderDebugView

* Changelog

* Changelog - add case number

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Mention default post processing in default volumes. (#6232)

* Fix cubemap inspector so that thumbnail for cubemap work (#6231)

* Fix for missing thumbnail on cubemaps

* Changelog

* Better default angles

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* fix ray tracing with VR single-pass (#6242)

* - Fix an exception in ray tracing that happens if two LOD levels are using the same mesh renderer. (#6198)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* update location of reference screenshots after merge

* Added debug exposure to light hierarchy debug. (#6215)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* - Rejecting history for ray traced reflections based on a threshold evaluated on the neighborhood of the sampled history. (#6251)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Hdrp/pt9 (#6184)

* Added support for anisotropy.

* Tidied the code up, plus moved to correlated G term for aniso GGX.

* Added anisotropic refractive sampling.

* Disable path tracing for the shading graph preview camera.

* Added support for alpha culling.

* Fixed issue with transmission rays.

* Updated Changelog.

* Added support for punctual and directional light cookies.

* Updated Changelog.

* Added support for area light cookies.

* Fixed bug with area cookies atlas not being properly generated when
rebuilding library.

* Made sure maxDepth > minDepth always, and added support for AO from mask.

* Added support for transparent shadows.

* Updated Changelog.

* Toggling path tracing on/off does not reset iteration anymore.

* Reverted change on enable, was causing minor issues.

* Made sure we don't have transparent behaviour when shader is set to
opaque.

* Minor changes.

* Tweaks on transparency behaviour.

* Updated changelog.

* Added path-tracing specific payload.

* Added support for iridescence.

* Updated Changelog.

* Added multiple scattering compensation for specular.

* Added Path tracing test.

* PT test part 2.

* Updated Changelog.

* Added proper area light range attenuation.

* Fixed issue with alpha clipping in ray-tracing.

* Cosmetic.

* Fix on the rect area light range.

* In the editor, dragging manipulators around now resets accumulation.

* Added material dirtiness tracking.

* Does not apply intensity clamping to camera rays.

* Reste PT iteration when saving a shader graph.

* Added dirtiness tracking for acceleration structure and lights.

* Added support for bg color.

* Minor change to progress bar display.

* Minor change to iteration counter, so that it never goes over the max.

* Updated path tracing test.

* Added finer estimates of lights during global pdf computation.

* Refined light estimates during light list creation.

* Updated PT test after changes to light sampling.

* Minor change on samples count dirtiness handling.

* Cosmetic, plus include guards.

* Separated the path intersection structure from the ray tracing one.

* Cosmetic, plus taking SSS weight into account to reduce diffuse.

* Added SSS support for path tracing, and made some minor changes to the
ray-traced version.

* Minor code refactor.

* ...

* ...

* Post-merge cleansing.

* Fixed minor issues in CreateMaterialData().

* Fixed issue with test framework and resolution change.

* Avoid error msg on null instance in PathTracing.cs.

* Pathtracer new automated scenes (#6053)

* Add global GI automated test scene

* Adding transparency test scene

* Update max samples of transparency scene to 32

* Added area light test scene / Updating reference image

* Transparency scene settings + ref image

* Scene added to build (Editor build settings)

* Update tranparency image ref

* Updating scene to 1 spp and ref image

Also moving the asset to common assets folder

* Fog support WIP...

* Added support for fog attenuation.

* Cosmetic.

* Set a maxSampleCount to 1 for tests only in play mode.

* Updated Changelog.

* Cosmetic.

* Take min and max depth into account for fog color.

* Make sure we are inside the light cluster when buidling light list.

* Simplified signature of RenderPathTracing() func, replaced
RaytracingFrameIndex with RaytracingSampleIndex.

* Taking max fog distance into account.

* Fog max dist part2.

* Added a new test scene for the fog

* move reference screenshots

Co-authored-by: remi-chapelain <57442369+remi-chapelain@users.noreply.github.com>
Co-authored-by: Remi Chapelain <remi.chapelain@unity3d.com>
Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Hdrp/volume debug (#6058)

* New widget DebugUI.Table

* Opened some Volume related API

* New volume debug panel

* Fixed a bug when debugging editor cameras

* Fixed table border color. Updated documentation

* Handles inactive and removed components

* Don't show deprecated volume components. Sort by name

* Revert unwanted modification

* Handle disabled volumes

* Hides volumes that don't affect the final value

* Code documentation

* Add range check

* Fix player build

* Fix volume influence detection

* Refresh display when components changes

* Fix error on player build

* Reduce popping

* Use editor camera as anchor point

* Select all layers for the scene camera

* Un-open profileRef API

* Remove ref to profileRef

* Proper component name, show text for non supported parameters

* Fix profile duplication when using volume debug menu

* Updated unsupported parameters message. Show a name as fallback if it exists

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixing HDRP_DXR_TEST not having local package at right location (#6107)

* Clearer naming of tile and cluster categories for environment lights (#6227)

* Rename Environment to Probes

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed an issue with refraction model and ray traced recursive rendering (case 1198578). (#6267)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* fix for Fogbugz 1214609 - HDRP Wizard addively increases the Light Intesity instead of setting it (#6266)

* Fixed an issue where a dynamic sky changing any frame may not update the ambient probe. (#6235)

* Fixed an issue where a dynamic sky changing any frame may not update the ambient probe.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Add XR setting to control camera jitter for temporal effects (#6259)

* add XR setting to control camera jitter for temporal effects

* cleanup unused code path

* revert changes to scenes

* Deprecate Utilities namespace (#6219)

* (case 1204677) Copied namespace Utility to UnityEngine.Rendering and made it obsolete.

* Updated changelog

* Updated comment

* Updated comment

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Remove deprecated namespace Utilities. [Requires #6219] (#6220)

* (case 1204677) Copied namespace Utility to UnityEngine.Rendering and made it obsolete.

* Updated changelog

* Updated comment

* Removal of deprecated API

* Updated changelog

* Remove deprecated api

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Fix issue on thumbnail generation so that no error on new project and thumbnail are generated at first import (#6265)

* Fix issue with static preview for cubemap being called without a material initialized

* Fix the issue preventing thumbnail to be preserved upon reimport on load

* Comment

* changelog

* Change asset swap to legacy method

* comment and white line removal

* Fix for baked probe import cycle

* Added comment

* Oops missing a file

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Add custom pass opaque rendering error message (#6330)

* Added an error message when rendering opaque objects with an HDRP asset in DeferredOnly mode

* Updated custom pass doc

* Updated changelog

* Fix issue of debug display variant with shader graph not compiling (#6325)

* move #define DEBUG_DISPLAY into debugdisplay.hlsl

* fix builtindata

* fix includes

* fix shader

* fix XR culling with multiple cameras (#6314)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* fix XR single-pass with Mock HMD plugin (#6313)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* fix sRGB mismatch with XR SDK (#6311)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Partial fix LookDev opened when CoreRP package reimported (#6291)

* Fix null texture usage happening on CoreRP upgrade

* Partially fix garbage collected stylesheet issue.

(Need more work on UIElement side, see case 1228706 )

* Update CHANGELOG.md

* Clean log

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Hdrp/fix default volume switch (#6250)

* Fixed an issue where default volume would not update when switching profile.

* Update changelog

* Fixed an issue when setting the default volume for the first time where the hdrp asset would not be dirtied

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Reflection probe cameras are now created with the correct type (#6245)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed an issue where AO override would not override specular occlusion. (#6222)

* Fixed an issue where AO override would not override specular occlusion.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Fixed an issue where Volume inspector might not refresh correctly in some cases. (#6252)

* Fixed an issue where Volume inspector might not refresh correctly in some cases.

* Update changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* render XR mirror view only for camera with no RT (#6306)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Split set rendering feature set and API validity check (#6301)

* Split set rendering feature set and API validity check

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Hdrp/probe scale 1219246 (#6288)

* Fix when scale down < 0 all direction of box Influence Volume

* Update Change log

* Hdrp/fix/particle light shadows (#6111)

* Tried to fix particle light shadows

* Fixed particle shadows

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Core, ShaderGraph: Make PositivePow more robust vs NaN (like in postproc) at the cost of a slight behavior change for cases where pow(0,y) for 0 < y < 1 is expected to return 0.

Uses the modified PositivePow to also fix a NaN issue in the triplanar node: The NaN guard couldn't work as we compile with /Gis and as pow() is considered returning >= 0, the max( ,0) guard was optimized out.
The new PositivePow(base, exp) reaching 1 for parameters (base, exponent) == (0, blend -> 0) is a better solution in any case than returning 0 as the NaN guard would.

List of potentially affected files checked to be ok:

core/ShaderLibrary/BSDF.hlsl
core/ShaderLibrary/color.hlsl
high-definition/Runtime/Lighting/Lightloop/ClusteredUtils.hlsl
high-definition/Runtime/Lighting/ScreenSpaceLighting/GTAOCommon.hlsl
(* actually more desirable for this edge case, as a black value is considered neutral for OutputFinalAO() )

(The following just used PositivePow for gamma conversion
SubpixelMorphologicalAntialiasing.hlsl
SimpleLit.hlsl
DebugViewTiles.shader
DebugFullScreen.shader)

* Add changelog entry.

* Recording of accumulation motion blur and path tracing (#6114)

* Pt and accumulation motion blur recording

Fix merge issues

Fix merge issues #2

Bugfix: accumulation with one sample

Chengelog

Don't set the fixed-time in the subframe manager - should be set in the recorder

Properly set and reset the fixed time

Updated documentation

Small fix to make physics simulation work with scaled time / accumulation mb

Post rebase fixes and disable accumulation when using only one sub-frame

* Fix post merge issues

* hdrp resources asset file

* remove duplicate code

* Move most compute shaders to use multi_compile API (#6307)

* Squashed commit of the following:

commit ed9e485efc69a7949e34f0512666d522470dc73e
Author: FrancescoC-Unity <francescoc@unity3d.com>
Date:   Fri Mar 20 11:47:59 2020 +0100

    Revert "Squashed commit of the following:"

    This reverts commit 0dd46577be82abeaefc839cbcd9f3875b05d48e6.

commit 0dd46577be82abeaefc839cbcd9f3875b05d48e6
Author: FrancescoC-Unity <francescoc@unity3d.com>
Date:   Fri Mar 20 10:39:28 2020 +0100

    Squashed commit of the following:

    commit 0e1815814ce8204cfa42ae3050ba655fe769c550
    Merge: ac6809ec032 2b018dfe8a9
    Author: Sebastien Lagarde <sebastien@unity3d.com>
    Date:   Thu Mar 19 18:19:45 2020 +0100

        Merge branch 'master' into HDRP/staging

    commit 2b018dfe8a9f5f304e4b95d6279dda60f632c9dc
    Author: sebastienlagarde <sebastien@unity3d.com>
    Date:   Thu Mar 19 18:19:02 2020 +0100

        Merge Hdrp/staging (#6293)

        * Custom pass cleanup (#5507)

        * Fix custom pass cleanup issue with multiple volumes

        * Updated changelog

        * Delay discard of fragments during decal projection (#5283)

        * Delay discard of fragments during decal projection

        Metal Shading Language declares that fragment discard invalidates
        derivatives for the rest of the quad, so we need to reorder when
        we discard during decal projection, or we get artifacts along the
        edges of the projection (any partial quads get bad partial derivatives
        regardless of whether they are computed implicitly or explicitly).

        * Better re-arrangement of decal code

        * Update TerrainLitPasses.hlsl

        * Update TerrainLitPasses.hlsl

        * Update TerrainLitPasses.hlsl

        * Update ShaderPassDecal.hlsl

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fixing unnecessary memory allocations in the ray tracing cluster build and Updating the screen shots for the ray tracing tests (#5465)

        * Fixing unnecessary memory allocations in the ray tracing cluster build
        Updating the screen shots for the ray tracing tests

        * Update test scene and screenshots

        * - Discarding the ray tracing history for AO, reflection, diffuse shadows and GI when the viewport size changes.
        - Update and disable some tests that still  need to be updated

        * Add a counter for ray tracing frame index and update screenshots

        * Fixing the Area Shadows Denoiser Test

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Change the default volume used by the ray tracing tests to make them work again (#5510)

        * Change the default volume used for the ray tracing tests, fixes the tests back.

        * Fix access to the ray tracing frame index in ray tracing ambient occlusion (doesn't change behavior)

        * Missing term in the ray tracing frame index access (#5511)

        * Fix colum headers (#5517)

        * Fix colum headers

        * Update CHANGELOG.md

        * Rename post formats (#5505)

        * Renamed the post processing format to the new convention

        * Updated changelog

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fixed the first frame flash with auto exposure (#5491)

        * Fixed flashes with low and high exposure scenes when Automatic Exposure is in use

        * Moved postfx history reset to per-camera reset

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Update DefaultSettingsVolumeProfile.asset

        * Hdrp/small enhencements for DXR (#5493)

        * Add Warning for DXR and AsyncExecution in FrameSettings

        * move restarting at end of all fix in wizard for DXR

        * Update CHANGELOG.md

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Hdrp/update default scenes (#5485)

        * Replace default scenes with scene prepared for scene-template

        * Update of DefaultSettingsProfile

        * Update DXR scene

        * Add ScreenSpaceShadow to Camera's default FrameSettings

        * Update CHANGELOG.md

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Refactoring pre-existing materials to share code between rasterization and ray tracing (#5441)

        * Refactoring pre-existing materials to share code between rasterization and ray tracing
        Update the test scene

        * update changelog

        * Changing the color of an unlit in the reflection test scene

        * review corrections

        * Fixing unlit shader graph

        * Fix specular AA related issue

        * Update the reflection test

        * Fix an issue with debug display for ray tracing shaders
        Always use ray tracing frame index 0 for ray tracing tests
        Update tests screenshots
        Update ray traced reflection test scene

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Hdrp/staging thin (#5509)

        * Adding a REFRACTION_THIN model.

        * Fixed thin distance.

        * ... and fixed it.

        * Updated changelog, removed unused REFRACTION attrs from Fabric template.

        * Added a REFRACTION_THIN_DISTANCE macro.

        * Finished support for thin refraction.

        * Fixed LitTesselation (was missing thin refraction model).

        * fix issue when merging Refactoring of DoAlphaTest

        * Fixed an issue where passing a null ProfilingSampler would cause a null ref exception. (#5555)

        * Fixing the area shadow denoised test (#5544)

        * Fix leak in Sky when matcap view (#5556)

        * skip pre render sky in matcap view

        * changelog

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fix compilation issues of ApplyExposure on platforms that don't support VR (#5575)

        * Fix

        * changelog

        * Remove Preview from physically based sky

        * HDRP asset migration (#5580)

        * Initialize the HDRP asset version to the latest one so new assets are not migrated

        * Updated changelog

        * Hdrp/remove wind resources (#5578)

        * Remove wind resources

        Remove wind resources no longer used and containing big files

        * Update changelog

        * revert: Hdrp/update default scenes (#5485)

        * Fix issue with missing texture in test

        * Disable POM test in 1708 SG_OnSG as it is unstable

        * Add missing texture in runtime test

        * update caption for geometric normal debug in forward

        * add missing texture to runtime test

        * Create Textures.meta

        * fix SG on decal SG

        * Fixed an issue where ambient occlusion and screen space reflections editors would generate null ref exceptions when HDRP was not set as the current pipeline. (#5577)

        * Fixed a null reference exception in the probe UI when no HDRP asset is present. (#5582)

        * Fixed a null reference exception in the probe UI when no HDRP asset is present.

        * Indentation

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fix custom pass outline (#5590)

        * Fixed custom pass outline resolution screen resolution dependent

        * Updated changelog

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fixed a null reference exception in the HDRI Sky editor when no HDRP asset is present. (#5596)

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fix decal orientation when created from script. (#5592)

        * Fixed all migration classes to default to latest version so that Decals created by script to get migrated.

        Fixed decal created through context menu so that they get the proper rotation convention.

        * Update changelog

        * Moved the GetEnumLastValue to TypeInfo class

        * Updated super old test scenes to the proper latest version for decals

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Refactor of HDCamera (accesibility mostly) [Skip CI] (#5548)

        * Refactor of HDCamera

        - Made internal/private APIs that should not have been public
        - Fixed naming convention for private members
        - Moved everything by accessibility for clarity (public, internal, then private)

        * Added Doc and returned some API public.

        * Fix visibility of Density Volumes in reflections [Skip CI] (#5589)

        * Oblique projection frustum fix, first try

        * HDCamera frustum now recalculates near and far plane to avoid issues with oblique projection matrices.

        * Update changelog

        * Added comments

        * Indentation

        * Fixed camera relative position of frustum

        * Indentation

        * Fixed a null reference exception in Path Tracing, Recursive Rendering and raytraced Global Illumination editors when no HDRP asset is present. (#5597)

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fix ray tracing tests and add a test scene for lights and cookies in ray tracing (#5604)

        * expose StartSinglePass() and StopSinglePass() as public interface for XRPass (#5605)

        * Add missing custom pass API documentation (#5530)

        * Add missing custom pass API documentation

        * Fix doc spells and grammar

        * Stencil Refactor and Material migration fixes (#5581)

        * Remove leftover code

        * commit to switch machine

        * Remove hard coded stencil values in shaders

        * clear stencil

        * tmp commit, start of splitting decal in dbuffer and normal patchup

        * Make decal patching up run after GBuffer

        * Remove hardcoded value for SSS split lighting

        * Tmp commit to switch branch

        * Finalize build coarse stencil (with debug leftover and render graph NOT handled)

        * The AA bits (the easy one :-) )

        * split in two enums

        * Distortion vectors bit sorted

        * SSR bit

        * Motion vector bit

        * decals bit

        * Lighting bits

        * Use HTile for SSR

        * HTile SSS -> Incomplete, verify and test.

        * SSS fixes, but still not working (probably not HTile related, but main stencil)

        * Make decal patch normal work and remove stencil bit

        * some leftover fixes

        * was commited by mistake

        * Update materials

        * Revert "Update materials"

        This reverts commit 4a0de82ef51750b77546020d77ad6b5d773e60af.

        * Fix issues with MSAA and with migration

        * Forgot this out

        * update materials and maps

        * default materials

        * don't have SSR on unlit

        * Fix some leftovers

        * Renaming

        * Revert "update materials and maps"

        This reverts commit 103f1cb71d8fffa49b0c2ef57f1b41b36d0a3dbf.

        * Revert "default materials"

        This reverts commit 978740acd825562717a01437dcc0c74fc4cfefb0.

        * Fix migration

        * white line

        * Fix migration

        * Add render queue overide to the material placer.

        Also add PackageInfo.cs to HDRP, so the graphic tests can call it's internal methods and objects.

        * Default material post migration

        * com.unity.testing.hdrp post reimport

        * Updated materials from test

        * Disable tests that are to be updated or not needed anymore

        * Fix VFX issues  (To be fixed better by @PaulDemeulenaere )

        * Lit hardcoded default was off

        * Update VFX Test materials ( @PaulDemeulenaere for awareness )

        * Fix issue with stencil in TAA

        * Revert lighting data

        * revert light map data

        * Revert other lighting asset

        * Cleanup post processor.

        * Update DXR test material

        * Update commnets

        * Early (need testing) new migration workflow

        * Revert "Early (need testing) new migration workflow"

        This reverts commit 2db025002d66165dd00e90f5f5d3c944ed53f361.

        * Update post processor

        * Add manual option to migrate

        * Add dialog box

        Co-authored-by: RemyUnity <32760367+RemyUnity@users.noreply.github.com>

        * Push updated hdrp version in test project (#5617)

        * Push m_LastMaterialVersion update

        * Dont open dialog on yamato

        * Update test projects with recent stencil refector PR (#5618)

        * Update runtime test project

        * Create HDRPProjectSettings.asset

        * update DXR project

        * Revert "update caption for geometric normal debug in forward"

        This reverts commit 150d68279b891529be272b37f374c36b879646f4.

        * Run reimport during update (to avoid unwanted extra dialog during dialog box) (#5620)

        * Make user stencil bits public (#5616)

        * Expose bits to user

        * Update documentation

        * Update HDStencilUsage.cs

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Implement history rejection based on object velocity (#5532)

        * Implement history rejection based on object velocity

        * Update changelog

        * Fix an issue with ambient occlusion denoising being broken after adding the history rejection feature
        Adding the GPU Light type for history validation and rejection

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fixed initial state of material created through the context menu. (#5603)

        * Fixed an issue where materials newly created from the contextual menu would have an invalid state, causing various problems until it was edited.

        * Forgot DecalUI (for non shader graph decals)

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Update HDLightUI.Skin.cs

        * Cookie and planar atlas (#5518)

        * Added support for cookie atlas

        * Begin to move planar reflection into atlas

        * Added texture atlas for planar reflection probe plus a limit to on screen planar probes

        * Removed debug log

        * Fixed planar probe atlas scale issue and useless mipmap generation of the atlas

        * Refactor Texture2D atlas

        * Move ScaleBias for planar probes to a separate list

        * Fix cookie mode for directional lights

        * Added error log for non square cookie textures in the atlas

        * Fix merge

        * Fixed cookie atlas

        * Trying to fix area light cookies

        * Fixed area light cookie

        * Disable mipmap for non area light cookies

        * Added cookie atlas format control + fixed size warnings in HDRP cookie ui

        * Add resolution in Capture Settings reflection probe drawer

        * Removed warnings

        * Added the point light cookie texture array in the debug menu

        * Fix cookies in ray tracing + celestial body texture

        * Update dynamic light cookie screenshot

        * Update Animated cookie test + fix reflection probe texture format

        * Fix area light cookie

        * Update HDRP asset cookie and planar atlas sizes

        * Increase cookie atlas size for area light test

        * Simplify code

        * Fix cookie mip clamp

        * Fixed compilation and CG alloc

        * Added atlas layouting when there is no more space

        * Fix directional light cookie

        * Updated reference image of cookie area lights

        * Fix hardcoded format and cookie layout

        * Remove useless mip update

        * Fix area light cookie x flip

        * Added the debug exposure option for debug planar reflection atlas

        * reverted the fix for area light cookie x flip

        * Tried to simplify the code of the atlas

        * Update reference image

        * Added an error when max planar reflection probe on screen is reached

        * Fixed space parenthesis

        * Fixed mipmap not updated properly and area light cookie convolution temp texture format

        * Fixed atlas reset mips

        * Update tooltip and fixed cookie insertion order when there is no more space in the atlas

        * Enable exposure on cookie atlas debug

        * Fix debug overlap

        * Update reference image

        * Added migration code for the cookie atlas size and fixed point light cookie debug exposure

        * Added planar atlas size upgrade code

        * Updated planar reflection atlas message

        * Fixed resolution dependent cookie mip maps

        * Updated changelog

        * Fixed cookies for ray tracing

        * Fix cookie in the ray tracing light loop requested without being reserved

        * Clamp UV when doing the area light convolution

        * Update reference images

        * Remove debug symbols

        * Fixed area light convolution UV limit

        * Fixed half pixel clamp and updated reference images

        * Fixed planar reflection mip map edge bleeding and update reference images

        * Updated more image reference

        * Updated DXR cookie test scene

        * Fix default material transparent created with ZWrite enabled (#5621)

        * Fixed transparent material craeted with ZWrite enabled

        * Updated changelog

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Hdrp/fix decal gizmo mouseover (#5626)

        * Remove controlID on projection direction of DecalProjector that conflict with other handles

        * Update CHANGELOG.md

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Hdrp/smallfixes lookdev (#5619)

        * Fix zoom being stuck around 0

        * fix crash forbiding view manipulation while using directly hdri without passing by an environment

        * Fix hitch in FPS displacement mode

        * Fix when user destroy the EnvironmentLibrary being used.

        * Update CHANGELOG.md

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Mask was never set for some debug pixel deferred shaders [Skip CI] (#5627)

        * Mask was never set

        * changelog

        * Added comments

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Fixed an issue where creating decals at runtime could cause a null reference exception. (#5594)

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Make APIs internal when they should be - 1 - [Skip CI] (#5531)

        * First pass of making APIs internal when they should be.

        * Indentation

        * Compilation fixes + review feedback.

        * Make APIs internal when they should be - 2 - [Skip CI] (#5533)

        * First pass of making APIs internal when they should be.

        * Indentation

        * WIP

        * Missing file

        * More

        * Revert some changes based on review feedback

        * Compilation fix

        * Compilation fixes + review feedback.

        * Updated HDUtils accessibility

        * More editor internals.

        * Better (not hardcoded) stencil handling in VFX (#5624)

        * Stencil update for vfx

        * Fix issues

        * fix missing templates

        * Avoid displaying material upgrader dialog on new project (#5631)

        * Don't run dialog on new project creation

        * skip only on first creation

        * Check file existence before showing dialog

        * typo

        * Push test materials after ZWrite PR (#5632)

        * Update HDRP_Test project

        * Update DXR test assets

        * Update run time tests

        * Discard invalid pixels when doing deferred lighting in compute (for camera stacking) (#5339)

        * Discard invalid pixels when doing deferred lighting in compute (as required for camera stacking)

        Small comment modification

        Update changelog

        * Use stencil buffer (instead of normals) to discard pixels in deferred compute

        * Remove not required if statement when binding the stencil

        * Small fixes to API visibility. (#5637)

        * Fixed some more public APIs to internal.

        * Made hasCustomRender public again.

        * Moved the tier defining from the asset to the concerned volume components. (#5519)

        * Alpha post-processing bugfixes and improvements (#5512)

        * Bug fix for post processing alpha with chrommatic aberation + minor fixes

        * Avoid double blending in DOF

        * Unit tests for alpha post-processing (TAA/DoF)

        Vulkan test images

        Vulkan meta files

        * Fix runtime tests (#5639)

        * Update runtime test screenshots

        * Update planar resolution

        * Add test (#5641)

        * fix material and project settings for VFX (#5642)

        * Revert change to GBuffer (normalbuffer usage) as it broke the raytracing code

        * Fix various issues with time and animated materials (#5480)

        * Fix various issues with time and animated materials

        * Changelog

        * Add getters

        * Only update time once per frame

        * Fix animation in reflection

        * Fix null ref exception

        * Re-applied code after impossible merge.

        * Comment change

        * Remove commented code.

        Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * fix graphic test (#5651)

        * renaming test 1901 -> 1451 and 1709 -> 1710

        * Update EditorBuildSettings.asset

        * Update 1710_Decals_Normal_Patch.png

        * update screenshots

        * update scene backgroud

        * Update manifest.json

        * Update decal patch screenshots

        * update 4052_TAA

        * Changing the tier system for a preset mode system and removing unnecessary options (#5646)

        * Changing from a tier management to a "mode" management for reflection and GI and removing the ability to enable/disable deferred and ray bining (they are now implied by performance mode)

        * Update the scene scenes

        * Update changelog

        * Fixing an instability with the light shadows in ray tracing

        * Update to light explorer (#5615)

        - Fixed SkyType display when no Visual Environment is present
        - Changed fog display to reflect the updated fog system
        - Changed Global to "Mode" as it is in Volume UI now.

        Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

        * Update 1710_Decals_Normal_Patch.png

      …
  • Loading branch information
1 parent c843738 commit bf0ae92
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
45 changes: 45 additions & 0 deletions com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,51 @@ uint FastLog2(uint x)
// Note: https://msdn.microsoft.com/en-us/library/windows/desktop/bb509636(v=vs.85).aspx pow(0, >0) == 0
TEMPLATE_2_REAL(PositivePow, base, power, return pow(abs(base), power))

// SafePositivePow: Same as pow(x,y) but considers x always positive and never exactly 0 such that
// SafePositivePow(0,y) will numerically converge to 1 as y -> 0, including SafePositivePow(0,0) returning 1.
//
// First, like PositivePow, SafePositivePow removes this warning for when you know the x value is positive or 0 and you know
// you avoid a NaN:
// ie you know that x == 0 and y > 0, such that pow(x,y) == pow(0, >0) == 0
// SafePositivePow(0, y) will however return close to 1 as y -> 0, see below.
//
// Also, pow(x,y) is most probably approximated as exp2(log2(x) * y), so pow(0,0) will give exp2(-inf * 0) == exp2(NaN) == NaN.
//
// SafePositivePow avoids NaN in allowing SafePositivePow(x,y) where (x,y) == (0,y) for any y including 0 by clamping x to a
// minimum of FLT_EPS. The consequences are:
//
// -As a replacement for pow(0,y) where y >= 1, the result of SafePositivePow(x,y) should be close enough to 0.
// -For cases where we substitute for pow(0,y) where 0 < y < 1, SafePositivePow(x,y) will quickly reach 1 as y -> 0, while
// normally pow(0,y) would give 0 instead of 1 for all 0 < y.
// eg: if we #define FLT_EPS 5.960464478e-8 (for fp32),
// SafePositivePow(0, 0.1) = 0.1894646
// SafePositivePow(0, 0.01) = 0.8467453
// SafePositivePow(0, 0.001) = 0.9835021
//
// Depending on the intended usage of pow(), this difference in behavior might be a moot point since:
// 1) by leaving "y" free to get to 0, we get a NaNs
// 2) the behavior of SafePositivePow() has more continuity when both x and y get closer together to 0, since
// when x is assured to be positive non-zero, pow(x,x) -> 1 as x -> 0.
//
// TL;DR: SafePositivePow(x,y) avoids NaN and is safe for positive (x,y) including (x,y) == (0,0),
// but SafePositivePow(0, y) will return close to 1 as y -> 0, instead of 0, so watch out
// for behavior depending on pow(0, y) giving always 0, especially for 0 < y < 1.
//
// Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/bb509636(v=vs.85).aspx
TEMPLATE_2_REAL(SafePositivePow, base, power, return pow(max(abs(base), real(REAL_EPS)), power))

// Helpers for making shadergraph functions consider precision spec through the same $precision token used for variable types
TEMPLATE_2_FLT(SafePositivePow_float, base, power, return pow(max(abs(base), float(FLT_EPS)), power))
TEMPLATE_2_HALF(SafePositivePow_half, base, power, return pow(max(abs(base), half(HALF_EPS)), power))

float Eps_float() { return FLT_EPS; }
float Min_float() { return FLT_MIN; }
float Max_float() { return FLT_MAX; }
half Eps_half() { return HALF_EPS; }
half Min_half() { return HALF_MIN; }
half Max_half() { return HALF_MAX; }


// Composes a floating point value with the magnitude of 'x' and the sign of 's'.
// See the comment about FastSign() below.
float CopySign(float x, float s, bool ignoreNegZero = true)
Expand Down
1 change: 1 addition & 0 deletions com.unity.shadergraph/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed a bug where the `Position` node would change coordinate spaces from `World` to `Absolute World` when shaders recompile. [1184617](https://issuetracker.unity3d.com/product/unity/issues/guid/1184617/)
- Fixed a bug where instanced shaders wouldn't compile on PS4.
- Optimized loading a large Shader Graph. [1209047](https://issuetracker.unity3d.com/issues/shader-graph-unresponsive-editor-when-using-large-graphs)
- Fixed NaN issue in triplanar SG node when blend goes to 0.

## [7.1.1] - 2019-09-05
### Added
Expand Down
2 changes: 1 addition & 1 deletion com.unity.shadergraph/Documentation~/Triplanar-Node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

Triplanar is a method of generating UVs and sampling a texture by projecting in world space. The input **Texture** is sampled 3 times, once in each of the world x, y and z axises, and the resulting information is planar projected onto the model, blended by the normal, or surface angle. The generated UVs can be scaled with the input **Tile** and the final blending strength can be controlled with the input **Blend**. The projection can be modified by overriding the inputs **Position** and **Normal**. This is commonly used to texture large models such as terrain, where hand authoring UV coordinates would be problematic or not performant.
Triplanar is a method of generating UVs and sampling a texture by projecting in world space. The input **Texture** is sampled 3 times, once in each of the world x, y and z axes, and the resulting information is planar projected onto the model, blended by the normal, or surface angle. The generated UVs can be scaled with the input **Tile** and the final blending strength can be controlled with the input **Blend**. **Blend** controls the way the normal affects the blending of each plane sample and should be greater or equal to 0. The larger **blend** is, the more contribution will be given to the sample from the plane towards which the normal is most oriented. (The maximum blend exponent is between 17 and 158 depending on platform and the precision of the node.) A blend of 0 makes each plane get equal weight regardless of normal orientation. The projection can be modified by overriding the inputs **Position** and **Normal**. This is commonly used to texture large models such as terrain, where hand authoring UV coordinates would be problematic or not performant.

The expected type of the input **Texture** can be switched with the dropdown **Type**. If set to **Normal** the normals will be converted into world space so new tangents can be constructed then converted back to tangent space before output.

Expand Down
14 changes: 12 additions & 2 deletions com.unity.shadergraph/Editor/Data/Nodes/UV/TriplanarNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene
// Whiteout blend method
// https://medium.com/@bgolus/normal-mapping-for-a-triplanar-shader-10bf39dca05a
case TextureType.Normal:
sb.AppendLine("$precision3 {0}_Blend = max(pow(abs({1}), {2}), 0);"
// See comment for default case.
sb.AppendLine("$precision3 {0}_Blend = SafePositivePow_$precision({1}, min({2}, floor(log2(Min_$precision())/log2(1/sqrt(3)))) );"
, GetVariableNameForNode()
, GetSlotValue(NormalInputId, generationMode)
, GetSlotValue(BlendInputId, generationMode));
Expand Down Expand Up @@ -133,7 +134,16 @@ public virtual void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode gene
, GetVariableNameForNode());
break;
default:
sb.AppendLine("$precision3 {0}_Blend = pow(abs({1}), {2});"
// We want the sum of the 3 blend weights (by which we normalize them) to be > 0.
// Max safe exponent is log2(REAL_MIN)/log2(1/sqrt(3)):
// Take the set of all possible normalized vectors, make a set from selecting the maximum component of each 3-vectors from the previous set,
// the minimum (:= min_of_max) of that new set is 1/sqrt(3) (by the fact vectors are normalized).
// We then want a maximum exponent such that
// precision_min < min_of_max^exponent_max
// where exponent_max is blend,
// log(precision_min) < log(min_of_max) * exponent_max
// log(precision_min) / log(min_of_max) > exponent_max
sb.AppendLine("$precision3 {0}_Blend = SafePositivePow_$precision({1}, min({2}, floor(log2(Min_$precision())/log2(1/sqrt(3)))) );"
, GetVariableNameForNode()
, GetSlotValue(NormalInputId, generationMode)
, GetSlotValue(BlendInputId, generationMode));
Expand Down

0 comments on commit bf0ae92

Please sign in to comment.