Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x.x Backport] Fixing defines and calculations for shadow coordinates #112

Merged
merged 1 commit into from Apr 21, 2020

Conversation

ellioman
Copy link
Contributor

@ellioman ellioman commented Apr 14, 2020

Purpose of this PR

Backport of https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/6376


Checklist for PR maker

  • Have you added a backport label (if needed)? For example, the need-backport-* label. After you backport the PR, the label changes to backported-*.
  • Have you updated the changelog? Each package has a CHANGELOG.md file.
  • Have you updated or added the documentation for your PR? When you add a new feature, change a property name, or change the behavior of a feature, it's best practice to include related documentation changes in the same PR.
  • Have you added a graphic test for your PR (if needed)? When you add a new feature, or discover a bug that tests don't cover, please add a graphic test.

Testing status

Manual Tests: What did you do?

  • Opened test project + Run graphic tests locally
  • Built a player
  • Checked new UI names with UX convention
  • Tested UI multi-edition + Undo/Redo + Prefab overrides + Alignment in Preset
  • C# and shader warnings (supress shader cache to see them)
  • Checked new resources path for the reloader (in developer mode, you have a button at end of resources that check the paths)
  • Other:

Yamato:
https://yamato.prd.cds.internal.unity3d.com/jobs/902-Graphics/tree/7.x.x%252Fbackports%252Fshadow-coords-fixes/.yamato%252Fupm-ci-abv.yml%2523all_project_ci_fast-2019.3/1880306/job

@ellioman ellioman requested a review from a team April 14, 2020 11:26
@phi-lira phi-lira merged commit 21e4b8d into 7.x.x/release Apr 21, 2020
@phi-lira phi-lira deleted the 7.x.x/backports/shadow-coords-fixes branch April 21, 2020 12:24
0lento pushed a commit to 0lento/Graphics that referenced this pull request Jun 11, 2020
* re-enable light on tesselation test

* enable batcher in HDRP test (Unity-Technologies#2680)

* Fix memory leak issue

* Improve tracking of RT memory

* Update log variant to log level in HDRP asset

* Make HDRP shader features local (Unity-Technologies#2663)

* Switch to 'shader_feature_local'

* Make some keywords non-local due to the size limit of 64

* Undo changes to TerrainLit as apparently the setup code does some weird s***

* remove transparent from shader_feature_local

* Can't change Terrain to shader local keyword for "reasons"

* Update CHANGELOG.md

* Update HDUnlitSubShader.cs

* Update CHANGELOG.md

* Update HDUnlitSettingsView.cs

* Rename LIGHTLOOP_SINGLE_PASS to LIGHTLOOP_DISABLE_TILE_AND_CLUSTER (Unity-Technologies#2688)

* Rename LIGHTLOOP_SINGLE_PASS => LIGHTLOOP_DISABLE_TILE_AND_CLUSTER and clean all usage of LIGHTLOOP_TILE_PASS

Rename LIGHTLOOP_SINGLE_PASS to LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
Change multicompile LIGHTLOOP_SINGLE_PASS LIGHTLOOP_TILE_PASS to multicompile _ LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
New behavior, we don't need to define LIGHTLOOP_TILE_PASS anymore to be "tile/cluster". We are tile/cluster by default and need to define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER to have brute force mode.

Disabling tile/cluster is only useful for debugging. Previously the code was commented to allow to debug in LightLoopSettings, This PR re-enable the UI to control it but only allow it for deferred, not forward. This allow to clean the various comment (and it doesn't work with shader graph anyway). We keep debug mode only in the case of deferred.

So in the future we need to debug with brute force mode the lighting, we need to be in deferred and will not able to debug forward material. which should be fine.

* Make Enable Tile And Cluster a deferred only option

* Move declaration of pragma vertex and pixel shader  (Unity-Technologies#2689)

* Rename LIGHTLOOP_SINGLE_PASS => LIGHTLOOP_DISABLE_TILE_AND_CLUSTER and clean all usage of LIGHTLOOP_TILE_PASS

Rename LIGHTLOOP_SINGLE_PASS to LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
Change multicompile LIGHTLOOP_SINGLE_PASS LIGHTLOOP_TILE_PASS to multicompile _ LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
New behavior, we don't need to define LIGHTLOOP_TILE_PASS anymore to be "tile/cluster". We are tile/cluster by default and need to define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER to have brute force mode.

Disabling tile/cluster is only useful for debugging. Previously the code was commented to allow to debug in LightLoopSettings, This PR re-enable the UI to control it but only allow it for deferred, not forward. This allow to clean the various comment (and it doesn't work with shader graph anyway). We keep debug mode only in the case of deferred.

So in the future we need to debug with brute force mode the lighting, we need to be in deferred and will not able to debug forward material. which should be fine.

* Make Enable Tile And Cluster a deferred only option

* Move pragma vertex and pixel shader to prepare for raytrace shader

* Hdrp master move pragmar vertex (Unity-Technologies#2690)

Move SurfaceGradient defines location

* Update CHANGELOG.md

* call C++ version of CorrelatedColorTemperatureToRGB

* Initial implementation of Raytracing for HDRP-master (Unity-Technologies#2691)

* Light Cluster Build and Debug
Raytraced Reflections
Raytraced Ambient Occlusion
Raytraced Area Shadows
Screen Space jittered 2Dx8 Noise textures
Support for Shader Graph Master Node HDLit
HD raytracing Environement & Custom Inspector
Ao Nvidia denoiser
Bilateral Filter for denoising
Per-Camera Raytracing Filters
Raytracing Manager that handles reconstruction and update
Lit and Unlit Shader support
Mipmap LODs for raytracing

* Minor fix to the HDlitRaytracingPass Shader Graph Master Node

* Re-enabling the full lightloop

* Supporting more Lit Features properly:
- Specular Color
- Iridescence
- Anisotropy
- Clearcoat

* Fixing the transmission

* Delete Lit.shader.orig

* Fix compilation issue after merge

* Update HDRaytracingLightCluster.cs

* Update AmbientOcclusion.cs

* Move raytracing shader variables files

* Add preexposure to raytracing pass

* Rename completeColor to finalColor

* remove INTERSECTION_SHADING define, useless

* Remove HAS_LIGHTLOOP include path from ShaderPass

* some cleanup in raytrace lit shader graph

* Add generation of raytrace visibility pass in master node

* rename defaultLayerMask to editorRaytracingFilterLayerMask

* Move _RaytracedAreaShadow + add more #if ENABLE_RAYTRACING

* rename ShaderVariablesRaytracing to ShaderVariablesRaytracingLightLoop

* rename AreaBillateralShadow => AreaBilateralShadow

* Create AreaBillateralShadow.compute.meta

* remove Area billateral files

* change code to use PerceptualRoughnessToRoughness

* revert undesired change

* Update HDLightUI.cs

* Added Support for multi viewport (Unity-Technologies#2700)

* Multi viewport support WIP

* Fixed motion vector debug

* Formatting

* Formatting again

* Fixed flipY for debug view with cameras with a render texture

* Made a function for draw full screen with viewport.

* Added graphics test

* Fix fog on decals + saturate alpha

* Update HDRPPreprocessShaders.cs

* Update HDRPPreprocessShaders.cs

* Small Fixes to Editor (to enumerate inherited types and filter out abstract ones), + better handling of lists

* fix shader variant stripping

* Update Pre-exposure for lighting buffer

* Fix legacy render path shader compilation issues (already backported)

* Hdrp fix depth and color nodes (Unity-Technologies#2714)

* Make work SceneColor and SceneDepth nodes in HDRP

* Update CHANGELOG.md

* Various corrections asked during the initial review of the Raytracing PR (Unity-Technologies#2713)

* Various corrections asked during the initial review of the Raytracing code

* Removing a duplicate resource bind

* Supporting properly double sided and its modes and supporting the cutoff properly

* Handle undefined space and let user specify them (LocalToWorld & WorldToLocal node concerned) (Unity-Technologies#76)

* Fixed pre-exposure being applied to realtime probes (Unity-Technologies#2717)

* Added exposure control to frame settings and disabled it on reflection probes

Note: frame settings support on probes seem to be half-broken.

* Fixed test ref images

* Rename PreExposure -> ExposureControl

* Added todo

* Add Scene color and depth node tests (Unity-Technologies#2716)

* Fix SSR in forward (Unity-Technologies#2718)

* Fix SSR in forward

* update changelog

* Update HDRenderPipeline.cs

* - Fixed custom editor of Unlit, HD Unlit and PBR shader graph master node

* Fix micro shadowing in forward

* Fix time reset (Unity-Technologies#2720)

* Update CHANGELOG.md

* Don't expose emission for unlit shader

* Various fixes and de-commenting the lit and unlit raytracing shader code (Unity-Technologies#2721)

* Raytraced Area Shadow Merge Corrections

* intersection function for MIS

* Added m_LightDataGPUArray and m_LightCullResult to ReleaseResources in
HDRaytracingLightCluster

* Correcting the alpha test for the hdlit raytracing shader graph

* Only Computing raytraced SSAO when required
Adding a toggle flag for raytraced shadows

* Uncommenting the raytracing subshaders

* Corrections to the raytracing shadow disabling

* Update HDCameraUI.Skin.cs

* Improve Variant Provider interface (Unity-Technologies#73)

* Add overridable ComputeVariant function for variant provider

* Update changelog

* Improve AttributeFromCurve Variant provider & Remove Curl Cellular from listing

* Remove ".XYZ" for library naming

* Prevent to build a player if no hdrp asset found (Unity-Technologies#2729)

* Vector4 Field & Animated Parameter (Unity-Technologies#56)

* Clean approach :
- Use MultiPropertyField instad of Vector4Field
- Use Begin/End property instead of IsAnimated

* Fix inspector while resizing

* Update changelog + rebuild vfx

* Hdrp fix open gl error message (Unity-Technologies#2733)

* Fix OpenGL build error not displayed in the editor

* Removed useless comments

* Camera-relative support for stereo (Unity-Technologies#2719)

* WIP - attempt to fix camera-relative directional shadows with stereo

* Add ApplyCameraRelativeStereoOffset() to avoid dup code

* Fix shadowmaps with camera-relative

* shader code cleanup and fixes

* refactor C# code for stereo camera-relative

* add entry to changelog

* move calls to StereoCameraRelativeEyeToCenter to higher level to avoid applying offset twice

* HD/Post-processing fixes (Unity-Technologies#2732)

* Cleaned up & simplified previous PR on pre-exposure control

* Added guard bands to bloom to deal with RTHandle resizing

Hack, but better than leaking stuff from the top & left of the screen

* Motion blur for PP v3 (Unity-Technologies#2727)

* Manual rebase of wip-motion-blur (modified files)

* Resubmit editor

* Resubmit component

* Resubmit shaders

* Fixup resource asset

* Set intensity to 0 by default

* Revert the no motion set to 2.0

* Use Wave Intrinsics tile generation (2x improvement on PS4, 1.5x on Scorpio)

* Remove int division

* Better threshold for vel prep

* Revert (For now) the thresh check on vel prep stage

* Refactor parallel reduction code

* Getting rid of merged prep and tile

* Slight optimization to the wave intrinsic version of the tile generation

* [Testing - probably going to revert] Try scalar load for tile max velocity

* Revert "[Testing - probably going to revert] Try scalar load for tile max velocity"

This reverts commit 844778ac4935d1a5bd3842636b6b468d1c21892f.

* [Testing - probably going to revert] Try scalar load for tile max velocity

This reverts commit 3dafec82c914d555536ce13c4e1c5ca60fc715dd.

* Revert "[Testing - probably going to revert] Try scalar load for tile max velocity"

This reverts commit 0416e62182acdb143d380bbf50f793aba2322fb9.

* Some messing around with debug vis and weights (nothing useful really, most will be reverted)

* Optimize sample count

Minimum of 2 samples, but we clamp the number of sample so that we'll never have samples that span less than half a pixel.

* Fix few warnings

* Reset history flag

* Clamp tile coordinates when computing neighbourhood max

* Change early out clause in vel prepping

* Change blur group size from 8x8 to 16x16. *Much* better (reduce cost by 1/3 in some cases) on Scorpio, slightly better or same on PS4

* PACKING is now not an option anymore, but always the case

* Optimize sample count is not an option but always on now

* Remove f from float numbers

* Move compute velocity and scale rotation by intensity as well

* Add clamp of camera rotation and move a bit of things from common to prep

* Use texture macros

* Make explicit group size variable

* Handle "Force no motion"

* Better jitter for tiles and update tooltip

This reverts commit 95889accd337e93175fa2f2f93c0e318dfbf6db6.

* Fixup RTHandle issues when switching to different sized RT

* Update UI,  update sample count debug mode and a bit of cleanup

* Fix tab issue

* Convert tabs to spaces

* Comment debug symbols pragma

* Better name for sample count debug view

* Comment on the double direction sampling

* Comment on why we set velocity to 2 for "force no motion"

* Update MotionBlur.cs

* Update MotionBlur.cs

* Fix  Metal API not allowed by HDRP (Unity-Technologies#2736)

* Add enable field to motion blur editor (Unity-Technologies#2737)

* turn off post process for stereo (Unity-Technologies#2735)

* HDRP emission node, unit intensity and pre-exposure control (Unity-Technologies#2722)

* Add Emission Node and pre-exposure control for emission

* Removed emission pre-expose percent for terrain

* Added emission fields for layered lit and layered lit tesselation

* Update CHANGELOG.md

* Added Emission Node doc, and unlit emissive UI

* Use exp2 instead of PositivePow

* Renamed pre-exposure weight to Exposure Weight

* Removed EmissionColorHDR and moved GetExposureMultiplier to

* Add emissive intensity fields for lit tesselation shader

* Better parity for sequential operator (Unity-Technologies#78)

* Better parity for sequential operator, Unify Sequential3D with count as first entries too
=> TODO, add orientable Circle Type & Box Mode

* Add #pragma editor_sync_compilation to various editor and first time shader

* Update HDRenderPipelineResources.asset

* Change cascade shadow map error message (Unity-Technologies#2743)

* Fix for case of Template for LINUX compatibility

* Optimized uberfx & final pass (Unity-Technologies#2749)

Xbox One X (4K):
- Uber without bloom and/or dirt: 540µs -> 368µs (32%)
- Finalpass: 587µs -> 410µs (30%)

* Add tests for motion blur (disabled by default) (Unity-Technologies#2748)

* Fix planar reflection issue after merge of multiviewport (Unity-Technologies#2752)

* update reference screenshots (Unity-Technologies#2753)

* Fix planar reflection issue after merge of multiviewport

* Update reference screenshots

* fixed issue with PBR master node not using correct geometric normal

* Fix issue with mircoshadow and specular occlusion when LightLayers is enabled (Unity-Technologies#2757)

* fix microshadowing with specular occlusoin and lightlayers

* Update SimpleLit.hlsl

* Added color grading curves (YRGB + secondaries) (Unity-Technologies#2759)

* HDRP shader graph HD render queues (Unity-Technologies#2750)

* Added HDMaterialTags to generate shader tags in shader graphs

* Added an error message for objects that have refraction and BeforeRefraction render pass

Plus added a renderpass combobox for unlit shader graph node

* Remove useless comment

* Fix shader graph render pass update when switching opaque/transparent

* Fix transparent render queue generation

* Fixed HDRP shader compilation

* Fixed scaleY in ConnectTarget (was broken when size != 1.0) (Unity-Technologies#79)

* Fixed scaleY in ConnectTarget (was broken when size != 1.0)

* Added changes to changelog

* Fixing the Lit warnings due to Improved moment shadows (Unity-Technologies#2762)

* Material validator hdrp (Unity-Technologies#2738)

* Material validator using Debug Display for HDRP

* Update changlog

Update changelog to include material validation

* Update based on PR feedback

* Update code with PR feedback - Rename validation method

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix compilation issue + rename mode to diffuseColor / SpecularColor

* Update string in UI

* More renaming

* Fix typo

* Disable Motion blur via intensity instead of checkbox  (Unity-Technologies#2765)

* Disable mb via intensity

* Ooopsie

* Update for 32 threads in wavefronts on Switch. (Unity-Technologies#2724)

* Update for 32 threads in wavefronts on Switch.

* removed SORTLIST() and unecessary GroupMemoryBarrierWithGroupSync() to get parity with PS4/XB1.

* Moved thread group size to 32 threads on Switch (minor speed up from 0.66ms to 0.55ms).

* Encapsulated optimal thread group size into a #define.
PS4, XB1 and Switch can take advantage of the optimal group size.

* Removed obsolete comment (the file is not autogenerated anymore).

* Removed debug mode as it causes compiler error on Switch.

* Updated comments.

* Moved THREAD_GROUP_OPTIMAL_SIZE into platform headers and renamed to PLATFORM_THREAD_GROUP_OPTIMAL_SIZE.

* Missing updated file from previous commit.

* Added comments.

* Use GraphicsFormat instead of RenderTextureFormat  (Unity-Technologies#2761)

* Move to GraphicsFormat

* Fix bug with decals

* Use graphics format instead of format in the pool recycler (Unity-Technologies#2767)

* Fix RenderQueue update when changing surface type on unlit HD master node (Unity-Technologies#2768)

* Fixed serialization of SurfaceThickness setting in Collider Depth

* Fix legacy shader build

* Update depth and color node tests for HDRP (Unity-Technologies#2771)

* Vfx/fix/ui fixes (Unity-Technologies#81)

* Fix exception when a port having edge is removed.

* Refactor ContextUI RefreshContext

* Fix for block edges not disappearing.

* fix for RefreshContext refactor

* fix slider to change value directly on click.

* Fix index when adding new block.

* fix toobar item alignement.

* No longer restore global selection when window is focused( because we receive a focus event even when only one of the docked panel in our window is focused ).

* New iteration on gizmo : make it compatible with new property storage ( property stored only if overridden ) . Fix local/world on component gizmo once again.

* Gizmos : automatically add new property if the gizmo is modified and the value of the gizmo was not overridden yet.

* Unprepare the visual effect editor gizmos when the state of an overridden property has changed.

* Blackboard now shows level two and more of subproperties (for example ArcCircle.circle.center / .radius) if expanded

* Fix location of new context when dropping a flow edge over the graph [FB:1117090]

* [FB:1117127]Opening the Target Component window by clicking on component "edit" updates the state of the toggle "Target GameObject"

* Remove second "Visual Effects" menu[1117105]

* Put Visual Effect graph into preference category.

* Fix for stickynote sliding when dragging a group it is in.

* Fix case where view can't be found in anchor AttachToPanelEvent

* make sure input and output slot are at the same height

* hide divider on contexts when there is no settings.

* Fix block selection border margins.

* Hide settings dvider if the node has no settings.

* Switch to new notification API for scene view in slotcontainereditor.

* Rotate scale gizmo.

* Added Depth sampling modes to the scene depth node (Unity-Technologies#2740)

* Added Depth sampling modes to the scene depth node

* Fix eye depth mode description

* Fixed typos

* Update CHANGELOG.md

* Fix warning an issue with scenecolor node in hdrp (Unity-Technologies#2774)

* Fix warning an issue with scenecolor node in hdrp

* Delete InitTestScene636834054956858632.unity.meta

delete wrong submited files

* Delete InitTestScene636834054956858632.unity

delete wrong submited files

* revert undesired change

* fix for merge

* Hdrp/fix shadergraph hdrenderqueue migration (Unity-Technologies#2776)

* Fix renderingPass creation along data from prior its existance

* Fix renderingPass creation along data from prior its existance (Unlit)

* Fix After PostProcessTransparent generated queue text to be base on Transparent

* [HDRP] Upgrade FrameSettings (Unity-Technologies#2766)

* Introduce BitArray utility class

* Introduce FrameSettingsAttribute to help inspector and DebugMenu display

* Add unit test on BitArray

* Refactor FrameSettings and merge LightLoopSettings

* Add data migration

* Rename and update OverridableFrameSettingsArea UI utility

* Introduce FrameSettingsHistory for DebugMenu debugging agregatted values

* Fix FrameSettings usage

* Fix tooltips of Camera

* Fix former unit tests referencing FrameSettings

* Update UI

* Update DebuggerDisplays

* Fix alignment issue in PlanarReflectionProbe and ReflectionProbe inspectors

* Easing add of new FrameSettings in UI part based on FrameSettingField attribute

* Fix Default non bool FrameSettings

* Fix FrameSettings ordering

* Fix auto numbering of FrameSettingsFieldAttribute

* Fix FrameSettingsHistory and do history field UI

* Add DebugMenu generation on the same principe than inspector

* Add history in DebugMenu

* Clean history activation

* Speed up FrameSettingsHistory enabled

* Cleaning

* QuickFix issue due to PreviewCamera becoming of type Game for no reason.

* Add auto fixing broken serialized resources for HDRP.

* Update reflection method call for Preview of camera to reflect updated trunk

* Add support for multiselection

* Missing migration of recently added ExposureControl

* Update reflection method call for Preview of PlanarReflectionProbe to reflect updated trunk

* Update changelog

* Fix issue when adding-removing Scene View tab

* Fix typos

* Update FrameSettings.Migration.cs

* Prenvent very old probes to crash at migration when they have no LightLoopSettings

* Prevent SceneCameras to feed several times debug menu when HDRenderPipeline is reconstructed

For instance, this occures when we launch graphics tests

* Update MiniProfiler and debug menu which was broken

* Revert "Update MiniProfiler and debug menu which was broken"

This reverts commit 434b5a14f52075cf259f6f4958525a57ff27a390.

* Update FrameSettings.cs

* Update 2301_Shadow_Mask.unity

* Primary Visibility and Area Shadow (plus some additional raytracing features) (Unity-Technologies#2770)

* Adding a Raytracing render queue for both transparent and opaque objects
Opaque Objects that are in the raytracing queue are rendered in the prepass and not in the deferred/forward passes
Adding the primary visibility mode in the raytracing environement
Correcting a label in the rt_env_inspector
Adding a Debug Mode for raytracing area shadow
Adding an equivalent of the ssr lit brdf evaluation
Adding a forward raytracing pass for the lit and the unlit
Supporting Ior for the lit.shader
Implementing a HDRaytracingRenderer that handles primary visibility code
Adding resources for the raytracing primary ray
Not Pushing a light to the Light cluster if null (has been deleted)
Enabling Automatic raytracing scene invalidation on hierarchy change in the editor
Using the global command buffer parameter instead of the raytracing one when required for closest hit
Adding a texture for the analytic value (required for shadow filtering)
Adding default anyhit shaders to ambient occlusion and area shadow raytracing shaders
Adding the remainingDepth to the rayintersection structure
Adding an input reflection and transmission value for the Raytracing Lightloop and adding them to the evaluation
Adding the light dimension to the spherical rectangle
Correcting the bias usage for Raytraced AO and Reflection

* Refactoring and stabillization changes for the raytracing code

* Review corrections

* Order in args check for raytracingrenderer

* Delete 9601_MotionBlur.meta

* Update reference screenshots

* Avoid issue with modulo (save actually some computation recycling result of unsigned division anyway) (Unity-Technologies#83)

* remove unsupported FormerlySerializedAs in ShaderGraph serialisation (Unity-Technologies#2779)

* Hdrp/fix framesettings formerly nullable tests (Unity-Technologies#2781)

* Remove test: FrameSettings cannot be null anymore.

* Change test: FrameSettings cannot be null anymore. But wrong rendertexture type.

* Update 8205 test

* Add editor test to cover fixed delta time (using an debug spawner state) (Unity-Technologies#84)

* Update graphic test (scene + screenshots)

* Update HDCubemapInspector.cs

* Vfx/fix/add prefab editor test 1117103 (Unity-Technologies#80)

* Add new test with expected failure (commented in l.171 & 172) : Covers simple prefab override from fogbugz 1117103

* Add other test to cover future possible issue due to refactor of serialization cycle in VisualEffect component

* Minor : change exposed name

* Hdrp master reflection fix (Unity-Technologies#2785)

Fix of debug mode with reflection probe

* Hdrp/fix framesettings msaa and exposurecontrol (Unity-Technologies#2786)

* Add negativeDependency in FrameSettings

* Make MSAA's frame settings more user friendly

* Fixed sky exposure (Unity-Technologies#2778)

Fixed sky exposure

* Update CHANGELOG.md

* Hdrp/new ambient mode (Unity-Technologies#2630)

* - Added AmbientMode enum
- Renamed Baking Sky to Static Lighting Sky

* Implemented static and dynamic sky ambient probe

* Optimized version of AmbientProbeConvolution

* Removed manual serialization from static lighting sky

* Increased the number of sample to 256 (optimized with LDS on PS4/XBone)

* Fixed ambient probe flickering when a preview is displayed

* Changelog + Comment fixes

* Updated Test data according to static lighting changes

* - Fixed deprecated calls
- Fixed static lighting when no baking sky is present
- Fixed deserialization of former BakingSky component.

* Fixes/comments from PR feedback

* Removed f from float values in ambient convolution shader.

* Refactor to make realtime GI work with ambient static/dynamic modes

* Fixed issue with missing skybox material when running tests.

* Updated screenshots

* Temporarily disabled realtime GI part of test 2102

* Update Screenshots after merge

* Update scenes and screenshots

* Rebuild vfx

* Fix shader compilation issue  (Unity-Technologies#2793)

* Fix shader compilation issue

* remove old def on PS4

* Hdrp/fix framesettings probe overrides and tests (Unity-Technologies#2794)

* Make DebuggerDisplay easier to read between FrameSettings and FrameSettingsOverideMask

* Fix FrameSettings override for ReflectionProbes

* Fix FrameSettings Equals

* Fix RandomUtilities.RandomFloat and add RandomEnumValue

* Add unit tests for framesettings aggregation

* Ammend CameraSettingsUtilitiesTests.ApplySettings test with FrameSettings check

* Fix missing ShaderLitMode in FrameSettingsMigration

* Added migration test for FrameSettings

* update vfx test screenshot for master

* Update skyManager with  UnityEditor.Lightmapping api changed

* Hdrp fix double sided (Unity-Technologies#2798)

* Fix the flip for the Lit shader

* Move flip normal handling to the resolve point

* Remove bitangent flips

* Fix the double sided 'None' mode

* Unify code of Lit and SG

* update init values

* comment //#pragma enable_d3d11_debug_symbols

* Update reference screenshots

* FrameSettings SSR & Raytracing Fixes (Unity-Technologies#2801)

* Corrections due to merge issues

* SSR FrameSetting condition correction

* Update 2103 test

* Ambient occlusion raytracing hit distance (Unity-Technologies#2802)

Correcting type in the raytracing enable flag

* Add inverse lerp node (Unity-Technologies#85)

* Corretions for the render queue field in shader graph hdrp shaders (Unity-Technologies#2787)

* Corretions for the render queue field in shader graph hdrp shaders

* Only display working rendering pass for now for surfacetype

* Some cleaning

* Fixed issues with realtime probe resolution (Unity-Technologies#2806)

* - Fixed an issue where probe target texture wasn't resized properly when changing HDRP asset.
- Fixed rendering viewport for probe rendering

* Updated obsolete screenshot (exposure issue)

* Update changelog

* Rebuild vfx

* Update bad reference image

* Update VFX Test project settings

* Revert "Update VFX Test project settings"

This reverts commit 9d4e2ec231870b80b35b6afa4be42da0ac4449df.

* Revert unwanted changes

* Vfx/feature/expose light probe usage (Unity-Technologies#77)

* First implementation

* Encapsulate all VFX renderer related inspector stuff in RendererEditor class

* Add proxy override and probe anchor settings

* Update changelog

* Fix typo

* fix for override check width.

* fixed slider field focus

* disable blackboard add button is no visualeffect asset is displayed.

* Multiple fixes needed when more than one VisualEffect is selected (FB #1110747) (Unity-Technologies#90)

* Multiple fixes needed when more than one VisualEffect is selected (FB #1110747)

* reseed button give each selected component a different value.

* Refactored VFManagerEditor to cache properties. Guess hen reset has been selected to reset shaders and path to sane value.

* Fix missing inspector for VisualEffectActivationClip

* Use system title first line ( if any ) in Aset inspector output list.

* fix exception when restoring a removed context class.

* Update VFX

*  Better Handling of Null or Missing Parameter Binders (Editor + Runtime) (Unity-Technologies#82)

* Better Handling of Null or Missing Parameter Binders (Editor + Runtime)

* Better Handling of Null or Missing Parameter Binders (Editor + Runtime)

* Fix typo: Remove slot from correct model when removing a block

* Fix 1110419 + optimize a bit

* Fix blend factor not appearing with inherit attribute + bland value is now a [0,1] slider

* Add test to cover more VFX awakening (Unity-Technologies#91)

Only new editor test, dedicated for 2019.2, no backport, no changelog :

* Add some regression test to check visual effect expected serialization behavior

* Add check for reset override

* Force open Game View while running some tests

* Add a failing test of a corner case in prefab

* Covers actually failing manipulation of prefab

* Vfx/feature/addressing mode sequential (Unity-Technologies#93)

* Add addressing mode in Sequential block & Operator

* Fix Spaceable (Unity-Technologies#86)

* First wip of cleaner way to compute spaceable slot list (cached has been init too soon, leading to impossibility of updating slot)

* Fix missing copy space while sanitizing slot

* Fix Undo/Redo & Add a regression test

* Update Change Log

* Minor reverting dirty unwanted changes

* - Cover linked slot situation
- Fix domain reload case

* Rename SpaceSlotConcerned in SlotWithSpaceTransformation

* Use specific PropageChildrenReverse

* Fix for floatfield overridden when focus.

* window OnEnable postpone the loadresource.

* Add Invert Transform GPU (Unity-Technologies#94)

* Add specific expression for saturate, ceil, frac, round

* Add expression for InverseTRSMatrix

* Fix hlsl warning

* Add operator for inverse & transpose

* - Fix VFXExpressionTransformMatrix
- Move SDF to Texture folder
- Start implementing a new graphicTest

* Remove deprecated

* Simplify VFXInverseTRSMatrix (GPU)

* Fix Operator TransposeMatrix & InvertTRSMatrix

* remove deprecated file

* Use projection

* Add 23_InvertTRSMatrix graphic test

* Doesn't use random in gpu event (not really deterministic) & Add reference image

* Update 06_Lineoutput (expected change with new expression for frac)

* Add comment

* Update ChangeLog

* *Update reference images

* Use Matrix4x4.Inverse3DAffine with 2019.2 or newer

* *WIP* Draft for reduction to the saturate operator

* Add reduction & test to detect automatically saturate operator

* Rename CanBeReducedZeroOneToSature in CanBeReducedToSaturate

* Add missing cases for saturate

* fix expanded parameter in blockboard appearing when their category is collapsed.

* Vfx/fix/fixed random (Unity-Technologies#99)

* Fix fixed random

* Update changelog

* Fix consistency

* fix for text alignment within blocks

* fix for indeterminate checkbox.

* Add new editor test for drag&drop (Unity-Technologies#97)

* Create branch & Add new editor test to verify VFXRenderer state while drag & drop (actual fix is in C++)

* Make this new test more fair waiting for culling

* Simpler test to Verify state (and actually, there are some issue with bound)

* Fix missing graph reimport when exception has been thrown (Unity-Technologies#103)

* Cosmetic changes to inspector (to ressemble more like HDRP inspectors) (Unity-Technologies#95)

* Cosmetic changes to inspector (to ressemble more like HDRP inspectors)

* Small fix to get the correct icon when overring a float property override check ( previously the drag to modify value icon was appearing).

* Fix category not folding when clicking on the title.

* More Fixes for PR

* Improve depth buffers blocks + auto reference of buffers for main camera (Unity-Technologies#104)

* Add buffer to expressions and CameraType

* Fix issues with spaceable when chaning types

* Fixes to match  C++

* Another attempt to fix InitSpaceable issue

* Use camera provided depth buffer in collisions

* Temp hook in HDRenderPipeline to copy buffers

* Update depth module test

* Fix compil

* Made Color, Normal and Depth buffers accessible to VFX graphs.

* Fix HDRP compilation

* Fix ProjectOnDepth block

* Fix scene color fetch

* Factorize camera blocks + add a settings for camera mode

* backout changes in VFXPropertyAttribute

* Update and reactivate gfx test

* Dont use colorBuffer if not needed

* Rename Project on Depth to Position (Depth) for consistancy

* Update changelog

* Fix editor test

* Recompile VFX

* Update settings

* Deactivate a test because logging in test does not work on Katana

* Fixes for VFX Parameter Binder Editor (had to derive from Editor due to recent changes) (Unity-Technologies#105)

* Update changelog

* Simplify graphicTest to avoid instability (Unity-Technologies#106)

* Add TotalTime in PreWarm (Unity-Technologies#96)

* Add prewarm total time in inspector

* Minor change

* New propal for prewarm settings

* Fix editor test disabling logging error temporary

* LWRP Unlit (without graphicTest) (Unity-Technologies#3174)

* Fake project to test legacy (actually an automatic copy of VisualEffectGraph)

* Fix build legacy

* Add template for LWRP

* Remove deprecated Meta

* Add missing meta

* Remove project folder & use a 7z as backup

* Fix missing processCamera (allow particles sorting) & renable decal

* Integrate fog function in LWRP

* Update changelog

* Integrate Vertex Shadow Bias

* Fix duplicated line

* Revert added function in LWRP

* Fix ApplyShadowBias Legacy

* Fix missing VFXApplyExposure for LWRP

* Recompile all vfx

* Fix execption while removing a sub-slot on a dynamic operator (Unity-Technologies#107)

* The category name field takes correctly the focus when it is double clicked.

* fix for blackboard tooltip width forcing whole blackboard width.

* Nitpicking for the edition of systems and context titles. edited title appear exactly on top of the static text, with the correct styling.

* Add editor test for rounding & use test case by name for Min/Max

* Additional Parameter Binders (Unity-Technologies#87)

* Additional Parameter Binders

* Fixes + GraphicTest

* Fixed audio instability using wav & forcing play state

* Remove deprecated meta

* Updated Changelog

* Rename UnityEngine.VFX.Utils in UnityEngine.Experimental.VFX.Utility

* Revert 23_ParameterBinders.unity

* Add Reset Call in GraphicTest

* Fix changing namespace *wip* this is incorrect serialization behavior, should not happen

* Fix AudioClip reference

* disable override to detect correctly failure with parameter binders

* Make parameter binder stable again

* Save it runtime mode

* Save vfx after close

* Fix graphicTest build

* Fix antialiased lines

* Fix screen space size block

* Rebuild VFX

* fix fit to text not working

* fix rate field hidden.

* Distortion Output + Graphic Test + Changelog (Unity-Technologies#109)

* VFX Event Tester (SceneView Window)

* Distortion Output + Graphic Test + Changelog

* Changes for PR

* Removed comment

* Removed VF Generator + Block Template generator (Unity-Technologies#110)

* Fix Infinite Loop Spawner (case 1135299) (Unity-Technologies#112)

* Move CanLink to VFXFlowAnchorController

* Add test to avoid loop in graph

* Restore duplicate link test (but adding condition for slotIndex)

* Add EditorTest for VFXController

* Delete problematic files LightingData.asset

* Update changelog

* Minor : Update comment

* Fix SetAttribute initial value (Unity-Technologies#113)

* Fix Set Attribute default value & Add test to check this regression (using alpha)

* Set default lifeTime value to 1.0 instead of 0.0

* Fix Min_Max_Expression_Folding_TestCase (random failure)

* Add comment to explain purpose of a regression test

* Remove useless code in VFXOperator

* Fix Default Scale Attribute content

* Fix case 1126471 : first added value in propertySheet should be mark as overridden (Unity-Technologies#114)

* Revert "Fix case 1126471 : first added value in propertySheet should be mark as overridden (Unity-Technologies#114)" (Unity-Technologies#116)

This reverts commit 873ab6c5dbafc6d6cf32702163b9def540c12c1c.

* Fix case 1126471 : Inspector (Unity-Technologies#117)

* Fix case 1126471 : first added value in propertySheet should be mark as overridden

* Update ChangeLog.md

* Fix hitbox when a category is displayed (Unity-Technologies#115)

Pretty minor and obvious, doesn't require review (and no backport needed)

* Fix base.OnEnable not called in VectorFieldImporterEditor

* Disable Min_Max_Expression_Folding : can't explain the instability for now

* Fix exception in inspector due to debug info (case 1141638)

* Added Gradient Mapping texture color mode for Unlit outputs (Unity-Technologies#118)

* Added Gradient Mapping for Unlit outputs

* Fixes for PR

* Fixed names

* Fix distortion output with planar primitive refactor

* Fix GUITests expceptions

* Clean previous rev

* Forgot missing meta

* Motion vector based flipbook interpolation

* Fix UV in planar primitives for flipbook interpolation + remove unused file

* Fix issue with invalid contexts not being removed from flowk links

* Fix merge

* Recompile VFX

* [1146829] Fix for linking spawner to spawner while first spawner is linked to initialize + test

* Fix space of spacable slot not copy pasted + test

* Set Attribute Spaceable (Unity-Technologies#119)

* Fix for PositionBase block using default Direction attribute instead of newly created Direction

* [1152500] Fix for category disappearing in inspector when it is renamed in the blackboard.

* [1152496] transfer first texture when converting output if no texture of the same name if found.

* Fix conversion of output between planar types.

* Fix position circle z (Unity-Technologies#128)

* Add exposure weight to HDRP lit outputs

* Forgot to update changelog

* Force UpdateSubAssets at the end of SantizeGraph
0lento pushed a commit to 0lento/Graphics that referenced this pull request Jun 11, 2020
* Move declaration of pragma vertex and pixel shader  (Unity-Technologies#2689)

* Rename LIGHTLOOP_SINGLE_PASS => LIGHTLOOP_DISABLE_TILE_AND_CLUSTER and clean all usage of LIGHTLOOP_TILE_PASS

Rename LIGHTLOOP_SINGLE_PASS to LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
Change multicompile LIGHTLOOP_SINGLE_PASS LIGHTLOOP_TILE_PASS to multicompile _ LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
New behavior, we don't need to define LIGHTLOOP_TILE_PASS anymore to be "tile/cluster". We are tile/cluster by default and need to define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER to have brute force mode.

Disabling tile/cluster is only useful for debugging. Previously the code was commented to allow to debug in LightLoopSettings, This PR re-enable the UI to control it but only allow it for deferred, not forward. This allow to clean the various comment (and it doesn't work with shader graph anyway). We keep debug mode only in the case of deferred.

So in the future we need to debug with brute force mode the lighting, we need to be in deferred and will not able to debug forward material. which should be fine.

* Make Enable Tile And Cluster a deferred only option

* Move pragma vertex and pixel shader to prepare for raytrace shader

* Hdrp master move pragmar vertex (Unity-Technologies#2690)

Move SurfaceGradient defines location

* Update CHANGELOG.md

* call C++ version of CorrelatedColorTemperatureToRGB

* Initial implementation of Raytracing for HDRP-master (Unity-Technologies#2691)

* Light Cluster Build and Debug
Raytraced Reflections
Raytraced Ambient Occlusion
Raytraced Area Shadows
Screen Space jittered 2Dx8 Noise textures
Support for Shader Graph Master Node HDLit
HD raytracing Environement & Custom Inspector
Ao Nvidia denoiser
Bilateral Filter for denoising
Per-Camera Raytracing Filters
Raytracing Manager that handles reconstruction and update
Lit and Unlit Shader support
Mipmap LODs for raytracing

* Minor fix to the HDlitRaytracingPass Shader Graph Master Node

* Re-enabling the full lightloop

* Supporting more Lit Features properly:
- Specular Color
- Iridescence
- Anisotropy
- Clearcoat

* Fixing the transmission

* Delete Lit.shader.orig

* Fix compilation issue after merge

* Update HDRaytracingLightCluster.cs

* Update AmbientOcclusion.cs

* Move raytracing shader variables files

* Add preexposure to raytracing pass

* Rename completeColor to finalColor

* remove INTERSECTION_SHADING define, useless

* Remove HAS_LIGHTLOOP include path from ShaderPass

* some cleanup in raytrace lit shader graph

* Add generation of raytrace visibility pass in master node

* rename defaultLayerMask to editorRaytracingFilterLayerMask

* Move _RaytracedAreaShadow + add more #if ENABLE_RAYTRACING

* rename ShaderVariablesRaytracing to ShaderVariablesRaytracingLightLoop

* rename AreaBillateralShadow => AreaBilateralShadow

* Create AreaBillateralShadow.compute.meta

* remove Area billateral files

* change code to use PerceptualRoughnessToRoughness

* revert undesired change

* Update HDLightUI.cs

* Added Support for multi viewport (Unity-Technologies#2700)

* Multi viewport support WIP

* Fixed motion vector debug

* Formatting

* Formatting again

* Fixed flipY for debug view with cameras with a render texture

* Made a function for draw full screen with viewport.

* Added graphics test

* Fix fog on decals + saturate alpha

* Update HDRPPreprocessShaders.cs

* Update HDRPPreprocessShaders.cs

* Small Fixes to Editor (to enumerate inherited types and filter out abstract ones), + better handling of lists

* fix shader variant stripping

* Update Pre-exposure for lighting buffer

* Fix legacy render path shader compilation issues (already backported)

* Hdrp fix depth and color nodes (Unity-Technologies#2714)

* Make work SceneColor and SceneDepth nodes in HDRP

* Update CHANGELOG.md

* Various corrections asked during the initial review of the Raytracing PR (Unity-Technologies#2713)

* Various corrections asked during the initial review of the Raytracing code

* Removing a duplicate resource bind

* Supporting properly double sided and its modes and supporting the cutoff properly

* Handle undefined space and let user specify them (LocalToWorld & WorldToLocal node concerned) (Unity-Technologies#76)

* Fixed pre-exposure being applied to realtime probes (Unity-Technologies#2717)

* Added exposure control to frame settings and disabled it on reflection probes

Note: frame settings support on probes seem to be half-broken.

* Fixed test ref images

* Rename PreExposure -> ExposureControl

* Added todo

* Add Scene color and depth node tests (Unity-Technologies#2716)

* Fix SSR in forward (Unity-Technologies#2718)

* Fix SSR in forward

* update changelog

* Update HDRenderPipeline.cs

* - Fixed custom editor of Unlit, HD Unlit and PBR shader graph master node

* Fix micro shadowing in forward

* Fix time reset (Unity-Technologies#2720)

* Update CHANGELOG.md

* Don't expose emission for unlit shader

* Various fixes and de-commenting the lit and unlit raytracing shader code (Unity-Technologies#2721)

* Raytraced Area Shadow Merge Corrections

* intersection function for MIS

* Added m_LightDataGPUArray and m_LightCullResult to ReleaseResources in
HDRaytracingLightCluster

* Correcting the alpha test for the hdlit raytracing shader graph

* Only Computing raytraced SSAO when required
Adding a toggle flag for raytraced shadows

* Uncommenting the raytracing subshaders

* Corrections to the raytracing shadow disabling

* Update HDCameraUI.Skin.cs

* Improve Variant Provider interface (Unity-Technologies#73)

* Add overridable ComputeVariant function for variant provider

* Update changelog

* Improve AttributeFromCurve Variant provider & Remove Curl Cellular from listing

* Remove ".XYZ" for library naming

* Prevent to build a player if no hdrp asset found (Unity-Technologies#2729)

* Vector4 Field & Animated Parameter (Unity-Technologies#56)

* Clean approach :
- Use MultiPropertyField instad of Vector4Field
- Use Begin/End property instead of IsAnimated

* Fix inspector while resizing

* Update changelog + rebuild vfx

* Hdrp fix open gl error message (Unity-Technologies#2733)

* Fix OpenGL build error not displayed in the editor

* Removed useless comments

* Camera-relative support for stereo (Unity-Technologies#2719)

* WIP - attempt to fix camera-relative directional shadows with stereo

* Add ApplyCameraRelativeStereoOffset() to avoid dup code

* Fix shadowmaps with camera-relative

* shader code cleanup and fixes

* refactor C# code for stereo camera-relative

* add entry to changelog

* move calls to StereoCameraRelativeEyeToCenter to higher level to avoid applying offset twice

* HD/Post-processing fixes (Unity-Technologies#2732)

* Cleaned up & simplified previous PR on pre-exposure control

* Added guard bands to bloom to deal with RTHandle resizing

Hack, but better than leaking stuff from the top & left of the screen

* Motion blur for PP v3 (Unity-Technologies#2727)

* Manual rebase of wip-motion-blur (modified files)

* Resubmit editor

* Resubmit component

* Resubmit shaders

* Fixup resource asset

* Set intensity to 0 by default

* Revert the no motion set to 2.0

* Use Wave Intrinsics tile generation (2x improvement on PS4, 1.5x on Scorpio)

* Remove int division

* Better threshold for vel prep

* Revert (For now) the thresh check on vel prep stage

* Refactor parallel reduction code

* Getting rid of merged prep and tile

* Slight optimization to the wave intrinsic version of the tile generation

* [Testing - probably going to revert] Try scalar load for tile max velocity

* Revert "[Testing - probably going to revert] Try scalar load for tile max velocity"

This reverts commit 844778ac4935d1a5bd3842636b6b468d1c21892f.

* [Testing - probably going to revert] Try scalar load for tile max velocity

This reverts commit 3dafec82c914d555536ce13c4e1c5ca60fc715dd.

* Revert "[Testing - probably going to revert] Try scalar load for tile max velocity"

This reverts commit 0416e62182acdb143d380bbf50f793aba2322fb9.

* Some messing around with debug vis and weights (nothing useful really, most will be reverted)

* Optimize sample count

Minimum of 2 samples, but we clamp the number of sample so that we'll never have samples that span less than half a pixel.

* Fix few warnings

* Reset history flag

* Clamp tile coordinates when computing neighbourhood max

* Change early out clause in vel prepping

* Change blur group size from 8x8 to 16x16. *Much* better (reduce cost by 1/3 in some cases) on Scorpio, slightly better or same on PS4

* PACKING is now not an option anymore, but always the case

* Optimize sample count is not an option but always on now

* Remove f from float numbers

* Move compute velocity and scale rotation by intensity as well

* Add clamp of camera rotation and move a bit of things from common to prep

* Use texture macros

* Make explicit group size variable

* Handle "Force no motion"

* Better jitter for tiles and update tooltip

This reverts commit 95889accd337e93175fa2f2f93c0e318dfbf6db6.

* Fixup RTHandle issues when switching to different sized RT

* Update UI,  update sample count debug mode and a bit of cleanup

* Fix tab issue

* Convert tabs to spaces

* Comment debug symbols pragma

* Better name for sample count debug view

* Comment on the double direction sampling

* Comment on why we set velocity to 2 for "force no motion"

* Update MotionBlur.cs

* Update MotionBlur.cs

* Fix  Metal API not allowed by HDRP (Unity-Technologies#2736)

* Add enable field to motion blur editor (Unity-Technologies#2737)

* turn off post process for stereo (Unity-Technologies#2735)

* HDRP emission node, unit intensity and pre-exposure control (Unity-Technologies#2722)

* Add Emission Node and pre-exposure control for emission

* Removed emission pre-expose percent for terrain

* Added emission fields for layered lit and layered lit tesselation

* Update CHANGELOG.md

* Added Emission Node doc, and unlit emissive UI

* Use exp2 instead of PositivePow

* Renamed pre-exposure weight to Exposure Weight

* Removed EmissionColorHDR and moved GetExposureMultiplier to

* Add emissive intensity fields for lit tesselation shader

* Better parity for sequential operator (Unity-Technologies#78)

* Better parity for sequential operator, Unify Sequential3D with count as first entries too
=> TODO, add orientable Circle Type & Box Mode

* Add #pragma editor_sync_compilation to various editor and first time shader

* Update HDRenderPipelineResources.asset

* Change cascade shadow map error message (Unity-Technologies#2743)

* Fix for case of Template for LINUX compatibility

* Optimized uberfx & final pass (Unity-Technologies#2749)

Xbox One X (4K):
- Uber without bloom and/or dirt: 540µs -> 368µs (32%)
- Finalpass: 587µs -> 410µs (30%)

* Add tests for motion blur (disabled by default) (Unity-Technologies#2748)

* Fix planar reflection issue after merge of multiviewport (Unity-Technologies#2752)

* update reference screenshots (Unity-Technologies#2753)

* Fix planar reflection issue after merge of multiviewport

* Update reference screenshots

* fixed issue with PBR master node not using correct geometric normal

* Fix issue with mircoshadow and specular occlusion when LightLayers is enabled (Unity-Technologies#2757)

* fix microshadowing with specular occlusoin and lightlayers

* Update SimpleLit.hlsl

* Added color grading curves (YRGB + secondaries) (Unity-Technologies#2759)

* HDRP shader graph HD render queues (Unity-Technologies#2750)

* Added HDMaterialTags to generate shader tags in shader graphs

* Added an error message for objects that have refraction and BeforeRefraction render pass

Plus added a renderpass combobox for unlit shader graph node

* Remove useless comment

* Fix shader graph render pass update when switching opaque/transparent

* Fix transparent render queue generation

* Fixed HDRP shader compilation

* Fixed scaleY in ConnectTarget (was broken when size != 1.0) (Unity-Technologies#79)

* Fixed scaleY in ConnectTarget (was broken when size != 1.0)

* Added changes to changelog

* Fixing the Lit warnings due to Improved moment shadows (Unity-Technologies#2762)

* Material validator hdrp (Unity-Technologies#2738)

* Material validator using Debug Display for HDRP

* Update changlog

Update changelog to include material validation

* Update based on PR feedback

* Update code with PR feedback - Rename validation method

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix compilation issue + rename mode to diffuseColor / SpecularColor

* Update string in UI

* More renaming

* Fix typo

* Disable Motion blur via intensity instead of checkbox  (Unity-Technologies#2765)

* Disable mb via intensity

* Ooopsie

* Update for 32 threads in wavefronts on Switch. (Unity-Technologies#2724)

* Update for 32 threads in wavefronts on Switch.

* removed SORTLIST() and unecessary GroupMemoryBarrierWithGroupSync() to get parity with PS4/XB1.

* Moved thread group size to 32 threads on Switch (minor speed up from 0.66ms to 0.55ms).

* Encapsulated optimal thread group size into a #define.
PS4, XB1 and Switch can take advantage of the optimal group size.

* Removed obsolete comment (the file is not autogenerated anymore).

* Removed debug mode as it causes compiler error on Switch.

* Updated comments.

* Moved THREAD_GROUP_OPTIMAL_SIZE into platform headers and renamed to PLATFORM_THREAD_GROUP_OPTIMAL_SIZE.

* Missing updated file from previous commit.

* Added comments.

* Use GraphicsFormat instead of RenderTextureFormat  (Unity-Technologies#2761)

* Move to GraphicsFormat

* Fix bug with decals

* Use graphics format instead of format in the pool recycler (Unity-Technologies#2767)

* Fix RenderQueue update when changing surface type on unlit HD master node (Unity-Technologies#2768)

* Fixed serialization of SurfaceThickness setting in Collider Depth

* Fix legacy shader build

* Update depth and color node tests for HDRP (Unity-Technologies#2771)

* Vfx/fix/ui fixes (Unity-Technologies#81)

* Fix exception when a port having edge is removed.

* Refactor ContextUI RefreshContext

* Fix for block edges not disappearing.

* fix for RefreshContext refactor

* fix slider to change value directly on click.

* Fix index when adding new block.

* fix toobar item alignement.

* No longer restore global selection when window is focused( because we receive a focus event even when only one of the docked panel in our window is focused ).

* New iteration on gizmo : make it compatible with new property storage ( property stored only if overridden ) . Fix local/world on component gizmo once again.

* Gizmos : automatically add new property if the gizmo is modified and the value of the gizmo was not overridden yet.

* Unprepare the visual effect editor gizmos when the state of an overridden property has changed.

* Blackboard now shows level two and more of subproperties (for example ArcCircle.circle.center / .radius) if expanded

* Fix location of new context when dropping a flow edge over the graph [FB:1117090]

* [FB:1117127]Opening the Target Component window by clicking on component "edit" updates the state of the toggle "Target GameObject"

* Remove second "Visual Effects" menu[1117105]

* Put Visual Effect graph into preference category.

* Fix for stickynote sliding when dragging a group it is in.

* Fix case where view can't be found in anchor AttachToPanelEvent

* make sure input and output slot are at the same height

* hide divider on contexts when there is no settings.

* Fix block selection border margins.

* Hide settings dvider if the node has no settings.

* Switch to new notification API for scene view in slotcontainereditor.

* Rotate scale gizmo.

* Added Depth sampling modes to the scene depth node (Unity-Technologies#2740)

* Added Depth sampling modes to the scene depth node

* Fix eye depth mode description

* Fixed typos

* Update CHANGELOG.md

* Fix warning an issue with scenecolor node in hdrp (Unity-Technologies#2774)

* Fix warning an issue with scenecolor node in hdrp

* Delete InitTestScene636834054956858632.unity.meta

delete wrong submited files

* Delete InitTestScene636834054956858632.unity

delete wrong submited files

* revert undesired change

* fix for merge

* Hdrp/fix shadergraph hdrenderqueue migration (Unity-Technologies#2776)

* Fix renderingPass creation along data from prior its existance

* Fix renderingPass creation along data from prior its existance (Unlit)

* Fix After PostProcessTransparent generated queue text to be base on Transparent

* [HDRP] Upgrade FrameSettings (Unity-Technologies#2766)

* Introduce BitArray utility class

* Introduce FrameSettingsAttribute to help inspector and DebugMenu display

* Add unit test on BitArray

* Refactor FrameSettings and merge LightLoopSettings

* Add data migration

* Rename and update OverridableFrameSettingsArea UI utility

* Introduce FrameSettingsHistory for DebugMenu debugging agregatted values

* Fix FrameSettings usage

* Fix tooltips of Camera

* Fix former unit tests referencing FrameSettings

* Update UI

* Update DebuggerDisplays

* Fix alignment issue in PlanarReflectionProbe and ReflectionProbe inspectors

* Easing add of new FrameSettings in UI part based on FrameSettingField attribute

* Fix Default non bool FrameSettings

* Fix FrameSettings ordering

* Fix auto numbering of FrameSettingsFieldAttribute

* Fix FrameSettingsHistory and do history field UI

* Add DebugMenu generation on the same principe than inspector

* Add history in DebugMenu

* Clean history activation

* Speed up FrameSettingsHistory enabled

* Cleaning

* QuickFix issue due to PreviewCamera becoming of type Game for no reason.

* Add auto fixing broken serialized resources for HDRP.

* Update reflection method call for Preview of camera to reflect updated trunk

* Add support for multiselection

* Missing migration of recently added ExposureControl

* Update reflection method call for Preview of PlanarReflectionProbe to reflect updated trunk

* Update changelog

* Fix issue when adding-removing Scene View tab

* Fix typos

* Update FrameSettings.Migration.cs

* Prenvent very old probes to crash at migration when they have no LightLoopSettings

* Prevent SceneCameras to feed several times debug menu when HDRenderPipeline is reconstructed

For instance, this occures when we launch graphics tests

* Update MiniProfiler and debug menu which was broken

* Revert "Update MiniProfiler and debug menu which was broken"

This reverts commit 434b5a14f52075cf259f6f4958525a57ff27a390.

* Update FrameSettings.cs

* Update 2301_Shadow_Mask.unity

* Primary Visibility and Area Shadow (plus some additional raytracing features) (Unity-Technologies#2770)

* Adding a Raytracing render queue for both transparent and opaque objects
Opaque Objects that are in the raytracing queue are rendered in the prepass and not in the deferred/forward passes
Adding the primary visibility mode in the raytracing environement
Correcting a label in the rt_env_inspector
Adding a Debug Mode for raytracing area shadow
Adding an equivalent of the ssr lit brdf evaluation
Adding a forward raytracing pass for the lit and the unlit
Supporting Ior for the lit.shader
Implementing a HDRaytracingRenderer that handles primary visibility code
Adding resources for the raytracing primary ray
Not Pushing a light to the Light cluster if null (has been deleted)
Enabling Automatic raytracing scene invalidation on hierarchy change in the editor
Using the global command buffer parameter instead of the raytracing one when required for closest hit
Adding a texture for the analytic value (required for shadow filtering)
Adding default anyhit shaders to ambient occlusion and area shadow raytracing shaders
Adding the remainingDepth to the rayintersection structure
Adding an input reflection and transmission value for the Raytracing Lightloop and adding them to the evaluation
Adding the light dimension to the spherical rectangle
Correcting the bias usage for Raytraced AO and Reflection

* Refactoring and stabillization changes for the raytracing code

* Review corrections

* Order in args check for raytracingrenderer

* Delete 9601_MotionBlur.meta

* Update reference screenshots

* Avoid issue with modulo (save actually some computation recycling result of unsigned division anyway) (Unity-Technologies#83)

* remove unsupported FormerlySerializedAs in ShaderGraph serialisation (Unity-Technologies#2779)

* Hdrp/fix framesettings formerly nullable tests (Unity-Technologies#2781)

* Remove test: FrameSettings cannot be null anymore.

* Change test: FrameSettings cannot be null anymore. But wrong rendertexture type.

* Update 8205 test

* Add editor test to cover fixed delta time (using an debug spawner state) (Unity-Technologies#84)

* Update graphic test (scene + screenshots)

* Update HDCubemapInspector.cs

* Vfx/fix/add prefab editor test 1117103 (Unity-Technologies#80)

* Add new test with expected failure (commented in l.171 & 172) : Covers simple prefab override from fogbugz 1117103

* Add other test to cover future possible issue due to refactor of serialization cycle in VisualEffect component

* Minor : change exposed name

* Hdrp master reflection fix (Unity-Technologies#2785)

Fix of debug mode with reflection probe

* Hdrp/fix framesettings msaa and exposurecontrol (Unity-Technologies#2786)

* Add negativeDependency in FrameSettings

* Make MSAA's frame settings more user friendly

* Fixed sky exposure (Unity-Technologies#2778)

Fixed sky exposure

* Update CHANGELOG.md

* Hdrp/new ambient mode (Unity-Technologies#2630)

* - Added AmbientMode enum
- Renamed Baking Sky to Static Lighting Sky

* Implemented static and dynamic sky ambient probe

* Optimized version of AmbientProbeConvolution

* Removed manual serialization from static lighting sky

* Increased the number of sample to 256 (optimized with LDS on PS4/XBone)

* Fixed ambient probe flickering when a preview is displayed

* Changelog + Comment fixes

* Updated Test data according to static lighting changes

* - Fixed deprecated calls
- Fixed static lighting when no baking sky is present
- Fixed deserialization of former BakingSky component.

* Fixes/comments from PR feedback

* Removed f from float values in ambient convolution shader.

* Refactor to make realtime GI work with ambient static/dynamic modes

* Fixed issue with missing skybox material when running tests.

* Updated screenshots

* Temporarily disabled realtime GI part of test 2102

* Update Screenshots after merge

* Update scenes and screenshots

* Rebuild vfx

* Fix shader compilation issue  (Unity-Technologies#2793)

* Fix shader compilation issue

* remove old def on PS4

* Hdrp/fix framesettings probe overrides and tests (Unity-Technologies#2794)

* Make DebuggerDisplay easier to read between FrameSettings and FrameSettingsOverideMask

* Fix FrameSettings override for ReflectionProbes

* Fix FrameSettings Equals

* Fix RandomUtilities.RandomFloat and add RandomEnumValue

* Add unit tests for framesettings aggregation

* Ammend CameraSettingsUtilitiesTests.ApplySettings test with FrameSettings check

* Fix missing ShaderLitMode in FrameSettingsMigration

* Added migration test for FrameSettings

* update vfx test screenshot for master

* Update skyManager with  UnityEditor.Lightmapping api changed

* Hdrp fix double sided (Unity-Technologies#2798)

* Fix the flip for the Lit shader

* Move flip normal handling to the resolve point

* Remove bitangent flips

* Fix the double sided 'None' mode

* Unify code of Lit and SG

* update init values

* comment //#pragma enable_d3d11_debug_symbols

* Update reference screenshots

* FrameSettings SSR & Raytracing Fixes (Unity-Technologies#2801)

* Corrections due to merge issues

* SSR FrameSetting condition correction

* Update 2103 test

* Ambient occlusion raytracing hit distance (Unity-Technologies#2802)

Correcting type in the raytracing enable flag

* Add inverse lerp node (Unity-Technologies#85)

* Corretions for the render queue field in shader graph hdrp shaders (Unity-Technologies#2787)

* Corretions for the render queue field in shader graph hdrp shaders

* Only display working rendering pass for now for surfacetype

* Some cleaning

* Fixed issues with realtime probe resolution (Unity-Technologies#2806)

* - Fixed an issue where probe target texture wasn't resized properly when changing HDRP asset.
- Fixed rendering viewport for probe rendering

* Updated obsolete screenshot (exposure issue)

* Update changelog

* Rebuild vfx

* Update bad reference image

* Update VFX Test project settings

* Revert "Update VFX Test project settings"

This reverts commit 9d4e2ec231870b80b35b6afa4be42da0ac4449df.

* Revert unwanted changes

* Vfx/feature/expose light probe usage (Unity-Technologies#77)

* First implementation

* Encapsulate all VFX renderer related inspector stuff in RendererEditor class

* Add proxy override and probe anchor settings

* Update changelog

* Fix typo

* fix for override check width.

* fixed slider field focus

* disable blackboard add button is no visualeffect asset is displayed.

* Multiple fixes needed when more than one VisualEffect is selected (FB #1110747) (Unity-Technologies#90)

* Multiple fixes needed when more than one VisualEffect is selected (FB #1110747)

* reseed button give each selected component a different value.

* Refactored VFManagerEditor to cache properties. Guess hen reset has been selected to reset shaders and path to sane value.

* Fix missing inspector for VisualEffectActivationClip

* Use system title first line ( if any ) in Aset inspector output list.

* fix exception when restoring a removed context class.

* Update VFX

*  Better Handling of Null or Missing Parameter Binders (Editor + Runtime) (Unity-Technologies#82)

* Better Handling of Null or Missing Parameter Binders (Editor + Runtime)

* Better Handling of Null or Missing Parameter Binders (Editor + Runtime)

* Fix typo: Remove slot from correct model when removing a block

* Fix 1110419 + optimize a bit

* Fix blend factor not appearing with inherit attribute + bland value is now a [0,1] slider

* Add test to cover more VFX awakening (Unity-Technologies#91)

Only new editor test, dedicated for 2019.2, no backport, no changelog :

* Add some regression test to check visual effect expected serialization behavior

* Add check for reset override

* Force open Game View while running some tests

* Add a failing test of a corner case in prefab

* Covers actually failing manipulation of prefab

* Vfx/feature/addressing mode sequential (Unity-Technologies#93)

* Add addressing mode in Sequential block & Operator

* Fix Spaceable (Unity-Technologies#86)

* First wip of cleaner way to compute spaceable slot list (cached has been init too soon, leading to impossibility of updating slot)

* Fix missing copy space while sanitizing slot

* Fix Undo/Redo & Add a regression test

* Update Change Log

* Minor reverting dirty unwanted changes

* - Cover linked slot situation
- Fix domain reload case

* Rename SpaceSlotConcerned in SlotWithSpaceTransformation

* Use specific PropageChildrenReverse

* Fix for floatfield overridden when focus.

* window OnEnable postpone the loadresource.

* Add Invert Transform GPU (Unity-Technologies#94)

* Add specific expression for saturate, ceil, frac, round

* Add expression for InverseTRSMatrix

* Fix hlsl warning

* Add operator for inverse & transpose

* - Fix VFXExpressionTransformMatrix
- Move SDF to Texture folder
- Start implementing a new graphicTest

* Remove deprecated

* Simplify VFXInverseTRSMatrix (GPU)

* Fix Operator TransposeMatrix & InvertTRSMatrix

* remove deprecated file

* Use projection

* Add 23_InvertTRSMatrix graphic test

* Doesn't use random in gpu event (not really deterministic) & Add reference image

* Update 06_Lineoutput (expected change with new expression for frac)

* Add comment

* Update ChangeLog

* *Update reference images

* Use Matrix4x4.Inverse3DAffine with 2019.2 or newer

* *WIP* Draft for reduction to the saturate operator

* Add reduction & test to detect automatically saturate operator

* Rename CanBeReducedZeroOneToSature in CanBeReducedToSaturate

* Add missing cases for saturate

* fix expanded parameter in blockboard appearing when their category is collapsed.

* Vfx/fix/fixed random (Unity-Technologies#99)

* Fix fixed random

* Update changelog

* Fix consistency

* fix for text alignment within blocks

* fix for indeterminate checkbox.

* Add new editor test for drag&drop (Unity-Technologies#97)

* Create branch & Add new editor test to verify VFXRenderer state while drag & drop (actual fix is in C++)

* Make this new test more fair waiting for culling

* Simpler test to Verify state (and actually, there are some issue with bound)

* Fix missing graph reimport when exception has been thrown (Unity-Technologies#103)

* Cosmetic changes to inspector (to ressemble more like HDRP inspectors) (Unity-Technologies#95)

* Cosmetic changes to inspector (to ressemble more like HDRP inspectors)

* Small fix to get the correct icon when overring a float property override check ( previously the drag to modify value icon was appearing).

* Fix category not folding when clicking on the title.

* More Fixes for PR

* Improve depth buffers blocks + auto reference of buffers for main camera (Unity-Technologies#104)

* Add buffer to expressions and CameraType

* Fix issues with spaceable when chaning types

* Fixes to match  C++

* Another attempt to fix InitSpaceable issue

* Use camera provided depth buffer in collisions

* Temp hook in HDRenderPipeline to copy buffers

* Update depth module test

* Fix compil

* Made Color, Normal and Depth buffers accessible to VFX graphs.

* Fix HDRP compilation

* Fix ProjectOnDepth block

* Fix scene color fetch

* Factorize camera blocks + add a settings for camera mode

* backout changes in VFXPropertyAttribute

* Update and reactivate gfx test

* Dont use colorBuffer if not needed

* Rename Project on Depth to Position (Depth) for consistancy

* Update changelog

* Fix editor test

* Recompile VFX

* Update settings

* Deactivate a test because logging in test does not work on Katana

* Fixes for VFX Parameter Binder Editor (had to derive from Editor due to recent changes) (Unity-Technologies#105)

* Update changelog

* Simplify graphicTest to avoid instability (Unity-Technologies#106)

* Add TotalTime in PreWarm (Unity-Technologies#96)

* Add prewarm total time in inspector

* Minor change

* New propal for prewarm settings

* Fix editor test disabling logging error temporary

* LWRP Unlit (without graphicTest) (Unity-Technologies#3174)

* Fake project to test legacy (actually an automatic copy of VisualEffectGraph)

* Fix build legacy

* Add template for LWRP

* Remove deprecated Meta

* Add missing meta

* Remove project folder & use a 7z as backup

* Fix missing processCamera (allow particles sorting) & renable decal

* Integrate fog function in LWRP

* Update changelog

* Integrate Vertex Shadow Bias

* Fix duplicated line

* Revert added function in LWRP

* Fix ApplyShadowBias Legacy

* Fix missing VFXApplyExposure for LWRP

* Recompile all vfx

* Fix execption while removing a sub-slot on a dynamic operator (Unity-Technologies#107)

* The category name field takes correctly the focus when it is double clicked.

* fix for blackboard tooltip width forcing whole blackboard width.

* Nitpicking for the edition of systems and context titles. edited title appear exactly on top of the static text, with the correct styling.

* Add editor test for rounding & use test case by name for Min/Max

* Additional Parameter Binders (Unity-Technologies#87)

* Additional Parameter Binders

* Fixes + GraphicTest

* Fixed audio instability using wav & forcing play state

* Remove deprecated meta

* Updated Changelog

* Rename UnityEngine.VFX.Utils in UnityEngine.Experimental.VFX.Utility

* Revert 23_ParameterBinders.unity

* Add Reset Call in GraphicTest

* Fix changing namespace *wip* this is incorrect serialization behavior, should not happen

* Fix AudioClip reference

* disable override to detect correctly failure with parameter binders

* Make parameter binder stable again

* Save it runtime mode

* Save vfx after close

* Fix graphicTest build

* Fix antialiased lines

* Fix screen space size block

* Rebuild VFX

* fix fit to text not working

* fix rate field hidden.

* Distortion Output + Graphic Test + Changelog (Unity-Technologies#109)

* VFX Event Tester (SceneView Window)

* Distortion Output + Graphic Test + Changelog

* Changes for PR

* Removed comment

* Removed VF Generator + Block Template generator (Unity-Technologies#110)

* Fix Infinite Loop Spawner (case 1135299) (Unity-Technologies#112)

* Move CanLink to VFXFlowAnchorController

* Add test to avoid loop in graph

* Restore duplicate link test (but adding condition for slotIndex)

* Add EditorTest for VFXController

* Delete problematic files LightingData.asset

* Update changelog

* Minor : Update comment

* Fix SetAttribute initial value (Unity-Technologies#113)

* Fix Set Attribute default value & Add test to check this regression (using alpha)

* Set default lifeTime value to 1.0 instead of 0.0

* Fix Min_Max_Expression_Folding_TestCase (random failure)

* Add comment to explain purpose of a regression test

* Remove useless code in VFXOperator

* Fix Default Scale Attribute content

* Fix case 1126471 : first added value in propertySheet should be mark as overridden (Unity-Technologies#114)

* Revert "Fix case 1126471 : first added value in propertySheet should be mark as overridden (Unity-Technologies#114)" (Unity-Technologies#116)

This reverts commit 873ab6c5dbafc6d6cf32702163b9def540c12c1c.

* Fix case 1126471 : Inspector (Unity-Technologies#117)

* Fix case 1126471 : first added value in propertySheet should be mark as overridden

* Update ChangeLog.md

* Fix hitbox when a category is displayed (Unity-Technologies#115)

Pretty minor and obvious, doesn't require review (and no backport needed)

* Fix base.OnEnable not called in VectorFieldImporterEditor

* Disable Min_Max_Expression_Folding : can't explain the instability for now

* Fix exception in inspector due to debug info (case 1141638)

* Added Gradient Mapping texture color mode for Unlit outputs (Unity-Technologies#118)

* Added Gradient Mapping for Unlit outputs

* Fixes for PR

* Fixed names

* Fix distortion output with planar primitive refactor

* Fix GUITests expceptions

* Clean previous rev

* Forgot missing meta

* Motion vector based flipbook interpolation

* Fix UV in planar primitives for flipbook interpolation + remove unused file

* Fix issue with invalid contexts not being removed from flowk links

* Fix merge

* Recompile VFX

* [1146829] Fix for linking spawner to spawner while first spawner is linked to initialize + test

* Fix space of spacable slot not copy pasted + test

* Set Attribute Spaceable (Unity-Technologies#119)

* Fix for PositionBase block using default Direction attribute instead of newly created Direction

* [1152500] Fix for category disappearing in inspector when it is renamed in the blackboard.

* [1152496] transfer first texture when converting output if no texture of the same name if found.

* Fix conversion of output between planar types.

* Fix position circle z (Unity-Technologies#128)

* Add exposure weight to HDRP lit outputs

* Forgot to update changelog

* Force UpdateSubAssets at the end of SantizeGraph

* Control Awake Event (Unity-Technologies#123)

* Make exposed parameter name delayed.

* Change OnDisable to OnDestroy on VFXViewWindow because OnDisable can be called too late, when the graph and the rest have already been disabled. OnDestroy is called as soon as the window is closed

* Fix vfx parameters & inspector multiselection (Unity-Technologies#132)

* Fix subgraphs issues (compilation, tests and changelog)

* Fix software lines

* Fix merge

* Rebuild VFX

* Add missing meta file
0lento pushed a commit to 0lento/Graphics that referenced this pull request Jun 11, 2020
* call C++ version of CorrelatedColorTemperatureToRGB

* Initial implementation of Raytracing for HDRP-master (Unity-Technologies#2691)

* Light Cluster Build and Debug
Raytraced Reflections
Raytraced Ambient Occlusion
Raytraced Area Shadows
Screen Space jittered 2Dx8 Noise textures
Support for Shader Graph Master Node HDLit
HD raytracing Environement & Custom Inspector
Ao Nvidia denoiser
Bilateral Filter for denoising
Per-Camera Raytracing Filters
Raytracing Manager that handles reconstruction and update
Lit and Unlit Shader support
Mipmap LODs for raytracing

* Minor fix to the HDlitRaytracingPass Shader Graph Master Node

* Re-enabling the full lightloop

* Supporting more Lit Features properly:
- Specular Color
- Iridescence
- Anisotropy
- Clearcoat

* Fixing the transmission

* Delete Lit.shader.orig

* Fix compilation issue after merge

* Update HDRaytracingLightCluster.cs

* Update AmbientOcclusion.cs

* Move raytracing shader variables files

* Add preexposure to raytracing pass

* Rename completeColor to finalColor

* remove INTERSECTION_SHADING define, useless

* Remove HAS_LIGHTLOOP include path from ShaderPass

* some cleanup in raytrace lit shader graph

* Add generation of raytrace visibility pass in master node

* rename defaultLayerMask to editorRaytracingFilterLayerMask

* Move _RaytracedAreaShadow + add more #if ENABLE_RAYTRACING

* rename ShaderVariablesRaytracing to ShaderVariablesRaytracingLightLoop

* rename AreaBillateralShadow => AreaBilateralShadow

* Create AreaBillateralShadow.compute.meta

* remove Area billateral files

* change code to use PerceptualRoughnessToRoughness

* revert undesired change

* Update HDLightUI.cs

* Added Support for multi viewport (Unity-Technologies#2700)

* Multi viewport support WIP

* Fixed motion vector debug

* Formatting

* Formatting again

* Fixed flipY for debug view with cameras with a render texture

* Made a function for draw full screen with viewport.

* Added graphics test

* Fix fog on decals + saturate alpha

* Update HDRPPreprocessShaders.cs

* Update HDRPPreprocessShaders.cs

* Small Fixes to Editor (to enumerate inherited types and filter out abstract ones), + better handling of lists

* fix shader variant stripping

* Update Pre-exposure for lighting buffer

* Fix legacy render path shader compilation issues (already backported)

* Hdrp fix depth and color nodes (Unity-Technologies#2714)

* Make work SceneColor and SceneDepth nodes in HDRP

* Update CHANGELOG.md

* Various corrections asked during the initial review of the Raytracing PR (Unity-Technologies#2713)

* Various corrections asked during the initial review of the Raytracing code

* Removing a duplicate resource bind

* Supporting properly double sided and its modes and supporting the cutoff properly

* Handle undefined space and let user specify them (LocalToWorld & WorldToLocal node concerned) (Unity-Technologies#76)

* Fixed pre-exposure being applied to realtime probes (Unity-Technologies#2717)

* Added exposure control to frame settings and disabled it on reflection probes

Note: frame settings support on probes seem to be half-broken.

* Fixed test ref images

* Rename PreExposure -> ExposureControl

* Added todo

* Add Scene color and depth node tests (Unity-Technologies#2716)

* Fix SSR in forward (Unity-Technologies#2718)

* Fix SSR in forward

* update changelog

* Update HDRenderPipeline.cs

* - Fixed custom editor of Unlit, HD Unlit and PBR shader graph master node

* Fix micro shadowing in forward

* Fix time reset (Unity-Technologies#2720)

* Update CHANGELOG.md

* Don't expose emission for unlit shader

* Various fixes and de-commenting the lit and unlit raytracing shader code (Unity-Technologies#2721)

* Raytraced Area Shadow Merge Corrections

* intersection function for MIS

* Added m_LightDataGPUArray and m_LightCullResult to ReleaseResources in
HDRaytracingLightCluster

* Correcting the alpha test for the hdlit raytracing shader graph

* Only Computing raytraced SSAO when required
Adding a toggle flag for raytraced shadows

* Uncommenting the raytracing subshaders

* Corrections to the raytracing shadow disabling

* Update HDCameraUI.Skin.cs

* Improve Variant Provider interface (Unity-Technologies#73)

* Add overridable ComputeVariant function for variant provider

* Update changelog

* Improve AttributeFromCurve Variant provider & Remove Curl Cellular from listing

* Remove ".XYZ" for library naming

* Prevent to build a player if no hdrp asset found (Unity-Technologies#2729)

* Vector4 Field & Animated Parameter (Unity-Technologies#56)

* Clean approach :
- Use MultiPropertyField instad of Vector4Field
- Use Begin/End property instead of IsAnimated

* Fix inspector while resizing

* Update changelog + rebuild vfx

* Hdrp fix open gl error message (Unity-Technologies#2733)

* Fix OpenGL build error not displayed in the editor

* Removed useless comments

* Camera-relative support for stereo (Unity-Technologies#2719)

* WIP - attempt to fix camera-relative directional shadows with stereo

* Add ApplyCameraRelativeStereoOffset() to avoid dup code

* Fix shadowmaps with camera-relative

* shader code cleanup and fixes

* refactor C# code for stereo camera-relative

* add entry to changelog

* move calls to StereoCameraRelativeEyeToCenter to higher level to avoid applying offset twice

* HD/Post-processing fixes (Unity-Technologies#2732)

* Cleaned up & simplified previous PR on pre-exposure control

* Added guard bands to bloom to deal with RTHandle resizing

Hack, but better than leaking stuff from the top & left of the screen

* Motion blur for PP v3 (Unity-Technologies#2727)

* Manual rebase of wip-motion-blur (modified files)

* Resubmit editor

* Resubmit component

* Resubmit shaders

* Fixup resource asset

* Set intensity to 0 by default

* Revert the no motion set to 2.0

* Use Wave Intrinsics tile generation (2x improvement on PS4, 1.5x on Scorpio)

* Remove int division

* Better threshold for vel prep

* Revert (For now) the thresh check on vel prep stage

* Refactor parallel reduction code

* Getting rid of merged prep and tile

* Slight optimization to the wave intrinsic version of the tile generation

* [Testing - probably going to revert] Try scalar load for tile max velocity

* Revert "[Testing - probably going to revert] Try scalar load for tile max velocity"

This reverts commit 844778ac4935d1a5bd3842636b6b468d1c21892f.

* [Testing - probably going to revert] Try scalar load for tile max velocity

This reverts commit 3dafec82c914d555536ce13c4e1c5ca60fc715dd.

* Revert "[Testing - probably going to revert] Try scalar load for tile max velocity"

This reverts commit 0416e62182acdb143d380bbf50f793aba2322fb9.

* Some messing around with debug vis and weights (nothing useful really, most will be reverted)

* Optimize sample count

Minimum of 2 samples, but we clamp the number of sample so that we'll never have samples that span less than half a pixel.

* Fix few warnings

* Reset history flag

* Clamp tile coordinates when computing neighbourhood max

* Change early out clause in vel prepping

* Change blur group size from 8x8 to 16x16. *Much* better (reduce cost by 1/3 in some cases) on Scorpio, slightly better or same on PS4

* PACKING is now not an option anymore, but always the case

* Optimize sample count is not an option but always on now

* Remove f from float numbers

* Move compute velocity and scale rotation by intensity as well

* Add clamp of camera rotation and move a bit of things from common to prep

* Use texture macros

* Make explicit group size variable

* Handle "Force no motion"

* Better jitter for tiles and update tooltip

This reverts commit 95889accd337e93175fa2f2f93c0e318dfbf6db6.

* Fixup RTHandle issues when switching to different sized RT

* Update UI,  update sample count debug mode and a bit of cleanup

* Fix tab issue

* Convert tabs to spaces

* Comment debug symbols pragma

* Better name for sample count debug view

* Comment on the double direction sampling

* Comment on why we set velocity to 2 for "force no motion"

* Update MotionBlur.cs

* Update MotionBlur.cs

* Fix  Metal API not allowed by HDRP (Unity-Technologies#2736)

* Add enable field to motion blur editor (Unity-Technologies#2737)

* turn off post process for stereo (Unity-Technologies#2735)

* HDRP emission node, unit intensity and pre-exposure control (Unity-Technologies#2722)

* Add Emission Node and pre-exposure control for emission

* Removed emission pre-expose percent for terrain

* Added emission fields for layered lit and layered lit tesselation

* Update CHANGELOG.md

* Added Emission Node doc, and unlit emissive UI

* Use exp2 instead of PositivePow

* Renamed pre-exposure weight to Exposure Weight

* Removed EmissionColorHDR and moved GetExposureMultiplier to

* Add emissive intensity fields for lit tesselation shader

* Better parity for sequential operator (Unity-Technologies#78)

* Better parity for sequential operator, Unify Sequential3D with count as first entries too
=> TODO, add orientable Circle Type & Box Mode

* Add #pragma editor_sync_compilation to various editor and first time shader

* Update HDRenderPipelineResources.asset

* Change cascade shadow map error message (Unity-Technologies#2743)

* Fix for case of Template for LINUX compatibility

* Optimized uberfx & final pass (Unity-Technologies#2749)

Xbox One X (4K):
- Uber without bloom and/or dirt: 540µs -> 368µs (32%)
- Finalpass: 587µs -> 410µs (30%)

* Add tests for motion blur (disabled by default) (Unity-Technologies#2748)

* Fix planar reflection issue after merge of multiviewport (Unity-Technologies#2752)

* update reference screenshots (Unity-Technologies#2753)

* Fix planar reflection issue after merge of multiviewport

* Update reference screenshots

* fixed issue with PBR master node not using correct geometric normal

* Fix issue with mircoshadow and specular occlusion when LightLayers is enabled (Unity-Technologies#2757)

* fix microshadowing with specular occlusoin and lightlayers

* Update SimpleLit.hlsl

* Added color grading curves (YRGB + secondaries) (Unity-Technologies#2759)

* HDRP shader graph HD render queues (Unity-Technologies#2750)

* Added HDMaterialTags to generate shader tags in shader graphs

* Added an error message for objects that have refraction and BeforeRefraction render pass

Plus added a renderpass combobox for unlit shader graph node

* Remove useless comment

* Fix shader graph render pass update when switching opaque/transparent

* Fix transparent render queue generation

* Fixed HDRP shader compilation

* Fixed scaleY in ConnectTarget (was broken when size != 1.0) (Unity-Technologies#79)

* Fixed scaleY in ConnectTarget (was broken when size != 1.0)

* Added changes to changelog

* Fixing the Lit warnings due to Improved moment shadows (Unity-Technologies#2762)

* Material validator hdrp (Unity-Technologies#2738)

* Material validator using Debug Display for HDRP

* Update changlog

Update changelog to include material validation

* Update based on PR feedback

* Update code with PR feedback - Rename validation method

* Update CHANGELOG.md

* Update CHANGELOG.md

* Fix compilation issue + rename mode to diffuseColor / SpecularColor

* Update string in UI

* More renaming

* Fix typo

* Disable Motion blur via intensity instead of checkbox  (Unity-Technologies#2765)

* Disable mb via intensity

* Ooopsie

* Update for 32 threads in wavefronts on Switch. (Unity-Technologies#2724)

* Update for 32 threads in wavefronts on Switch.

* removed SORTLIST() and unecessary GroupMemoryBarrierWithGroupSync() to get parity with PS4/XB1.

* Moved thread group size to 32 threads on Switch (minor speed up from 0.66ms to 0.55ms).

* Encapsulated optimal thread group size into a #define.
PS4, XB1 and Switch can take advantage of the optimal group size.

* Removed obsolete comment (the file is not autogenerated anymore).

* Removed debug mode as it causes compiler error on Switch.

* Updated comments.

* Moved THREAD_GROUP_OPTIMAL_SIZE into platform headers and renamed to PLATFORM_THREAD_GROUP_OPTIMAL_SIZE.

* Missing updated file from previous commit.

* Added comments.

* Use GraphicsFormat instead of RenderTextureFormat  (Unity-Technologies#2761)

* Move to GraphicsFormat

* Fix bug with decals

* Use graphics format instead of format in the pool recycler (Unity-Technologies#2767)

* Fix RenderQueue update when changing surface type on unlit HD master node (Unity-Technologies#2768)

* Fixed serialization of SurfaceThickness setting in Collider Depth

* Fix legacy shader build

* Update depth and color node tests for HDRP (Unity-Technologies#2771)

* Vfx/fix/ui fixes (Unity-Technologies#81)

* Fix exception when a port having edge is removed.

* Refactor ContextUI RefreshContext

* Fix for block edges not disappearing.

* fix for RefreshContext refactor

* fix slider to change value directly on click.

* Fix index when adding new block.

* fix toobar item alignement.

* No longer restore global selection when window is focused( because we receive a focus event even when only one of the docked panel in our window is focused ).

* New iteration on gizmo : make it compatible with new property storage ( property stored only if overridden ) . Fix local/world on component gizmo once again.

* Gizmos : automatically add new property if the gizmo is modified and the value of the gizmo was not overridden yet.

* Unprepare the visual effect editor gizmos when the state of an overridden property has changed.

* Blackboard now shows level two and more of subproperties (for example ArcCircle.circle.center / .radius) if expanded

* Fix location of new context when dropping a flow edge over the graph [FB:1117090]

* [FB:1117127]Opening the Target Component window by clicking on component "edit" updates the state of the toggle "Target GameObject"

* Remove second "Visual Effects" menu[1117105]

* Put Visual Effect graph into preference category.

* Fix for stickynote sliding when dragging a group it is in.

* Fix case where view can't be found in anchor AttachToPanelEvent

* make sure input and output slot are at the same height

* hide divider on contexts when there is no settings.

* Fix block selection border margins.

* Hide settings dvider if the node has no settings.

* Switch to new notification API for scene view in slotcontainereditor.

* Rotate scale gizmo.

* Added Depth sampling modes to the scene depth node (Unity-Technologies#2740)

* Added Depth sampling modes to the scene depth node

* Fix eye depth mode description

* Fixed typos

* Update CHANGELOG.md

* Fix warning an issue with scenecolor node in hdrp (Unity-Technologies#2774)

* Fix warning an issue with scenecolor node in hdrp

* Delete InitTestScene636834054956858632.unity.meta

delete wrong submited files

* Delete InitTestScene636834054956858632.unity

delete wrong submited files

* revert undesired change

* fix for merge

* Hdrp/fix shadergraph hdrenderqueue migration (Unity-Technologies#2776)

* Fix renderingPass creation along data from prior its existance

* Fix renderingPass creation along data from prior its existance (Unlit)

* Fix After PostProcessTransparent generated queue text to be base on Transparent

* [HDRP] Upgrade FrameSettings (Unity-Technologies#2766)

* Introduce BitArray utility class

* Introduce FrameSettingsAttribute to help inspector and DebugMenu display

* Add unit test on BitArray

* Refactor FrameSettings and merge LightLoopSettings

* Add data migration

* Rename and update OverridableFrameSettingsArea UI utility

* Introduce FrameSettingsHistory for DebugMenu debugging agregatted values

* Fix FrameSettings usage

* Fix tooltips of Camera

* Fix former unit tests referencing FrameSettings

* Update UI

* Update DebuggerDisplays

* Fix alignment issue in PlanarReflectionProbe and ReflectionProbe inspectors

* Easing add of new FrameSettings in UI part based on FrameSettingField attribute

* Fix Default non bool FrameSettings

* Fix FrameSettings ordering

* Fix auto numbering of FrameSettingsFieldAttribute

* Fix FrameSettingsHistory and do history field UI

* Add DebugMenu generation on the same principe than inspector

* Add history in DebugMenu

* Clean history activation

* Speed up FrameSettingsHistory enabled

* Cleaning

* QuickFix issue due to PreviewCamera becoming of type Game for no reason.

* Add auto fixing broken serialized resources for HDRP.

* Update reflection method call for Preview of camera to reflect updated trunk

* Add support for multiselection

* Missing migration of recently added ExposureControl

* Update reflection method call for Preview of PlanarReflectionProbe to reflect updated trunk

* Update changelog

* Fix issue when adding-removing Scene View tab

* Fix typos

* Update FrameSettings.Migration.cs

* Prenvent very old probes to crash at migration when they have no LightLoopSettings

* Prevent SceneCameras to feed several times debug menu when HDRenderPipeline is reconstructed

For instance, this occures when we launch graphics tests

* Update MiniProfiler and debug menu which was broken

* Revert "Update MiniProfiler and debug menu which was broken"

This reverts commit 434b5a14f52075cf259f6f4958525a57ff27a390.

* Update FrameSettings.cs

* Update 2301_Shadow_Mask.unity

* Primary Visibility and Area Shadow (plus some additional raytracing features) (Unity-Technologies#2770)

* Adding a Raytracing render queue for both transparent and opaque objects
Opaque Objects that are in the raytracing queue are rendered in the prepass and not in the deferred/forward passes
Adding the primary visibility mode in the raytracing environement
Correcting a label in the rt_env_inspector
Adding a Debug Mode for raytracing area shadow
Adding an equivalent of the ssr lit brdf evaluation
Adding a forward raytracing pass for the lit and the unlit
Supporting Ior for the lit.shader
Implementing a HDRaytracingRenderer that handles primary visibility code
Adding resources for the raytracing primary ray
Not Pushing a light to the Light cluster if null (has been deleted)
Enabling Automatic raytracing scene invalidation on hierarchy change in the editor
Using the global command buffer parameter instead of the raytracing one when required for closest hit
Adding a texture for the analytic value (required for shadow filtering)
Adding default anyhit shaders to ambient occlusion and area shadow raytracing shaders
Adding the remainingDepth to the rayintersection structure
Adding an input reflection and transmission value for the Raytracing Lightloop and adding them to the evaluation
Adding the light dimension to the spherical rectangle
Correcting the bias usage for Raytraced AO and Reflection

* Refactoring and stabillization changes for the raytracing code

* Review corrections

* Order in args check for raytracingrenderer

* Delete 9601_MotionBlur.meta

* Update reference screenshots

* Avoid issue with modulo (save actually some computation recycling result of unsigned division anyway) (Unity-Technologies#83)

* remove unsupported FormerlySerializedAs in ShaderGraph serialisation (Unity-Technologies#2779)

* Hdrp/fix framesettings formerly nullable tests (Unity-Technologies#2781)

* Remove test: FrameSettings cannot be null anymore.

* Change test: FrameSettings cannot be null anymore. But wrong rendertexture type.

* Update 8205 test

* Add editor test to cover fixed delta time (using an debug spawner state) (Unity-Technologies#84)

* Update graphic test (scene + screenshots)

* Update HDCubemapInspector.cs

* Vfx/fix/add prefab editor test 1117103 (Unity-Technologies#80)

* Add new test with expected failure (commented in l.171 & 172) : Covers simple prefab override from fogbugz 1117103

* Add other test to cover future possible issue due to refactor of serialization cycle in VisualEffect component

* Minor : change exposed name

* Hdrp master reflection fix (Unity-Technologies#2785)

Fix of debug mode with reflection probe

* Hdrp/fix framesettings msaa and exposurecontrol (Unity-Technologies#2786)

* Add negativeDependency in FrameSettings

* Make MSAA's frame settings more user friendly

* Fixed sky exposure (Unity-Technologies#2778)

Fixed sky exposure

* Update CHANGELOG.md

* Hdrp/new ambient mode (Unity-Technologies#2630)

* - Added AmbientMode enum
- Renamed Baking Sky to Static Lighting Sky

* Implemented static and dynamic sky ambient probe

* Optimized version of AmbientProbeConvolution

* Removed manual serialization from static lighting sky

* Increased the number of sample to 256 (optimized with LDS on PS4/XBone)

* Fixed ambient probe flickering when a preview is displayed

* Changelog + Comment fixes

* Updated Test data according to static lighting changes

* - Fixed deprecated calls
- Fixed static lighting when no baking sky is present
- Fixed deserialization of former BakingSky component.

* Fixes/comments from PR feedback

* Removed f from float values in ambient convolution shader.

* Refactor to make realtime GI work with ambient static/dynamic modes

* Fixed issue with missing skybox material when running tests.

* Updated screenshots

* Temporarily disabled realtime GI part of test 2102

* Update Screenshots after merge

* Update scenes and screenshots

* Rebuild vfx

* Fix shader compilation issue  (Unity-Technologies#2793)

* Fix shader compilation issue

* remove old def on PS4

* Hdrp/fix framesettings probe overrides and tests (Unity-Technologies#2794)

* Make DebuggerDisplay easier to read between FrameSettings and FrameSettingsOverideMask

* Fix FrameSettings override for ReflectionProbes

* Fix FrameSettings Equals

* Fix RandomUtilities.RandomFloat and add RandomEnumValue

* Add unit tests for framesettings aggregation

* Ammend CameraSettingsUtilitiesTests.ApplySettings test with FrameSettings check

* Fix missing ShaderLitMode in FrameSettingsMigration

* Added migration test for FrameSettings

* update vfx test screenshot for master

* Update skyManager with  UnityEditor.Lightmapping api changed

* Hdrp fix double sided (Unity-Technologies#2798)

* Fix the flip for the Lit shader

* Move flip normal handling to the resolve point

* Remove bitangent flips

* Fix the double sided 'None' mode

* Unify code of Lit and SG

* update init values

* comment //#pragma enable_d3d11_debug_symbols

* Update reference screenshots

* FrameSettings SSR & Raytracing Fixes (Unity-Technologies#2801)

* Corrections due to merge issues

* SSR FrameSetting condition correction

* Update 2103 test

* Ambient occlusion raytracing hit distance (Unity-Technologies#2802)

Correcting type in the raytracing enable flag

* Add inverse lerp node (Unity-Technologies#85)

* Corretions for the render queue field in shader graph hdrp shaders (Unity-Technologies#2787)

* Corretions for the render queue field in shader graph hdrp shaders

* Only display working rendering pass for now for surfacetype

* Some cleaning

* Fixed issues with realtime probe resolution (Unity-Technologies#2806)

* - Fixed an issue where probe target texture wasn't resized properly when changing HDRP asset.
- Fixed rendering viewport for probe rendering

* Updated obsolete screenshot (exposure issue)

* Update changelog

* Rebuild vfx

* Update bad reference image

* Update VFX Test project settings

* Revert "Update VFX Test project settings"

This reverts commit 9d4e2ec231870b80b35b6afa4be42da0ac4449df.

* Revert unwanted changes

* Vfx/feature/expose light probe usage (Unity-Technologies#77)

* First implementation

* Encapsulate all VFX renderer related inspector stuff in RendererEditor class

* Add proxy override and probe anchor settings

* Update changelog

* Fix typo

* fix for override check width.

* fixed slider field focus

* disable blackboard add button is no visualeffect asset is displayed.

* Multiple fixes needed when more than one VisualEffect is selected (FB #1110747) (Unity-Technologies#90)

* Multiple fixes needed when more than one VisualEffect is selected (FB #1110747)

* reseed button give each selected component a different value.

* Refactored VFManagerEditor to cache properties. Guess hen reset has been selected to reset shaders and path to sane value.

* Fix missing inspector for VisualEffectActivationClip

* Use system title first line ( if any ) in Aset inspector output list.

* fix exception when restoring a removed context class.

* Update VFX

*  Better Handling of Null or Missing Parameter Binders (Editor + Runtime) (Unity-Technologies#82)

* Better Handling of Null or Missing Parameter Binders (Editor + Runtime)

* Better Handling of Null or Missing Parameter Binders (Editor + Runtime)

* Fix typo: Remove slot from correct model when removing a block

* Fix 1110419 + optimize a bit

* Fix blend factor not appearing with inherit attribute + bland value is now a [0,1] slider

* Add test to cover more VFX awakening (Unity-Technologies#91)

Only new editor test, dedicated for 2019.2, no backport, no changelog :

* Add some regression test to check visual effect expected serialization behavior

* Add check for reset override

* Force open Game View while running some tests

* Add a failing test of a corner case in prefab

* Covers actually failing manipulation of prefab

* Vfx/feature/addressing mode sequential (Unity-Technologies#93)

* Add addressing mode in Sequential block & Operator

* Fix Spaceable (Unity-Technologies#86)

* First wip of cleaner way to compute spaceable slot list (cached has been init too soon, leading to impossibility of updating slot)

* Fix missing copy space while sanitizing slot

* Fix Undo/Redo & Add a regression test

* Update Change Log

* Minor reverting dirty unwanted changes

* - Cover linked slot situation
- Fix domain reload case

* Rename SpaceSlotConcerned in SlotWithSpaceTransformation

* Use specific PropageChildrenReverse

* Fix for floatfield overridden when focus.

* window OnEnable postpone the loadresource.

* Add Invert Transform GPU (Unity-Technologies#94)

* Add specific expression for saturate, ceil, frac, round

* Add expression for InverseTRSMatrix

* Fix hlsl warning

* Add operator for inverse & transpose

* - Fix VFXExpressionTransformMatrix
- Move SDF to Texture folder
- Start implementing a new graphicTest

* Remove deprecated

* Simplify VFXInverseTRSMatrix (GPU)

* Fix Operator TransposeMatrix & InvertTRSMatrix

* remove deprecated file

* Use projection

* Add 23_InvertTRSMatrix graphic test

* Doesn't use random in gpu event (not really deterministic) & Add reference image

* Update 06_Lineoutput (expected change with new expression for frac)

* Add comment

* Update ChangeLog

* *Update reference images

* Use Matrix4x4.Inverse3DAffine with 2019.2 or newer

* *WIP* Draft for reduction to the saturate operator

* Add reduction & test to detect automatically saturate operator

* Rename CanBeReducedZeroOneToSature in CanBeReducedToSaturate

* Add missing cases for saturate

* fix expanded parameter in blockboard appearing when their category is collapsed.

* Vfx/fix/fixed random (Unity-Technologies#99)

* Fix fixed random

* Update changelog

* Fix consistency

* fix for text alignment within blocks

* fix for indeterminate checkbox.

* Add new editor test for drag&drop (Unity-Technologies#97)

* Create branch & Add new editor test to verify VFXRenderer state while drag & drop (actual fix is in C++)

* Make this new test more fair waiting for culling

* Simpler test to Verify state (and actually, there are some issue with bound)

* Fix missing graph reimport when exception has been thrown (Unity-Technologies#103)

* Cosmetic changes to inspector (to ressemble more like HDRP inspectors) (Unity-Technologies#95)

* Cosmetic changes to inspector (to ressemble more like HDRP inspectors)

* Small fix to get the correct icon when overring a float property override check ( previously the drag to modify value icon was appearing).

* Fix category not folding when clicking on the title.

* More Fixes for PR

* Improve depth buffers blocks + auto reference of buffers for main camera (Unity-Technologies#104)

* Add buffer to expressions and CameraType

* Fix issues with spaceable when chaning types

* Fixes to match  C++

* Another attempt to fix InitSpaceable issue

* Use camera provided depth buffer in collisions

* Temp hook in HDRenderPipeline to copy buffers

* Update depth module test

* Fix compil

* Made Color, Normal and Depth buffers accessible to VFX graphs.

* Fix HDRP compilation

* Fix ProjectOnDepth block

* Fix scene color fetch

* Factorize camera blocks + add a settings for camera mode

* backout changes in VFXPropertyAttribute

* Update and reactivate gfx test

* Dont use colorBuffer if not needed

* Rename Project on Depth to Position (Depth) for consistancy

* Update changelog

* Fix editor test

* Recompile VFX

* Update settings

* Deactivate a test because logging in test does not work on Katana

* Fixes for VFX Parameter Binder Editor (had to derive from Editor due to recent changes) (Unity-Technologies#105)

* Update changelog

* Simplify graphicTest to avoid instability (Unity-Technologies#106)

* Add TotalTime in PreWarm (Unity-Technologies#96)

* Add prewarm total time in inspector

* Minor change

* New propal for prewarm settings

* Fix editor test disabling logging error temporary

* LWRP Unlit (without graphicTest) (Unity-Technologies#3174)

* Fake project to test legacy (actually an automatic copy of VisualEffectGraph)

* Fix build legacy

* Add template for LWRP

* Remove deprecated Meta

* Add missing meta

* Remove project folder & use a 7z as backup

* Fix missing processCamera (allow particles sorting) & renable decal

* Integrate fog function in LWRP

* Update changelog

* Integrate Vertex Shadow Bias

* Fix duplicated line

* Revert added function in LWRP

* Fix ApplyShadowBias Legacy

* Fix missing VFXApplyExposure for LWRP

* Recompile all vfx

* Fix execption while removing a sub-slot on a dynamic operator (Unity-Technologies#107)

* The category name field takes correctly the focus when it is double clicked.

* fix for blackboard tooltip width forcing whole blackboard width.

* Nitpicking for the edition of systems and context titles. edited title appear exactly on top of the static text, with the correct styling.

* Add editor test for rounding & use test case by name for Min/Max

* Additional Parameter Binders (Unity-Technologies#87)

* Additional Parameter Binders

* Fixes + GraphicTest

* Fixed audio instability using wav & forcing play state

* Remove deprecated meta

* Updated Changelog

* Rename UnityEngine.VFX.Utils in UnityEngine.Experimental.VFX.Utility

* Revert 23_ParameterBinders.unity

* Add Reset Call in GraphicTest

* Fix changing namespace *wip* this is incorrect serialization behavior, should not happen

* Fix AudioClip reference

* disable override to detect correctly failure with parameter binders

* Make parameter binder stable again

* Save it runtime mode

* Save vfx after close

* Fix graphicTest build

* Fix antialiased lines

* Fix screen space size block

* Rebuild VFX

* fix fit to text not working

* fix rate field hidden.

* Distortion Output + Graphic Test + Changelog (Unity-Technologies#109)

* VFX Event Tester (SceneView Window)

* Distortion Output + Graphic Test + Changelog

* Changes for PR

* Removed comment

* Removed VF Generator + Block Template generator (Unity-Technologies#110)

* Fix Infinite Loop Spawner (case 1135299) (Unity-Technologies#112)

* Move CanLink to VFXFlowAnchorController

* Add test to avoid loop in graph

* Restore duplicate link test (but adding condition for slotIndex)

* Add EditorTest for VFXController

* Delete problematic files LightingData.asset

* Update changelog

* Minor : Update comment

* Fix SetAttribute initial value (Unity-Technologies#113)

* Fix Set Attribute default value & Add test to check this regression (using alpha)

* Set default lifeTime value to 1.0 instead of 0.0

* Fix Min_Max_Expression_Folding_TestCase (random failure)

* Add comment to explain purpose of a regression test

* Remove useless code in VFXOperator

* Fix Default Scale Attribute content

* Fix case 1126471 : first added value in propertySheet should be mark as overridden (Unity-Technologies#114)

* Revert "Fix case 1126471 : first added value in propertySheet should be mark as overridden (Unity-Technologies#114)" (Unity-Technologies#116)

This reverts commit 873ab6c5dbafc6d6cf32702163b9def540c12c1c.

* Fix case 1126471 : Inspector (Unity-Technologies#117)

* Fix case 1126471 : first added value in propertySheet should be mark as overridden

* Update ChangeLog.md

* Fix hitbox when a category is displayed (Unity-Technologies#115)

Pretty minor and obvious, doesn't require review (and no backport needed)

* Fix base.OnEnable not called in VectorFieldImporterEditor

* Disable Min_Max_Expression_Folding : can't explain the instability for now

* Fix exception in inspector due to debug info (case 1141638)

* Added Gradient Mapping texture color mode for Unlit outputs (Unity-Technologies#118)

* Added Gradient Mapping for Unlit outputs

* Fixes for PR

* Fixed names

* Fix distortion output with planar primitive refactor

* Fix GUITests expceptions

* Clean previous rev

* Forgot missing meta

* Motion vector based flipbook interpolation

* Fix UV in planar primitives for flipbook interpolation + remove unused file

* Fix issue with invalid contexts not being removed from flowk links

* Fix merge

* Recompile VFX

* [1146829] Fix for linking spawner to spawner while first spawner is linked to initialize + test

* Fix space of spacable slot not copy pasted + test

* Set Attribute Spaceable (Unity-Technologies#119)

* Fix for PositionBase block using default Direction attribute instead of newly created Direction

* [1152500] Fix for category disappearing in inspector when it is renamed in the blackboard.

* [1152496] transfer first texture when converting output if no texture of the same name if found.

* Fix conversion of output between planar types.

* Fix position circle z (Unity-Technologies#128)

* Add exposure weight to HDRP lit outputs

* Forgot to update changelog

* Force UpdateSubAssets at the end of SantizeGraph

* Control Awake Event (Unity-Technologies#123)

* Make exposed parameter name delayed.

* Change OnDisable to OnDestroy on VFXViewWindow because OnDisable can be called too late, when the graph and the rest have already been disabled. OnDestroy is called as soon as the window is closed

* Fix vfx parameters & inspector multiselection (Unity-Technologies#132)

* Fix subgraphs issues (compilation, tests and changelog)

* Fix software lines

* Fix merge

* Rebuild VFX

* output refactor

* Rebuild VFX

* Missing meta
mohammad22 pushed a commit that referenced this pull request Oct 3, 2022
* Fixed fallback radiance baking when dirty flags are enabled.
* Fixed noticeable intensity loss for lower propagation quality due to axis weights renormalization error.
* Separate radiance comparison for LogLUV encoding that avoids many false positives in dirty flags.
* Fixed propagation data not being cleared when Frame Settings are changed via the settings window causing the pipeline to be destroyed.
mohammad22 pushed a commit that referenced this pull request Oct 19, 2022
…alize projection.

Dynamic GI Propagation: Sample Neighbors: Use ZH-Fit to convert from SH to our 26-axis basis - it produces results that are a bit closer to our monte carlo naive projection ground truth

Dynamic GI: Fix Infinite Bounce calculation after we changed our basis coefficients. We were missing scaling each lobe contribution by that lobes normalized integral. Also delete some dead code that was hanging around in the dynamic GI area for too long, and fix some code erroneously included inside of an ifdef (#109)

Dynamic GI probe dirty flag (#111)

* Store a dirty flag for each light probe in a volume, update only the ones that had reasons to change since the last update.
* Added a setting to Frame Setting to be able to disable dirty flags.
* Added debug visualisation of dirty probes of all active volumes.

DGI propagation fixes (#112)

* Fixed fallback radiance baking when dirty flags are enabled.
* Fixed noticeable intensity loss for lower propagation quality due to axis weights renormalization error.
* Separate radiance comparison for LogLUV encoding that avoids many false positives in dirty flags.
* Fixed propagation data not being cleared when Frame Settings are changed via the settings window causing the pipeline to be destroyed.

critical exception fix that was firing on domain reloads & enter play mode transitions
mohammad22 pushed a commit that referenced this pull request Oct 20, 2022
* Fixed fallback radiance baking when dirty flags are enabled.
* Fixed noticeable intensity loss for lower propagation quality due to axis weights renormalization error.
* Separate radiance comparison for LogLUV encoding that avoids many false positives in dirty flags.
* Fixed propagation data not being cleared when Frame Settings are changed via the settings window causing the pipeline to be destroyed.
mohammad22 pushed a commit that referenced this pull request Oct 21, 2022
Probe Volume:

Uncomment Probe Volume related menu items

Baked Lighting Workflow: Maintain lists of all Probe Volume instances and publicly expose to allow game-specific bake code to turn on and off relevant lighting data for context-specific bakes.

Probe Volume:

Probe Volume Improvements

Probe Volumes: Force the lightmapper to free old additionalbakedata jobs in a few cases, such as when probe volumes are disabled, or when probe volumes are hidden. Previously, it looks like the lightmapper could hang onto this data until you quit. (#19)

Probe Volumes: Lots of bugfixes and improvements to bilateral filtering modes. Octahedral Depth data now working (requires changes on the C++ side). Added support for comparing filtering the texel coordinates and then taking a single sample, vs taking 8x samples and then filtering the results. Ported over from unity graphics repo 3c3b091

Probe Volumes: Lots of bugfixes around baking. Reflection Probes and Density Volumes: now respect scene visibility toggles in regards to their contribution to the scene. TODO: Remove debug logging that was added! Backing up WIP work.

SceneObjectIDMap: Fix bug where index from gameobject dictionary would get out of sync from entries after an insertion occurred to fill a hole. This resulted in a nasty bug where reflection probes would occasionally generate the same filename as eachother, would overwrite eachothers textures, and would point to the same texture after the bake completed.

Probe Volume: Comment out log spam. Planning to clean it out completely in a follow up commit

Probe Volume: Remove log spam from ProbeVolumeManager

Added HDRP_STRIP_LEGACY_AMBIENT_PROBE_BAKING define for enabling legacy ambient probe bake feature stripping - requires custom build with backport of https://ono.unity3d.com/unity/unity/pull-request/123092/_/lighting/SRP-opt-out-skymanager

Make HDBakedReflectionSystem public for baking API

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volume: Wrap editor-only variable dataNeedsDilation in UNITY_EDITOR define blocks to avoid warnings.

Probe Volumes: Track whether or not bake inputs has been set, and only attempt to get bake data if the inputs was set. Otherwise the lightmapper will error out.

Probe Volume: Add View Bias support - exposed on the ProbeVolume component next to Normal Bias (#25)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

 Probe Volume:

 Probe Volume binary serialization and minor fixes

* Prefer binary serialization of Probe Volume assets.

* Added "Reserialize All" action to context menus of ProbeVolumeAsset to be able to convert all assets in a project to binary format.

Probe Volume: Add support for sampling probe volumes from volumetrics. Probe Volume inner loop cleanup happened in the process. Added support for disabling bilateral filtering via a define, which is used in volumetrics and vfx sampling of probe volumes now.

Fix bug where density volume voxelization would erroneously sample and voxelize density volumes that no longer existed due to assumption that density volumes were last in the light list (they are not anymore: probe volumes come after).

Probe Volumes: Reflection Probe Normalization by Probe Volumes added. In order to enable, NormalizeReflectionProbeWithProbeVolume needs to be enabled in the Frame Settings for the Camera, and scenes need to be rebaked. Options exist on the ProbeVolumeController volume override. (#27)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Reflection Probe Normalization: Add #if UNITY_EDITOR guards around Subscribe/UnsubscribeSHBaking

Probe Volume: Fix vector truncation warnings in sample SH Luminance functions

Probe Volume: Fix one more vector trunction warning

Enable Probe Volumes with L2 Encoding mode

Probe Volumes: Lots of bugfixes and improvements to bilateral filtering modes. Octahedral Depth data now working (requires changes on the C++ side). Added support for comparing filtering the texel coordinates and then taking a single sample, vs taking 8x samples and then filtering the results. Ported over from unity graphics repo 3c3b091

Probe Volume Normalization Baking Bugfix: Sanitize out sentinel values from reflection probe request positions array - large values caused the lightmapper to barf killing all direct lighting contribution. Also added tracking for whether or not the data was set, as the lightmapper is not robust to multiple set calls

Probe Volume: Make ProbeVolumeinternals visible to Unity.Entities.Hybrid.HybridComponents so that they can be converted for hybrid rendering

Probe volumes rotation + reflection probe normalization fixes and improvements. Also lots of cleanup to avoid debug-only + lightmapper work when in playmode. Cleaned out old deadcode + comments. Cleaned some GC cases (#1)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

ReflectionProbeLuminanceSHPreview: Fix path to shader after merge conflict resolution mistake

Probe Volume: Fix bug where bakingEnabled flag was not correctly being set to false when ForceOff was triggered in the editor (not in playmode). Also add additional logging around case where lightmapper does not have data for a specific ID (so we can track down the source faster in the future)

Probe Volume: Set methods for Probe Volumes exposed that allows us to use them to do deep copies of Scenes

Probe Volume Reflection Probe Normalization: Use dominant specular direction for normalization instead of R. For low roughness materials, this has little to no effect (because it uses the R vector still). For high roughness materials, this bends towards normalizing against the surface normal instead of R. So this feature improves quality of high roughness specular

Fix warning log that had some formatting error

DOTS Probe Volume (#2)

Changed the runtime registration and access of Probe Volumes to be able to feed additional data for rendering from a DOTS system.

Avoid boxing when using ProbeVolumeAtlasKey in a dictionary. (#4)

Probe Volume Reflection Probe Normalization: Fix error: Output Particle Lit Quad': undeclared identifier 'ComputeReflectionProbeNormalizationDirection'

Fix double dark ao and ao in lightloop (#12)

Fix double dark AO + material AO availability in light loop for probe volumes. Probe Volumes: Pack AO and isUninitializedGI flag into .x channel of light layers GBuffer RT to fix double dark AO and to allow emissive surfaces to receive probe volume lighting. Also perform small restructuring to a probe volume bilateral filter function to remove a shader warning

Dynamic GI:

Probe Volume Dynamic GI V1 (#7)

Large feature addition to Probe Volumes to support Dynamic GI at runtime & in editor via compute jobs. Huge coordination across game team, Spotlight & HDRP team to refine the algorithm and feature set.

Key Features
- New toggle on a light "Affects Dynamic GI"
- New toggle on a probe Volume "Support Dynamic GI"
- New debug draw mode on a probe volume "Draw Neighbors" to visualize the neighbor the dynamic GI light will bounce around in
- All light types are supported

Missing features
- During albedo baking step, mask volumes are not being sampled correctly
- Off screen lights are missing their shadows when being sampled by the Hit pass of the Dynamic GI compute shader
- Directional light GI seems off, maybe its the offscreen shadow issues
- Sky lighting is not supported at the moment in the dynamic GI
- Currently does not encode emissive in the neighborhood bake data, only albedo, surface distance & normal
- Currently does require a re-bake when geometry changes, the only thing it relies on getting from the lightmapper is the probe validity value

Commit notes:
* Added dynamic GI options onto HDLight and ProbeVolume inspectors
* work in progress dynamic gi
* lots more refactoring on the data model and packing for hits vs misses
* Cleanup dynamic GI code into separate file
* Working axis baking code with visualization
* small fixes
* validity scale fix
* neighbor draw quad scale control
* small fix
* scale fix
* First pass at albedo extraction code for DynamicGI
* bake bug fix
* Albedo baking via Shader Graph works now, and more tweaks to neighbor debug draw
* bug fix
* Dynamic GI neighbor cleanup to use real probe volume data for positioning
* bug fix for non uniform density volumes
* cleanup
* Cleanup and setup of Propagation Buffers
* more work in progress dynamic GI, have a test read modify write of SH data working
* cleanup dynamic GI values when its disabled
* more cleanup
* bug fix
* New improved Albedo sampling code from Francesco
* cache debug shader not material, works better for some reason
* Lots of shader code and setup for real-time GI propagation. Still a work in progress but most code written on GPU side
* All the compute data hooked up first pass
* Kinda of working
* Slightly better, still not there
* Fixes plus re-write of SH data in dynamic GI
* First kinda working version of new RTGI, needs lots of tuning and improvements
* Move VolumeComponent to seperate file so it is preserved when assets are saved
* More improvements, anti alias punctual lights and add a secondary bounce to hits
* Tweaks, added FCC's SH logic for testing / comps
* Cleanup and addition of 3D texture for Irradiance sampling to smooth out history
* Cleanup & and added back bounce boost control for hit pass
* Tuning defaults
* more filddleing with defaults
* temp code for testing
* Intended L1
* Adding Affect Dynamic GI to light explorer UI
Fixing hit lighting logic to work with multiple lights
* Adding de-ringing to SH
Exposing class outside of HDRP for play mode testing
* Move probe volume update code around so worked better with needing state set before dispatches
* Integration of SG logic for Irradiance Cache, way cleaner and better results. Removed old Irradiance cache logic using L1 SH
* More cleanup and refinements of SG algorithm
* Bias punctual lights near surfaces to fix strobing
* Cleanup
* name cleanup
* Support volume rotation in neighbor debug view mode
* Fixed contribution normalization. Changed the direction for infinite bounces evaluation from reflection to surface normal.
* changing default sharpness to 3.5 to reduce dark banding a tad
* Hacked prototype of an alternative propagation algorithm.
* Smoothed radiance gathering from hits.
* Cleanup and temp NaN propagation workaround.
* Changed History Contribution min limit to 0 to be able to test propagation without it.
* Removed old algorithm, cleaned up data format and volume parameters to make new directional version the default one
* Fixed Probe Volume dynamic GI data access after merging with the DOTS Probe Volume feature.

Signed-off-by: Andrew Saraev <andrew.saraev@unity3d.com>

* Fixed up popping issues with Dynamic GI and other probe volumes in view, plus made it so the light list is global, not camera view culled so all lights stay active in the list for GI to propagate more accurately and shadows to update even for lights behind the camera.

Merged with latest

* Build compile fixes
* Player build fixes, real-time GI now works in player builds
* HDRP settings and toggles for probe volume dynamic GI
* missed files for previous checkin
* small optimizations
* turn on optimizations in key dynamic gi shaders for perf
* Custom dynamic GI light list that also includes off screen lights
* Explicitly set dataUpdated when data is uploaded to the atlas instead of setting it in GetPayload() of the volume. To simplify communication with the DOTS version.

* use shadows for dynamic GI lights. This still has a bug where off screen lights get their shadow indexes reset to -1
* Better disposing of propagation buffers
Cleaned up global compute buffers for SH L012 and validity buffers, and reusing those per probe volume for propagation to reduce memory usage

* possible mem leak fix & piping light bounce intensity through to dynamic GI
* Some PR feedback and distance checks to probe hit & propagation phases

* Added basic distance checks to entire probe volume to dispatch dynamic GI jobs or not
* directional lights are weird, maybe the shadows, we should avoid them
* PR feedback
* Refactored ProbeVolumeBuffers cleanup to keep GameObject and DOTS logic similar.
* Attempt to reduce white space conflicts
* Profiler marker for Dynamic GI
Slight optimization in light loop
* Optimized C# by not doing SetData calls on Buffers unnecessarily

Co-authored-by: Andrew Saraev <andrew.saraev@unity3d.com>

Bug fixes from Dynamic GI.
Cleanup buffers after bakes, and only dispatch dynamic GI for scene or game cameras

Dynamic GI Spherical Harmonic from Spherical Gaussian Modes (#9)

* Implemented SH from SG Modes which can be toggled between in the Probe Dynamic GI volume settings. SamplePeakAndProject is the same mode we are used to: Spherical gaussians will simply be evaluated at their peak and projected to convert to spherical harmonics. SHFromSGFit: A spherical gaussian to spherical harmonic function fit is used, which is physically plausible. SHFromSGFitWithCosineWindow: A spherical gaussian with an additional cosine window to spherical harmonic function fit is used, which is physically plausible. Less directional blur than SHFromSGFit.

* Cleanup pass on SG to SH supporting math. Created Zonal Harmonic data type with supporting functions to add type saftey to the transforms as we have done with the other spherical harmonic functions. Created specialized zonal harmonic rotation functions which significantly reduces the work required for rotation. It's possible the compiler was handling this already by stripping out work on zero coefficients, and by automatically using floats instead of float3s when all channels are the same - but better to not put too much pressure on the compiler. This should also make it easier in the future to create specialized rotation functions for cardinal rotations (which will introduce additional zeros).

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Dynamic GI: Fix a bunch of shader warnings in DynamicGI shaders.

Bug fix so that lights can act as dynamic GI only lights

Probe Volumes:

Created a proper Probe Volume probe rendering shader. All probes in a selected probe volume are rendered in a single DrawProcedural call, 2 triangle per probe (screen space quads). Allows me to get rid of a lot of nasty mesh setup logic that was previously happening. The new Draw Probes debug shader currently has two additional options: Draw Validity, and Highlight Ringing (#14)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Use GlobalObjectId.targetObjectId (#16)

* Probe Volumes: Use GlobalObjectId.targetObjectId to uniquely identify Probe Volumes, and Probe Volume Asset ownership, rather than GetInstanceID() - which was not guarenteed to be persistent. This PR cleans up the related logic, allowing us to guarentee non-colliding bake ids, avoids hanging on to asset references during duplication of probe volumes, and, in the case where you have intentionally referenced a probe volume asset on a probe volume that does not own it, avoids baking that asset, which would previously stomp source data.

* Probe Volumes: GlobalUniqueID: Use a custom stack-only + packed representation of the full GlobalObjectId, rather than only using GlobalObjectID.targetObjectId to avoid collisions when different scene probe volumes happen to have the same targetObjectId. This also allows full backwards asset lookup in the future if necessary, which should help debugging + build tools.

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Make all bake requests go through the AdditionalGIBakeRequestsManager. Track the generationIndex in the least significant 8 bits of the lightmapperBakeID, and talk to the lightmapper with this composite ID. This ensures that anytime we call SetAdditionalBakeProbes we generate a completely unique bake request from the perspective of the lightmapper, ensuring that we will always bake this data (because the lightmapper will hash these IDs to determine if it has any work to do). Previously, if we set an ID with new data, or if we cleared an ID then set it with new data, the lightmapper wouldnt track these data changes, and so it would skip baking these actually new bake requests. (#17)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Fix Debug Colors display mode - shader line got erroneously commented out in a PR a few months back (#18)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Fix exposure in Probe Volume debug modes (ensure no exposure is applied (#19)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Maintain user specified absolute world space positive and negative fade while resizing bounds handle. This makes Probe Volumes resize behavior match behavior of Density Volumes and Reflection Probes. (#20)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Fix PROBE_VOLUMES_SAMPLING_MODE defines in GetReflectionPRobeNormalizationFactor (#23)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volume: Add RenderGraph support for Probe Volumes.

Originally this was implemented in this PR: Partner/crazyhunter 10.6.0 custom.1 rendergraph 1a835fd
However, the PR contained some fairly large code divergences from mainline - so it was split out into multiple new commits during this upgrade, and divergence was minimized.

Mask Volumes:

Mask Volumes. An ability to place volumes with 3D textures into the world, paint custom color into them and sample this data in any Shader Graph. To be used as a global volumetric splat map. (#16)

(cherry picked from commit f68dc61b5c92ccea7f249e7f58aab1583799ddcb)

Mask Volumes tools update (#22)

* Fixed the issue when the scene view camera moves on selecting the painting tool.

* Use normalized values for color and opacity settings. Fixed the effect of opacity and hardness.

* Added the brush color inversion while Ctrl is pressed, for quick erasing.

* Replaced the Recreate Asset button with Resample Asset. The data is not lost after resizing or changing voxel density now.

* Fixed a Mask Volume resampling error when old resolution has 1 on any axis.

* Mask Volume: Use resolution from MaskVolumeAsset instead of MaskVolumeArtistParameters for rendering. Resolution in parameters is just for creating new assets or resampling to a new resolution.

* Mask Volume: Use normal bias in painting.

* Mask Volume: Use input pressure as opacity.

* Mask Volume: Added inner radius and normal bias brush gizmos.

Mask Volume: Hotfix: Avoid attempting to upload degenerate data to the atlas by extending IsDataAssigned() check to include a Length > 0 test

Fixed the case when a Mask Volume asset is saved to a file empty. The "Resample Asset" button can process an empty asset and fill it with valid data now. (#23)

Mask Volumes binary serialization and minor fixes

* Fixed the case when the painted Mask Volume asset is not saved.
Updated the default brush settings based on the user feedback.

* Prefer binary serialization of Mask Volume assets.

* Added "Reserialize All" action to context menus of MaskVolumeAsset to be able to convert all assets in a project to binary format.

Mask Volume: Fixed minor bug where emptyUAV would silently fail to bind to _MaskVolumeAtlas - using emptyVolumeUAV instead

Mask Volume:

Mask Volume: Make Mask Volume internals visible to Unity.Entities.Hybrid.HybridComponents

Mask Volumes: Set methods for Mask Volume exposed that allows us to use them to do deep copies of Scenes

DOTS Mask Volume (#6)

Refactored the access to Mask Volume instanced to be able to feed a DOTS version to the system.

Probe Volumes:

Probe Volumes: Delete meta file for empty folder accidentially created a while back. Cleans up a warning when the project is first imported (#34)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

 Probe Volumes: Cleanup the state when HDRP has Probe Volumes disabled in the HDRenderPipelineAsset or FrameSettings. Previously we would hit some null reference errors because the disabled paths were not well tested. These fixes should improve the process of setting up Probe Volumes / Mask Volumes in a new project

Probe Volumes: Upadte ProbeVolumeAtlasKey to additionally unique on volume position if the volume is simulating dynamic GI. If dynamic GI is enabled, two probe volumes that point to the same asset, streamed in at different locations need unique space in the atlas (because their dynamic GI component is different). If dynamic GI is disabled, two probe volumes that point to the same asset, streamed in at different locations should share space in the atlas, since their baked data is identical.

Probe Volume:

VolumeGlobalUniqueID and atlas allocation stats

Probe Volumes:

Probe Volumes: Remove Ambient Sky fallback which was used when accumulated probe volume weight was < 1. In our project we never want to fall back to the ambient sky, we want to fallback to black. (#40)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volumes: Fix bug where tiles would receive no probe volume lighting if they contained no direct light sources, and if compute based deferred was enabled. (#41)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Probe Volume: Fix Probe Volume Visibility API

Probe Volume: Fixed compilation error when Probe Volumes are not encoded with SHL2.

Mask Volume:

Mask Volume Feature Parity: Mask Volumes use Global Unique ID system … (#32)

* Mask Volume Feature Parity: Mask Volumes use Global Unique ID system just like Probe Volumes, follow the same eviction scheme as probe volumes, have the same debug rendering options as probe volumes (where relevant) and have dead code paths cleaned out. Global Distance Fade Start / End exposed on the Volume System Probe Volume Controller and new Mask Volume Controller to limit atlas subscription when zoomed way out in large scenes. Volumes are now evicted from the atlas when they are culled in the prepare probe volume / mask volume lists stage.

* Add atlas allocation stats for Mask Volumes

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Mask Volumes: Cleanup the state when HDRP has Mask Volumes disabled in the HDRenderPipelineAsset or FrameSettings. Previously we would hit some null reference errors because the disabled paths were not well tested. These fixes should improve the process of setting up Probe Volumes / Mask Volumes in a new project

Dynamic GI:

Probe Volumes: Dynamic GI: Fix null reference when Draw Neighbors is true, but no probeVolumeAsset has been baked yet. (#30)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Fix for dynamic GI to disable gracefully at runtime

Ported MaskVolumes and Dynamic GI to RenderGraph (#27)

* Ported MaskVolumes to RenderGraph

* Made MaskVolume light lists work with RenderGraph

* Made ProbeVolumes DynamicGI work with RenderGraph

* Remove accidentially introduced extra space (to avoid merge conflicts in the future)

Dynamic GI:

Partner/crazyhunter 10.7.0 custom.1.pvdgi cross volumes (#38)

* Scaffolding for testing how sampling neighbor probe volumes around edges of dynamic GI volumes can help with propagating GI from neighbors. Needs to be filled in

* typo

* work in progress

* Probe Volumes: Fix up case where ProbeVolume.hlsl is included and LIGHTLOOP_DISABLE_TILE_AND_CLUSTER is defined. Add support for dynamic GI border axes sampling all other probe volumes in order to propagate dynamic GI across volume boundaries.

* Fix fade calculation

* Fix warning about sign / unsign mismatch.

* cache and respect the HDRP asset Dynamic GI toggle at runtime for perf testing

* Probe Volumes: Dynamic GI: Add Neighboring Volume Propagation Mode to Probe Dynamic GI Volume Override for selecting which algorithm is used to inject dynamic GI from neighboring probe volumes at boundaries. Options include Disabled, Sample Neighbors Direction Only (reccomended), and Sample Neighbors Position and Direction

* Probe Volumes: Dynamic GI: If Dynamic GI is on, and Neighboring Volume Propagation is on, force probe volumes to upload to structured buffers and the atlas if they are within the rangeInFrontOfCamera or rangeBehindCamera distance.

* Probe Volume GI: neighboringVolumePropagationMode - change default to SampleNeighborsPositionAndDirection

Co-authored-by: Szymon Swistun <szymon@bonfirestudios.com>
Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Define GetDiffuseOrDefaultColor() for the Unlit BSDF to fix compilati… (#39)

* Define GetDiffuseOrDefaultColor() for the Unlit BSDF to fix compilation errors in Unlit shaders in the DynamicGIDataSample pass.

* Define DynamicGIDataSample pass for AxF and Unlit shaders. Remove now unnecessary #if UNLIT define in ShaderPassDynamicGIDataSample.

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Blow out fix for new cross volume GI propagation, plus big fix in directional only version to much closer match to pos + directino one

Dynamic GI:

Optimizations to Dynamic GI, with minimal, but some, quality loss
Rename volume setting parameter, and set default to directional only, it looks fine, and a better default
Pre-computed & sorted relevant neighbor axis per axis and precomputed sgWeights.
Found the best tradeoff for highest weighted axis / relevancy wise based on sgWeight and used 9 to help with perf.

prior merge fix

10 axis loops to catch all relevant axis

Shader variant for when inf bounce scale is set to 0 to remove the work entirely

Bump Shadergraph ScriptedImporter version to attempt to cleanly regenerate all shadergraphs after fixing bugs in dynamic GI extraction pass hlsl includes. (#42)

Co-authored-by: pastasfuture <nickb@bonfirestudios.com>

Mask Volume albedo baking (#37)

* Fixed dynamic GI albedo sampling inputs. Set up all Mask Volume data globally (camera-independent) before albedo baking.

Signed-off-by: Andrew Saraev <andrew.saraev@unity3d.com>

* Fixed Mask Volume rendering after merging.

* Fixed rendering after the merge.

* Fix Mask Volume preparation for baking with Render Graph enabled.

* Dynamic GI baking optimization. Mask Volume rendering clean-up.

Mask Volume:

Mask Volume visibility fixes (#84)

* Don't render Mask Volume hidden in scene.

* Fixed Mask Volume flickering when two volume instances are trying to render the same asset.

Mask Volumes: Remove an unnecessary editor only GC.Alloc

Dynamic GI:

Max Sim Per Frame Control per Probe Volumes Dynamic GI (#44)

* Control over max # of probe volume dynamic GI simulation's per frame

* fixed issues with static value construction

* More direct control of perf controls to dynamic GI

Less GC allocations and better cleanup

Cleanup and removed the need entirely clearing radiance cache on first frame of probe volume dynamic GI sim. compute shaders just handle that first frame case via variant instead. Removes hitches this way

Sometimes we got NaN's, so added an extra safe clear on radiance data but via compute dispatch when needed

slight bug fix to previous commit

Quality variants for propagation axis amounts

Dynamic GI:

Added basic probe volume dynamic GI stats

more dynamic GI stats

Optimize GI data layout (#45)

* Optimized the layout of the dynamic GI data.
* Added migration of existing baked data to new layout. Context menu item "Reserialize (All)" on Probe Volume Asset now also runs the migration. Had to move the migration code from Probe Volume to Probe Volume Asset for this.
Limitation: Context menu migration is skipped for assets of version < 3, since updating to v.3 requires rotation from an object in a scene.
* Apply inverse-square law to propagation axis weights to get a more correct distribution for diagonal axes.

Dynamic GI:

Dynamic GI baked emission (#51)

* Bake emission into dynamic GI neighbors and use it in the propagation.

* Use 2x2 pixel blocks per baking request to control texture lods with uv and position gradients within these blocks.

* Added the logic to control the material sampling lod for neighbor baking.

* Added support of any Probe Volume rotation while baking dynamic GI neighbors and combining dynamic and baked SH.

* Respect the Baked Emission material toggle when baking the dynamic GI neighbors.

* Added a volume component setting to scale baked emission for dynamic GI.

* Provide ddx and ddy for position and UV of a hit when baking neighbor materials.

* Set the camera position shader property to zero before baking neighbors to support position-based effects in materials.

* Clean-up.

Work in progress for dgi optimization - setup new compute buffer

Work in progress.

Populate new neighbor axis lookups buffer and switch to reading from it.

Remove old neighbour axis lookup array.

Order members in NeighborAxisLookup by type size.

adding safety cleanup to help trigger the sorted axis set after cleanup call

Dynamic GI: Bind white texture for HVSSS in dynamic GI light loop

New reflection normalization (#62)

* Use roughest cubemap sample instead of baked SH to calculate Probe Volume reflection normalization.

* Removed luminance SH baking for Reflection Probes.

Dynamic GI:

Dynamic GI sky lighting (#53)

* Sample sky lighting on the edges of Probe Volumes for dynamic GI propagation.

* Added Sky Contribution setting to Probe Dynamic GI volume component.

* Renamed "Sky Contribution" to "Sky Multiplier" to fit better with "Baked Emission Multiplier".

* Removed the Direct Contribution setting and normalization that led to all bounces being effectively multiplied by 0.5 with default settings.

* Rotate axes in ProbePropagationCombine in the way consistent with other stages.

* Added Max Albedo setting for dynamic GI to prevent infinite bounces from blowing up the lighting.

* Apply validity to emission. Cleanup.

* Changed default Max Albedo to 0.9.

* Divide dynamic GI direct lighting by Pi to fix the look.

* Experimental changes to skylight and direct hit injection before looking deeper into our SG-to-SH conversion.

* Replaced weight normalization in hit and miss passes with prenormalized amplitudes. Experimental.

* Added the inv-pi normalization to infinite bounces.

* Finish fixing up normalization of hits, misses, and sky. Additionally, add amplitude adjustment for edge and diagonal SGs

* Fixed StackLit shader graphs compilation by adding missing ComputeReflectionProbeNormalizationDirection function, expected by the LightLoop.

* WIP Dynamic GI bases: Windowed Spherical Gaussian and Ambient Dice

* Turn back on sky contribution

* More iteration

* Latest

* Cleanup dynamic gi propagation bases defines into their own header that exposes an api so that callers do not have to know the specifics of the basis. Expose all bases as options on the Probe Dynamic GI volume override

* Miss integral

* Fix hit and miss lobe creation to the more subtle, but correct implementation that got lost during the cleanup.

* Formalize the logic for injecting light from neighboring probe volumes / sky into a basis axis. Convolve the incoming irradiance with the zonal harmonic representation of the neighbor basis lobe in order to analytically evaluate the incoming irradiance over the entire lobe, rather than just the point sample. I compared this against a brute force monte carlo sampling of the SH over the neighbor axis lobe and the results are almost completely indestringuishable. The accuracy is based on how accurate the ZH fit of the neighbor axis lobe is.

* remove some dead code

* delete more dead code

* Add back a line of code I accidentally deleted in the cleanup

* Split up the basis options into a basis dropdown and a basis propagation override dropdown. Removed the not useful no diagonal basis options. Added ambient dice wrapped options to the propagation override modes

* Remove old option for SH from SG Mode: We now always use the correct SH From SG via zonal harmonic fit conversion. Changed the default propagation override to Basis Ambient Dice Wrapped Super Soft. Fixed a subtle bug with skylight propagation - use the current axis lobe direction for sampling the sky, not the neighbor direction. This makes it consistent with how hits are propagated (and cleans up a little code in the process)

Co-authored-by: pastasfuture <pastasfuture@gmail.com>

Dynamic GI:

Dynamic GI: Fixed Dynamic GI and the neighborhood debug draw when there are 0 hits in a volume (no geometry was hit).

Renormalize axes of Dynamic GI bases to support different quality (#61)

* Added frame settings for Dynamic GI quality to be able to preview it in edit mode.
* Precalculate and normalize axis weights on CPU.

New DGI validity baking and ProbeVolume interface (#66)

* Added a button to Probe Volume to bake dynamic GI without the lightmapper. Then, validity is computed with the same rays that used for hits, so it only "sees" backfaces that are one voxel away or closer.
* Simplified IProbeVolumeList by grouping all runtime data the pipeline may need to write to into ProbeVolumePipelineData and ProbeVolumePropagationPipelineData structs.
* Replaced single dataUpdated on ProbeVolume with dataVersion on ProbeVolumeAsset to detect changes of baked data for already loaded volumes and keep baked lighting buffers, dynamic lighting buffers, atlas slot and content — all up to date regardless of the order they are used.

Fix crash in il2cpp build (#67)

Co-authored-by: Paulm-Unity <paulm@unity3d.com>

Fix another crash in il2cpp build

DGI Fix Leak Mitigation (#68)

* Fixed DGI axis bit packing.
* Store neighbor validity in axis and limit propagation from an invalid probe instead of limiting propagation towards an invalid probe.
* Set default Baked Emission Multiplier, Sky Multiplier and Leak Multiplier to 1.0.

rename leak multiplier to leak mitigation for consistency

DGI Mixed Lights (#76)

* Mark mixed lights when Probe Volume is baked to filter them out of the dynamic GI light list.

* Added mixed lights data to DGI neighborhood and rendering. Using manual baking steps for now.

* Update and save mixed lights baked status when lights are processed by the pipeline in the baking mode.

* Added frame settings to pick a combination of realtime and mixed lights to use for dynamic GI.

* Force shadow rendering regardless of distances when preparing for mixed lights baking.

* Restored dynamic GI basic support for all mixed light modes after the light list merge. Now need to restore forced shadowmap rendering while mixed baking is prepared.

* Restored after merge: force shadowmap rendering while mixed baking is prepared by dynamic GI.

* Make dynamic GI mixed lighting preview show correct expected result for the current indirect scale setting.

Probe Volume, Mask Volume, Dynamic GI

Dynamic GI:

DGI per volume mixed lights (#79)

* Added a per-volume property defining if mixed lights were baked for this volume. Add all lights to the light list and skip mixed lights in shaders when required.
* Revert to the previous way of uncapping shadow distance when baking dynamic GI mixed lights.

Fix two misc DynamicGI shader warnings. (#89)

Expose key hooks and controls for automated dynamic GI baking

Exposing seperate prepareForBaking option for probe volumes for more control over baking

one more fix for better dynamic GI bakes

Probe Volume: Fix ProbeVolume buffers not being reset after disable (#95)

Fixed ProbeVolume BuffersDataVersion not being reset on disable.

Dynamic GI:

Dynamic GI: clear EngineDataIndex and simulationFrameTick. Unified clearing methods.

DGI fallback radiance baking for low end settings (#92)

* Added the way to copy prepared radiance into baked data of a Probe Volume and use it at runtime as a fallback for when DGI is disabled.
* Changed the way of updating and tracking data version for Probe Volume assets to not reupload it on every asset reimport and validation (needed to maintain propagated radiance while baking reflections and saving assets).

Toggle for Dynamic GI for low quality baked mode testing in editor

DGI smaller encoding (#96)

* Experiment with storing DGI hit emission and probe radiance with half-float precision.

* Trying RGBM32 encoding for DGI propogation.

* Moved DGI radiance encoding functions to separate from emission to quickly iterate with it without touching the baked emission data.

* Use LogLUV encoding for DGI hit and probe radiance.

* Added YCoCg encoding for DGI radiance for testing.

* Faster and more precise LogLuv radiance encoding with lower range.

* Added a radiance encoding setting to Probe Dynamic GI volume component to switch between RGB Float and LogLuv.

* Fixed hit radiance decoding for different encodings when baking mixed lighting.

* Moved the radiance encoding setting from the volume component to frame settings.

* Dynamic GI: Added HalfLUV, and R11G11B10 encoding modes

Co-authored-by: pastasfuture <pastasfuture@gmail.com>

Support DGI mixed lights baking for HalfLuv and R11G11B10 radiance encodings. (#98)

DGI initial state from baked (#99)

* A prototype of DGI radiance initialization from baked SH.

* Disable ZHWindow in ProbePropagationInitialize for now as it gives too smooth and dark radiance to axes.

* Minor fixes in propagation and a cleanup.

* Partner/crazyhunter 10.7.0 custom.1 dgi initial state from baked sh to from basis improvement (#107)

Improve ambient dice basis coefficients, improve basis normalization, and improve methods for projection from and to SH, choosing the right method for the context.

Dynamic GI: Ambient Dice to ZH: Switched over to using a raw ZH fit instead of deringed zh fit. It results in significantly lower error when compared to a ground truth monte carlo projection, which means slightly punchier + higher contrast + less washed out GI. And the ringing concern seems to not be an issue due to the way light is propagated. Across a number of test scenes no ringing is present.

Co-authored-by: Nicholas Brancaccio <pastasfuture@gmail.com>

Probe Volume:

Probe Volumes: Fix case when ShaderConfig enables them, but they have not yet been enabled in the frame settings. Previously this case would spill errors about unassigned compute parameters like _ProbeVolumeAtlasSH - this comes up when creating standalone HDRP template projects for repro demos

Probe Volume sampling quality (#102)

* Added a frame setting for Probe Volume lighting sampling quality between SHL0, SHL1 and SHL2.

* Probe Volume sampling quality cleanup.

* WIP switch Probe Volume spherical harmonics level with global keywords. L0 and L1 are not supported by Dynamic GI yet.

* Implemented missing SH L0 and L1 modes for Dynamic GI.

* Removed Probe Volume SHL0 option to save shader variants. Fixed Volumetric Lighting.

* Fixed VFX shaders after introducing different Probe Volume encodings.

* Support baking SHL2 fallback radiance from within the SHL1 mode. Cleanup.

Check if probeVolumeAtlas is null before trying to release a slot from it. The atlas could be not created yet as we are doing it later in a rendering now to match the selected SH encoding for a given frame. (#108)

Probe Volumes: Remove an unnecessary editor only GC.Alloc

Reflection Probe Normalization: Fix bad rebase merge of reflection probe normalization code

Fix recursive mutation bug in ZH Fit version of ProbePropagationInitialize projection.

Dynamic GI Propagation: Sample Neighbors: Use ZH-Fit to convert from SH to our 26-axis basis - it produces results that are a bit closer to our monte carlo naive projection ground truth

Dynamic GI: Fix Infinite Bounce calculation after we changed our basis coefficients. We were missing scaling each lobe contribution by that lobes normalized integral. Also delete some dead code that was hanging around in the dynamic GI area for too long, and fix some code erroneously included inside of an ifdef (#109)

Dynamic GI probe dirty flag (#111)

* Store a dirty flag for each light probe in a volume, update only the ones that had reasons to change since the last update.
* Added a setting to Frame Setting to be able to disable dirty flags.
* Added debug visualisation of dirty probes of all active volumes.

DGI propagation fixes (#112)

* Fixed fallback radiance baking when dirty flags are enabled.
* Fixed noticeable intensity loss for lower propagation quality due to axis weights renormalization error.
* Separate radiance comparison for LogLUV encoding that avoids many false positives in dirty flags.
* Fixed propagation data not being cleared when Frame Settings are changed via the settings window causing the pipeline to be destroyed.

critical exception fix that was firing on domain reloads & enter play mode transitions

Dynamic GI: Copy over some warning fixes to dynamic GI that were lost in the rebase shuffle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants