Skip to content

Commit

Permalink
Merge Hd/bugfix (#5255)
Browse files Browse the repository at this point in the history
* [HDRP] Fix AxF debug output in certain configurations (#4641)

* Fix AxF debug output in certain configurations.

* Update comment

* Fix SSR accumulation white flash (#4648)

* Fix white flash

* changelog

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

* Display Info Box when MSAA + ray tracing is onr (#4627)

* Show info box when ray tracing is enabled.

* Changelog

* Move below MSAA

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

* Fix distortion when resizing the window in player builds with the Graphics Compositor enabled (#4593)

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

* Add support for the camera bridge in the graphics compositor (#4599)

* Fix Jittered Project Matrix Infinite Far Clip Plane  (#4638)

* Reconstruct jittered projection matrix far plane (for Infinite )

* Changelog

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

* Fixed a memory leak related to not disposing of the RTAS at the end HDRP's lifecycle. (#4688)

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

* Fix custom pass utils Blur + Copy overdraw. (#4623)

* Fix overdraw in custom pass utils blur function

* Updated changelog

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

* Fix draw procedural invalid pass idx 1 on first template load (#4632)

* Fix

* changelog

* Force sync compilation for TAA

Co-authored-by: CifaCia <f.cifariellociardi@gmail.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Changed light reset to preserve type (#4624)

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

* Revert "Add support for the camera bridge in the graphics compositor (#4599)"

This reverts commit 2325e3f.

* AxF carpaint: Fix a compilation issue on Vulkan until the cpp HLSLcc side is updated. (case 1335737, related to 1314040) (#4691)

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

* Revert "Revert "Add support for the camera bridge in the graphics compositor (#4599)""

This reverts commit 30fffd5.

* revert: Fix distortion when resizing the window in player builds with the Graphi

* Fixed the ray traced sub subsurface scattering debug mode not displaying only the RTSSS Data (case 1332904). (#4626)

* Fixed the ray traced sub subsurface scattering debug mode not displaying only the RTSSS Data (case 1332904).

* Add test scene

Co-authored-by: Remi Chapelain <remi.chapelain@unity3d.com>
Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>

* Fix for discrepancies in saturation and intensity between screen space refraction and probe refraction (#4653)

* Delete the second transmittance mul

* Changelog

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

* Fix a Divide-by-Zero Warning for some Anisotropic Models (Fabric, Lit) (#4636)

* Initialize the shading normal to a non-zero value for anisotropy

* Changelog

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

* [HDRP] Fix VfX lit particle AOV output color space (#4646)

* Fix VfX lit particle aov output color space

* Update comment

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

* [HDRP][Path Tracing] Fixed transparent unlit (#4605)

* Fixed issue with transparent unlit.

* Updated changelog.

* Reverted accidental change to default mtl.

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

* Fix distortion with MSAA (#4711)

* Fix contact shadow debug views (#4720)

* Fix

* changelog

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

* Update Decal-Projector.md (#4695)

* [HDRP] Fixed nullref when deleting the texture asset assigned in a local volumetric fog volume (#4728)

* Fixed nullref when deleting the 3D mask of a density volume (case 1339330)

* Updated changelog

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

* Fix decal layer enum (#4753)

* Fix typo

* Fixed reflection probes being injected into the ray tracing light cluster even if not baked (case 1329083). (#4640)

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

* Ignore hybrid duplicated reflection probes during light baking (#4663)

* Ignore hybrid duplicated reflection probes during light baking

* test path instead of scene

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

* Fix double sided option moving when toggling it in the material UI (#4725)

* Fix double sided option moving when toggling it in the material UI (case 1328877)

* Updated changelog

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

* Fix formatting

* Fix volumetric fog in planar reflections (#4736)

* Fix planar reflection

* changelog

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

* Fix motion blur compute dispatch size (#4737)

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

* - Updated the recursive rendering documentation (case 1338639). (#4759)

* - Updated the recursive rendering documentation (case 1338639).

* review fixes

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

* Fix issue with OnDemand directional shadow map being corrupted when reflection probe are updated same frame (#4812)

* Don't mark as rendered for reflection probes as we want the cached version to be from main view

* Do the thing just for directional

* Doc update

* changelog

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

* Fix cropping issue with the compositor camera bridge (#4802)

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

* Fix for unused resources in depth of field (#4796)

* Removing the word Radii from exposure settings (#4854)

* Rename in UX

* Update docs

* [HDRP][Path Tracing] Support for shadow mattes (#4745)

* Shadow matte support.

* Updated changelog.

* Only take occluders into account, closer match to raster mode.

* Added test scene.

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

* Revert "[HDRP][Path Tracing] Support for shadow mattes (#4745)"

This reverts commit 85ebbc2.

* Fixed the transparent cutoff not working properly in semi-transparent  and color shadows (case 1340234). (#4756)

* Fixed the transparent cutoff not working properly in semi-transparent and color shadows (case 1340234).

* Update test ref image

Co-authored-by: Remi Chapelain <remi.chapelain@unity3d.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Use non jittered projection in outline pass (#4836)

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

* [HDRP][Path Tracing] Sky settings now properly taken into account when using recorder (#4856)

* Make sure sky settings are correctly set when recording.

* Updated changelog.

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

* Fix Resolution Issues for Physically Based Depth of Field (#4848)

* Add the necesarry texture coordinate clamping for RTHandle for color pyramid sampling

* Add some resolution independence, fitted for 1920x1080

* Changelog

* Switch back to point sampling from trilinear, with commentary

* Update test reference images

* Small correction to the point sampling, always sample mip 0.

* Re-update the test images, for mip 0 color sampling

* Use a simpler UV scaling/clamping since we are now point sampling.

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

* Fixed bug introduced by sky-for-recorder support. (#4906)

* [Fogbugz 1341576] Memory leaks when the player is paused, and the user changes pipeline… (#4845)

* Memory leaks when the player is paused, and the user changes pipeline settings

* changelog

* [HDRP] Fixed shadergraph double save (#4916)

* Don't need to save twice shadergraph the first time we create a graph

* Updated changelog

* Write 0 instead of micro sized motion vectors + fix extremely fast velocities (#4820)

* Kill micromovements.

* Do same for camera

* Debug view update

* Changelog

* Remove unnecessary comment

* Fix excessive velocity end up marked as no velocity

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

* [HDRP] Fix material upgrader (#4821)

* Fix HDRP material upgrade failing when there is a texture inside the builtin resources assigned in the material

* Updated changelog

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

* [HDRP] Fix custom pass volume not executed in scene view (#4860)

* Fix custom pass volume not executed in scene view because of the volume culling mask

* Updated changelog

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

* Fix reflection probe tootltip (#4890)

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

* Updated the Physically Based Sky documentation for baked lights (#4891)

* Updated the Physically Based Sky documentation for baked lights

* Rewrite

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

* Fixed remapping of depth pyramid debug (#4893)

* Fixed remapping of depth pyramid debug

* Removed debug pragma

* Update changelog

* Updated tooltip

* Fix wobble-like (or tearing-like) SSAO issues when temporal reprojection is enabled. (#4895)

* Fix AO perceived wobble

* changelog

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

* Fix Asymmetric Projection Matrices and Fog / Pathtracing (#4926)

* Check for asymmetric projections and choose the generic path if so.

* Fix asymmetric projections for the pathtracer ray generation.

* Changelog

* Simplify the matrix multiplication for computing the generic matrix.

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

* Revert: Fix wobble-like (or tearing-like) SSAO issues when temporal reprojection…

* Fix GBuffer depth debug mode (#5054)

* Fixed Volume Gizmo size when rescaling parent GameObject (#4915)

* Fix Vertex Color Mode documentation (#4976)

* Fix wobble-like (or tearing-like) SSAO issues when temporal reprojection is enabled.  (#4986)

* Fix AO perceived wobble

* changelog

* Update screenshots

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

* Fix formatting in NestedOverrideCameraRendering

* [HDRP] Fix white flash with SSR when resetting camera history (#5089)

* Fix white flash with SSR when resetting camera history

* Move branch login inside GetPreviousExposureTexture

* Fix for fixed exposure

* [Fobguz # 1348357] VFX Particle templates missing stencil flags (#5080)

* Adding missing macro for stencil flags in particle forward shaders. This will let flags like TAA Reject be useful

* Changelog

* Fix object disappearing from lookdev (#5063)

* Fixed objects disappearing from Lookdev window when entering playmode (case 1309368).

* Updated changelog

* Added hideflags in Lookdev context

* [HDRP] Fix render object after taa jittering (#5088)

* Add a pass after TAA to restore non jittered matrices

* updated changelog

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

* Fix GC alloc in hd/bugfix branch (#5134)

* Fixed GC alloc on hd/bugfix branch

* Fix GC alloc again

* Fix refraction tile artifacts near reflection probe edges (#4727)

* Pick the right probe at object center instead of tile granularity.

* changelog

* Missing commit

* Move stuff in lightloop and out of prelightData

* Update LightLoop.hlsl

* Formatting

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

* Fix camera rotation uncontrollable with low framerate (#5076)

* Fix camera rotation uncontrollable with low framerate.

* updated changelog

* Clearing out render targets and randmo write targets on pipeline destruction (#5176)

Changelog

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

* Fixed a null ref exception when adding a new environment to the library. (#5131)

* Fixed a null ref exception when adding a new environment to the library.

* Update changelog

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

* FogBugz#1348462 - Wait for accessing the HDProjectSettings instance as it was before. (#5141)

* Fix nullref in volume system after deleting a volume object (#5161)

* Fix nullref in volume system after deleting a volume object (case 1348374)

* Updated changelog

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

* [HDRP] Fix APV UI loosing focus when changing a param (#5219)

* Fixed the APV UI losing focus when the helpbox about baking appears in the probe volume.

* Small changes (#5220)

* Fix update order in Graphics Compositor causing jumpy camera updates (#5235)

* Prevent material from having infinite intensity (#5132)

* Prevent material from having infinite intensity

* Fix switching from ldr to hdr emissive

* Fix input field precision

* Round the max value

* Make two variables

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

* [HDRP] Adding limitations of decal emissive positive contribution to the documentation (#5237)

* Add emissive positive contribution limitation to the doc

* changelog

* Update CHANGELOG.md

* Update Decal-Projector.md

* Update Decal-Shader.md

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

* [HDRP] Fix issue with path tracing when switching between non-persistent cameras (#5246)

* Fix issue with path traceing accumulation when switching between cameras.

* Check if camera history is persistent

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

* removed undesired files

* Fix log base (#5260)

* [HDRP] Fixed mask value stored by the LayerMaskParameter class (#5250)

* Fixed value stored by the layer mask parameter class.

* Updated changelog.

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

* [HDRP][DXR] Make vertex color default to 1.0 instead of 0.0 (#5268)

* When raytracing, make vertex color default to white if not present.

* Updated Changelog.

* Added comment.

* Fix issue with 0-sized dispatch with extremely low resolutions (#5272)

* Ceil to int instead.

* changelog

Co-authored-by: Pavlos Mavridis <pavlos.mavridis@unity3d.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: John Parsaie <johnpa@unity3d.com>
Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: CifaCia <f.cifariellociardi@gmail.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: slunity <37302815+slunity@users.noreply.github.com>
Co-authored-by: Remi Chapelain <remi.chapelain@unity3d.com>
Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org>
Co-authored-by: Adrian1066 <44636759+Adrian1066@users.noreply.github.com>
Co-authored-by: Kleber Garcia <kleber.garcia@unity3d.com>
Co-authored-by: Julien Ignace <julien@unity3d.com>
Co-authored-by: alex-vazquez <76204843+alex-vazquez@users.noreply.github.com>
Co-authored-by: Rémi Chapelain <57442369+remi-chapelain@users.noreply.github.com>
  • Loading branch information
16 people committed Aug 2, 2021
1 parent f471402 commit db9883a
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public override bool OnGUI(SerializedDataParameter parameter, GUIContent title)
if (value.propertyType != SerializedPropertyType.LayerMask)
return false;

value.intValue = EditorGUILayout.MaskField(title, value.intValue, InternalEditorUtility.layers);
value.intValue = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(
EditorGUILayout.MaskField(title, InternalEditorUtility.LayerMaskToConcatenatedLayersMask(value.intValue), InternalEditorUtility.layers));
return true;
}
}
Expand Down
6 changes: 6 additions & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed CPU performance on DLSS, avoiding to recreate state whenever a target can fall into the safe min/max resolution specified by the system.
- Fixed TAA upsampling algorithm, now work properly.
- Fixed for allowing to change dynamic resolution upscale filter via script.
- Fixed update order in Graphics Compositor causing jumpy camera updates (case 1345566).
- Fixed material inspector that allowed setting intensity to an infinite value.
- Fixed issue when switching between non-persistent cameras when path tarcing is enabled (case 1337843).
- Fixed issue with the LayerMaskParameter class storing an erroneous mask value (case 1345515).
- Fixed issue with vertex color defaulting to 0.0 when not defined, in ray/path tracing (case 1348821).
- Fix issue with a compute dispatch being with 0 threads on extremely small resolutions.

### Changed
- Changed Window/Render Pipeline/HD Render Pipeline Wizard to Window/Rendering/HDRP Wizard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ Using the Inspector allows you to change all of the Decal Projector properties,
## Limitations

- The Decal Projector can affect opaque Materials with either a [Decal Shader](Decal-Shader.md) or a [Decal Master Stack](master-stack-decal.md). However, it can only affect transparent Materials with the [Decal Shader](Decal-Shader.md).
- Decal Emissive isn't supported on Transparent Material.
- Emissive decals isn't supported on Transparent Material.
- Emissive decals always give an additive positive contribution. This property does not affect the existing emissive properties of the Materials assigned to a GameObject.
- The **Receive Decals** property of Materials in HDRP does not affect emissive decals. HDRP always renders emissive decals unless you use Decal Layers, which can disable emissive decals on a Layer by Layer basis.
- If you project a decal onto a transparent surface, HDRP ignores the decal's Texture tiling.
- In **Project Settings > Graphics**, if **Instancing Variants** is set to **Strip All**, Unity strips the Decal Shader this component references when you build your Project. This happens even if you include the Shader in the **Always Included Shaders** list. If Unity strips the Shader during the build process, the decal does not appear in your built Application.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ These properties allow you to set the affected attributes of the Material the de
| **Affect Metal** | Enable the checkbox to make the decal use the metallic property of its **Mask Map**. Otherwise the decal has no metallic effect. Uses the red channel of the **Mask Map**.<br />This property only appears when you enable the **Metal and Ambient Occlusion properties** checkbox in your [HDRP Asset](HDRP-Asset.md#Decals). |
| **Affect Ambient Occlusion** | Enable the checkbox to make the decal use the ambient occlusion property of its **Mask Map**. Otherwise the decal has no ambient occlusion effect. Uses the green channel of the **Mask Map**.<br />This property only appears when you enable the **Metal and Ambient Occlusion properties** checkbox in your [HDRP Asset](HDRP-Asset.md#Decals). |
| **Affect Smoothness** | Enable the checkbox to make the decal use the smoothness property of its **Mask Map**. Otherwise the decal has no smoothness effect. Uses the alpha channel of the **Mask Map**.<br /> |
| **Affect Emissive** | Enable the checkbox to make this decal emissive. When enabled, this Material appears self-illuminated and acts as a visible source of light. This property does not work with transparent receiving Materials. |
| **Affect Emissive** | Enable the checkbox to make this decal emissive. When enabled, this Material appears self-illuminated and acts as a visible source of light. This property does not work with transparent receiving Materials. Emissive decals always give an additive positive contribution. This property does not affect the existing emissive properties of the Materials assigned to a GameObject. |


### Surface Inputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ namespace UnityEditor.Rendering.HighDefinition
/// </summary>
public class EmissionUIBlock : MaterialUIBlock
{
static float s_MaxEvValue = Mathf.Floor(LightUtils.ConvertLuminanceToEv(float.MaxValue));

/// <summary>Options for emission block features. Use this to control which fields are visible.</summary>
[Flags]
public enum Features
Expand Down Expand Up @@ -131,7 +133,7 @@ internal static void UpdateEmissiveColorLDRFromIntensityAndEmissiveColor(Materia

internal static void UpdateEmissiveColorLDRFromIntensityAndEmissiveColor(MaterialProperty emissiveColorLDR, MaterialProperty emissiveIntensity, MaterialProperty emissiveColor)
{
Color emissiveColorLDRLinear = emissiveColorLDR.colorValue / emissiveIntensity.floatValue;
Color emissiveColorLDRLinear = emissiveColor.colorValue / emissiveIntensity.floatValue;
emissiveColorLDR.colorValue = emissiveColorLDRLinear.gamma;
}

Expand All @@ -156,7 +158,7 @@ internal static void DoEmissiveIntensityGUI(MaterialEditor materialEditor, Mater
{
float evValue = LightUtils.ConvertLuminanceToEv(emissiveIntensity.floatValue);
evValue = EditorGUILayout.FloatField(Styles.emissiveIntensityText, evValue);
evValue = Mathf.Clamp(evValue, 0, float.MaxValue);
evValue = Mathf.Clamp(evValue, 0, s_MaxEvValue);
emissiveIntensity.floatValue = LightUtils.ConvertEvToLuminance(evValue);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ public void UpdateLayerSetup()

static HDRenderPipelineGlobalSettings m_globalSettings;

// Update is called once per frame
void Update()
// LateUpdate is called once per frame
void LateUpdate()
{
// TODO: move all validation calls to onValidate. Before doing it, this needs some extra testing to ensure nothing breaks
if (enableOutput == false || ValidatePipeline() == false || ValidateAndFixRuntime() == false || RuntimeCheck() == false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#ifndef SCALARIZE_LIGHT_LOOP
// We perform scalarization only for forward rendering as for deferred loads will already be scalar since tiles will match waves and therefore all threads will read from the same tile.
// More info on scalarization: https://flashypixels.wordpress.com/2018/11/10/intro-to-gpu-scalarization-part-2-scalarize-all-the-lights/
// More info on scalarization: https://flashypixels.wordpress.com/2018/11/10/intro-to-gpu-scalarization-part-2-scalarize-all-the-lights/ .
// Note that it is currently disabled on gamecore platforms for issues with wave intrinsics and the new compiler, it will be soon investigated, but we disable it in the meantime.
#define SCALARIZE_LIGHT_LOOP (defined(PLATFORM_SUPPORTS_WAVE_INTRINSICS) && !defined(LIGHTLOOP_DISABLE_TILE_AND_CLUSTER) && !defined(SHADER_API_GAMECORE) && SHADERPASS == SHADERPASS_FORWARD)
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ namespace UnityEngine.Rendering.HighDefinition
/// </summary>
class LightUtils
{
static float s_LuminanceToEvFactor = Mathf.Log(100f / ColorUtils.s_LightMeterCalibrationConstant, 2);
static float s_EvToLuminanceFactor = -Mathf.Log(100f / ColorUtils.s_LightMeterCalibrationConstant, 2);

// Physical light unit helper
// All light unit are in lumen (Luminous power)
// Punctual light (point, spot) are convert to candela (cd = lumens / steradian)
Expand Down Expand Up @@ -163,8 +166,7 @@ public static float ConvertCandelaToLux(float candela, float distance)
/// <returns></returns>
public static float ConvertEvToLuminance(float ev)
{
float k = ColorUtils.s_LightMeterCalibrationConstant;
return (k / 100.0f) * Mathf.Pow(2, ev);
return Mathf.Pow(2, ev + s_EvToLuminanceFactor);
}

/// <summary>
Expand Down Expand Up @@ -193,8 +195,7 @@ public static float ConvertEvToLux(float ev, float distance)
/// <returns></returns>
public static float ConvertLuminanceToEv(float luminance)
{
float k = ColorUtils.s_LightMeterCalibrationConstant;
return (float)Math.Log((luminance * 100f) / k, 2);
return Mathf.Log(luminance, 2) + s_LuminanceToEvFactor;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ TextureHandle GenerateMaxZPass(RenderGraph renderGraph, HDCamera hdCamera, Textu
ctx.cmd.SetComputeVectorParam(cs, HDShaderIDs._SrcOffsetAndLimit, srcLimitAndDepthOffset);
ctx.cmd.SetComputeFloatParam(cs, HDShaderIDs._DilationWidth, data.dilationWidth);
int finalMaskW = maskW / 2;
int finalMaskH = maskH / 2;
int finalMaskW = Mathf.CeilToInt(maskW / 2.0f);
int finalMaskH = Mathf.CeilToInt(maskH / 2.0f);
dispatchX = HDUtils.DivRoundUp(finalMaskW, 8);
dispatchY = HDUtils.DivRoundUp(finalMaskH, 8);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ TEXTURE2D_X(_ShadowMaskTexture); // Alias for shadow mask, so we don't need to k
// If a user do a lighting architecture without material classification, this can be remove
#include "Packages/com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs.hlsl"

// Currently disable SSR until critical editor fix is available
#undef LIGHTFEATUREFLAGS_SSREFLECTION
#define LIGHTFEATUREFLAGS_SSREFLECTION 0

// Combination need to be define in increasing "comlexity" order as define by FeatureFlagsToTileVariant
static const uint kFeatureVariantFlags[NUM_FEATURE_VARIANTS] =
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ TextureHandle RenderPathTracing(RenderGraph renderGraph, HDCamera hdCamera, Text
int camID = hdCamera.camera.GetInstanceID();
CameraData camData = m_SubFrameManager.GetCameraData(camID);

// Check if the camera has a valid history buffer and if not reset the accumulation.
// This can happen if a script disables and re-enables the camera (case 1337843).
if (!hdCamera.isPersistent && hdCamera.GetCurrentFrameRT((int)HDCameraFrameHistoryType.PathTracing) == null)
{
m_SubFrameManager.Reset(camID);
}

if (!m_SubFrameManager.isRecording)
{
// Check if things have changed and if we need to restart the accumulation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ void FetchIntersectionVertex(uint vertexIndex, out IntersectionVertex outVertex)

#ifdef ATTRIBUTES_NEED_COLOR
outVertex.color = UnityRayTracingFetchVertexAttribute4(vertexIndex, kVertexAttributeColor);

// We want to default to white in case there is no specified color, to match the raster behaviour
// FIXME: This could be addressed in UnityRayTracingFetchVertexAttribute4(), but until then we use this workaround
if (!any(outVertex.color))
outVertex.color = 1.0;

#else
outVertex.color = 0.0;
#endif
Expand Down

0 comments on commit db9883a

Please sign in to comment.