Skip to content

Commit 7f761a5

Browse files
KarlBKentKarl Kent
andauthored
Xp vfx hdrp decal (#52)
* Initial PR merge Has errors still, dont merge into Custom-10.7.0-custom.1 * Resolved code Compatibility Errors: Testing Functionality * missing decal template * Emissive Pass test proved the assets are grabbed by the renderer, and set to the passes, via the triangle lists and IA, and renders emission in scene view. however DBufferVFX pass seems to be empty/broken, so PBR values are not working * Cleanup and looking for null ref that prevents it from serializng to resourceasset * Latest push, code cleanup, and removed duplicate that was wrong Been chasing deserialization issue of the asset, I suspect Its a Assembly/asmdef issue at this point, as m_Script is missing for the HDRP Decal, and walked all other code branchs * Fixing typo in filename, to resolve serialization issue * Code cleanup before rendergraph merge * Initial PR merge Has errors still, dont merge into Custom-10.7.0-custom.1 * Resolved code Compatibility Errors: Testing Functionality * missing decal template * Emissive Pass test proved the assets are grabbed by the renderer, and set to the passes, via the triangle lists and IA, and renders emission in scene view. however DBufferVFX pass seems to be empty/broken, so PBR values are not working * Cleanup and looking for null ref that prevents it from serializng to resourceasset * Latest push, code cleanup, and removed duplicate that was wrong Been chasing deserialization issue of the asset, I suspect Its a Assembly/asmdef issue at this point, as m_Script is missing for the HDRP Decal, and walked all other code branchs * Fixing typo in filename, to resolve serialization issue * Code cleanup before rendergraph merge * Update Pass.template Trying to isolate changes that Affect the stencil, by comparing PR to head * Squashed commit of the following: commit d4bc772 Author: Szymon Swistun <szymon@bonfirestudios.com> Date: Thu Dec 16 23:13:15 2021 -0800 Fix exception bug in render graph commit 0c1e75b Author: Szymon Swistun <szymon@bonfirestudios.com> Date: Thu Dec 16 22:03:34 2021 -0800 rollback of define changes and setting a white texture for dynamic GI that we saw a 1 frame error for commit 41e94e6 Author: pastasfuture <pastasfuture@gmail.com> Date: Thu Dec 16 23:04:58 2021 -0800 Bugfix to DepthBufferMipChainInfo - previously the calculated offset, and more importantly, size and limit values would be incorrect if render target scaling was occuring - it would use the unscaled size. commit 0fde80a Author: Kleber Garcia <kleber.garcia@unity3d.com> Date: Tue Dec 14 08:43:32 2021 -0500 [Fogbugz # 1383093] Fixing leaky state of hardware resolution when turned off from camera (#6492) * * Fixing leaky state of hardware resolution dx12 when we disable DRS on a camera object through inspector or script * Fixing dirty state of depth mip pyramid * Changelog update for case 1383093, bad hw drs for ao Co-authored-by: sebastienlagarde <sebastien@unity3d.com> commit f8b2b5c Author: pastasfuture <pastasfuture@gmail.com> Date: Thu Dec 2 18:13:09 2021 -0800 Hierarchical Variance Screen Space Shadows. Backing up current state. Cascade logic is almost done being setup now - so quality isnt there quite yet, but the full algorithm is implemented. HVSSS Cascades all setup and working. Added high quality filter modes. Need to expose these as toggleable keywords. Need to expose sample count as tuneable parameter. Need to cleanup some code. More iteration Backing up latest work. Includes general code cleanup, as well as more robust handling of depth buffer thickness heuristic Added support for mip bias while raymarching depth lods. Set our sample count back to 10 Only apply HVSSS in Deferred or Forward passes (skips things like DynamicGI and Volumetrics - for now). Forward is a little bit of a hack, it assumes that the depth of the forward renderered geometry is the same or very similar to the depth buffer depth. For opaque surfaces, this is true because depth prepass is enabled. For transparent objects this is not necessarily true. Lets see how this goes. Remove HVSSS keywords. Not using a variant for HVSSS. Stop using uint[4] for compute parameters, use a Vector4 instead. While the data is technically uint, its not worth the hassle of managing heap allocated arrays to pass the data through. RenderGraph does have an API to allow temporary allocations of arrays for this purpose, but it still feels like overkill. We dont need the precision of full uint. a float gives us 2^24 exact integers, which is enough for our use case. Fix up bilateral filtering. Added optional screen space vignette. Added fullscreen debug view. Fixed cpu uint[] -> Vector4 conversion logic HVSSS F16 Support HVSSS: Cleanup to raymarch loop. Evaluating 4x samples per loop iteration to help hide TEX unit latency. Implemented R16G16B16A16_UNorm discretized version of moments shadow mapping for HVSSS - seems to out perform even R32G32_SFloat VSM (more robust shadows / far less edge artifacts). Still havent gotten a nicely working implementation of the thickness heuristic for Moments, but maybe thats not important for our look afterall. Bugfix to view space depth calculation during light range limit cpu side. Tuned output of moments shadow data to avoid light gray areas dominating the screen in certain self intersection cases (by clipping off the top of the distribution) Got a tuned thickness that feels pretty good with moments, and makes intuitive sense Move HVSSS related rendergraph data and functions into its own partial HDRenderPipeline class. spacing Minor include cleanup Break HVSSSModes into different kernels so they can be toggled at runtime. HVSSS: More work exposing parameters HVSSS: Cleanup to raymarch setup code Fix bug in VSM32 linear initialization HVSSS: More stabilizing of depth thickness heuristic across all parameter settings HVSSS: More cleanup to dither HVSSS Dither Bugfix HVSSS: Cleanup to Transmission Accumulator. Additionally, early out if center pixel is outside of light range. Additionally, do not self shadow during raymarching (cleaned up a bunch of 1 pixel artifacts). HVSSS: More fixes to the transmissive accumulator HVSSS: Different base thickness scales for VSM32, VSM16, and Moments HVSSS: Retune defaults HVSSS: Bugfixes to VSM16 brings its quality to almost visually identical to VSM32 HVSSS: Disable debug symbols Add #if defined(SHADERPASS) guards to HVSSS sampling - previously if SHADERPASS wasnt defined at all HVSSS could also be enabled HVSSS another define guard tweaked hvsss defaults commit d87a45a Author: Szymon Swistun <szymon@bonfirestudios.com> Date: Thu Dec 16 11:08:32 2021 -0800 adding safety cleanup to help trigger the sorted axis set after cleanup call commit 0c5f9e8 Merge: 6342691 316de93 Author: Barbara De Luca <93554417+barbara-bonfire@users.noreply.github.com> Date: Tue Dec 14 11:37:00 2021 -0800 Merge pull request #54 from bonfirestudios/partner/crazyhunter-10.7.0-custom.1-dgiopt dgi optimization - setup new compute buffer commit 316de93 Author: Barbara De Luca <barbara@bonfirestudios.com> Date: Tue Dec 14 09:30:42 2021 -0800 Order members in NeighborAxisLookup by type size. commit 507d8b6 Author: Barbara De Luca <barbara@bonfirestudios.com> Date: Mon Dec 13 12:08:55 2021 -0800 Remove old neighbour axis lookup array. commit 5e89f2e Author: Barbara De Luca <barbara@bonfirestudios.com> Date: Fri Dec 10 15:18:16 2021 -0800 Populate new neighbor axis lookups buffer and switch to reading from it. commit 6342691 Author: Andrew Saraev <67020478+AndrewSaraevUnity@users.noreply.github.com> Date: Thu Dec 9 03:19:08 2021 +0000 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. commit c7d2009 Author: Barbara De Luca <barbara@bonfirestudios.com> Date: Tue Dec 7 13:13:23 2021 -0800 Work in progress. commit 540fba5 Author: Barbara De Luca <barbara@bonfirestudios.com> Date: Tue Dec 7 10:45:53 2021 -0800 Work in progress for dgi optimization - setup new compute buffer * Update HDRenderPipeline.Prepass.cs Solved Decal issue * Code Cleanup from PR Comments Co-authored-by: Karl Kent <karl.kent@gmail.com>
1 parent d4bc772 commit 7f761a5

File tree

54 files changed

+2077
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2077
-333
lines changed

com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineEditor.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using UnityEditor.VFX.HDRP;
2+
using UnityEditor.VFX.UI;
13
using UnityEngine.Rendering.HighDefinition;
24

35
namespace UnityEditor.Rendering.HighDefinition
@@ -9,6 +11,7 @@ sealed class HDRenderPipelineEditor : Editor
911
SerializedHDRenderPipelineAsset m_SerializedHDRenderPipeline;
1012

1113
internal bool largeLabelWidth = true;
14+
internal bool needRefreshVfxWarnings = false;
1215

1316
void OnEnable()
1417
{
@@ -32,6 +35,7 @@ public override void OnInspectorGUI()
3235
EditorGUIUtility.labelWidth *= 0.5f;
3336

3437
serialized.Apply();
38+
VFXHDRPSettingsUtility.RefreshVfxErrorsIfNeeded(ref needRefreshVfxWarnings);
3539
}
3640
}
3741
}

com.unity.render-pipelines.high-definition/Editor/RenderPipeline/HDRenderPipelineUI.cs

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
14
using UnityEngine;
5+
using UnityEngine.Experimental.Rendering;
26
using UnityEngine.Rendering;
37
using UnityEngine.Rendering.HighDefinition;
4-
using System.Text;
5-
using UnityEngine.Experimental.Rendering;
68
using static UnityEngine.Rendering.HighDefinition.RenderPipelineSettings;
79

810
namespace UnityEditor.Rendering.HighDefinition
@@ -198,8 +200,6 @@ static void Drawer_SectionGeneral(SerializedHDRenderPipelineAsset serialized, Ed
198200
EditorGUILayout.PropertyField(serialized.lensAttenuation, Styles.GeneralSection.lensAttenuationModeContent);
199201
EditorGUILayout.PropertyField(serialized.useRenderGraph, Styles.GeneralSection.useRenderGraphContent);
200202

201-
EditorGUILayout.PropertyField(serialized.highDefinitionExtensionsEnabled, Styles.highDefinitionExtensionsEnabled);
202-
203203
m_ShowLightLayerNames = EditorGUILayout.Foldout(m_ShowLightLayerNames, Styles.lightLayerNamesText, true);
204204
if (m_ShowLightLayerNames)
205205
{
@@ -320,7 +320,7 @@ static void Drawer_SectionReflection(SerializedHDRenderPipelineAsset serialized,
320320
if (EditorGUI.EndChangeCheck())
321321
serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen.intValue = Mathf.Clamp(serialized.renderPipelineSettings.lightLoopSettings.maxPlanarReflectionOnScreen.intValue, 1, ShaderVariablesGlobal.s_MaxEnv2DLight);
322322
}
323-
323+
324324
EditorGUILayout.Space();
325325

326326
EditorGUI.BeginChangeCheck();
@@ -409,7 +409,7 @@ static void Drawer_SectionShadows(SerializedHDRenderPipelineAsset serialized, Ed
409409
--EditorGUI.indentLevel;
410410

411411
++EditorGUI.indentLevel;
412-
// Because we don't know if the asset is old and had the cached shadow map resolution field, if it was set as default float (0) we force a default.
412+
// Because we don't know if the asset is old and had the cached shadow map resolution field, if it was set as default float (0) we force a default.
413413
if (serialized.renderPipelineSettings.hdShadowInitParams.cachedPunctualShadowAtlasResolution.intValue == 0)
414414
{
415415
serialized.renderPipelineSettings.hdShadowInitParams.cachedPunctualShadowAtlasResolution.intValue = 2048;
@@ -472,14 +472,26 @@ static void Drawer_SectionDecalSettings(SerializedHDRenderPipelineAsset serializ
472472
if (EditorGUI.EndChangeCheck())
473473
serialized.renderPipelineSettings.decalSettings.atlasHeight.intValue = Mathf.Max(serialized.renderPipelineSettings.decalSettings.atlasHeight.intValue, 0);
474474

475+
EditorGUI.BeginChangeCheck();
475476
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.decalSettings.perChannelMask, Styles.metalAndAOContent);
477+
if (EditorGUI.EndChangeCheck())
478+
{
479+
// Tell VFX
480+
((HDRenderPipelineEditor)owner).needRefreshVfxWarnings = true;
481+
}
476482

477483
EditorGUI.BeginChangeCheck();
478484
EditorGUILayout.DelayedIntField(serialized.renderPipelineSettings.lightLoopSettings.maxDecalsOnScreen, Styles.maxDecalContent);
479485
if (EditorGUI.EndChangeCheck())
480486
serialized.renderPipelineSettings.lightLoopSettings.maxDecalsOnScreen.intValue = Mathf.Clamp(serialized.renderPipelineSettings.lightLoopSettings.maxDecalsOnScreen.intValue, 1, HDRenderPipeline.k_MaxDecalsOnScreen);
481487

488+
EditorGUI.BeginChangeCheck();
482489
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportDecalLayers, Styles.supportDecalLayersContent);
490+
if (EditorGUI.EndChangeCheck())
491+
{
492+
// Tell VFX
493+
((HDRenderPipelineEditor)owner).needRefreshVfxWarnings = true;
494+
}
483495
}
484496
--EditorGUI.indentLevel;
485497
}
@@ -925,26 +937,17 @@ static void Drawer_SectionRenderingUnsorted(SerializedHDRenderPipelineAsset seri
925937
// MSAA is an option that is only available in full forward but Camera can be set in Full Forward only. Thus MSAA have no dependency currently
926938
//Note: do not use SerializedProperty.enumValueIndex here as this enum not start at 0 as it is used as flags.
927939
bool msaaAllowed = true;
928-
bool hasRayTracing = false;
929940
for (int index = 0; index < serialized.serializedObject.targetObjects.Length && msaaAllowed; ++index)
930941
{
931-
var settings = (serialized.serializedObject.targetObjects[index] as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings;
932-
var litShaderMode = settings.supportedLitShaderMode;
933-
bool rayTracedSupported = settings.supportRayTracing;
934-
hasRayTracing |= rayTracedSupported;
935-
msaaAllowed &= (litShaderMode == SupportedLitShaderMode.ForwardOnly || litShaderMode == SupportedLitShaderMode.Both) && !rayTracedSupported;
942+
var litShaderMode = (serialized.serializedObject.targetObjects[index] as HDRenderPipelineAsset).currentPlatformRenderPipelineSettings.supportedLitShaderMode;
943+
msaaAllowed &= litShaderMode == SupportedLitShaderMode.ForwardOnly || litShaderMode == SupportedLitShaderMode.Both;
936944
}
937-
938945
using (new EditorGUI.DisabledScope(!msaaAllowed))
939946
{
940947
++EditorGUI.indentLevel;
941948
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.MSAASampleCount, Styles.MSAASampleCountContent);
942949
--EditorGUI.indentLevel;
943950
}
944-
if (hasRayTracing && serialized.renderPipelineSettings.MSAASampleCount.intValue != (int)MSAASamples.None)
945-
{
946-
EditorGUILayout.HelpBox(Styles.rayTracingMSAAUnsupported.text, MessageType.Info, wide: true);
947-
}
948951

949952
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportMotionVectors, Styles.supportMotionVectorContent);
950953
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportRuntimeDebugDisplay, Styles.supportRuntimeDebugDisplayContent);
@@ -1116,7 +1119,7 @@ static void Drawer_SectionMaterialUnsorted(SerializedHDRenderPipelineAsset seria
11161119
}
11171120

11181121
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.lightLoopSettings.supportFabricConvolution, Styles.supportFabricBSDFConvolutionContent);
1119-
1122+
11201123
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportMaskVolume, Styles.supportMaskVolumeContent);
11211124
using (new EditorGUI.DisabledScope(!serialized.renderPipelineSettings.supportMaskVolume.boolValue))
11221125
{

0 commit comments

Comments
 (0)