Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added a parameter to control the vertical shape offset of the volumetric clouds (case 1358528).
- Added an option to render screen space global illumination in half resolution to achieve real-time compatible performance in high resolutions (case 1353727).
- Added a built-in custom pass to draw object IDs.
- Added a button in the HDRP+DXR Wizard to check scene content for Ray Tracing setup issues.

### Fixed
- Fixed Intensity Multiplier not affecting realtime global illumination.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ public void LogException(Exception exception, UnityObject context)
}

[MenuItem("Edit/Rendering/Check Scene Content for HDRP Ray Tracing", priority = CoreUtils.Sections.section2 + CoreUtils.Priorities.editMenuPriority + 3)]
static void CheckSceneContentForRayTracing(MenuCommand menuCommand)
static internal void CheckSceneContentForRayTracing(MenuCommand menuCommand)
{
// Flag that holds
bool generalErrorFlag = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum InclusiveMode
DXROptional = DXR | 1 << 4,
}

enum QualityScope { Global, CurrentQuality }
enum QualityScope { Global, CurrentQuality, Scene }

static class InclusiveScopeExtention
{
Expand Down Expand Up @@ -221,6 +221,7 @@ Entry[] BuildEntryList()
new Entry(QualityScope.Global, InclusiveMode.DXROptional, Style.dxrTransparentReflectionsFS, IsDXRTransparentReflectionsFSCorrect, null, forceDisplayCheck: true, skipErrorIcon: true, displayAssetName: false),
new Entry(QualityScope.CurrentQuality, InclusiveMode.DXROptional, Style.dxrGI, IsDXRGICorrect, null, forceDisplayCheck: true, skipErrorIcon: true, displayAssetName: true),
new Entry(QualityScope.Global, InclusiveMode.DXROptional, Style.dxrGIFS, IsDXRGIFSCorrect, null, forceDisplayCheck: true, skipErrorIcon: true, displayAssetName: false),
new Entry(QualityScope.Scene, InclusiveMode.DXROptional, Style.checkForRTX, CheckForRTX, CheckSceneContentForRayTracing, forceDisplayCheck: true, skipErrorIcon: true, displayAssetName: false),
});

return entryList.ToArray();
Expand Down Expand Up @@ -858,6 +859,11 @@ bool IsDXRGIFSCorrect()
return defaultCameraFS.IsEnabled(FrameSettingsField.SSGI);
}

bool CheckForRTX()
{
return false;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this check is "non-resolvable", this is how I ensure that users will be able to always click the button, but there may be another cleaner solution.

}

bool IsValidBuildTarget()
{
return (EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64)
Expand Down Expand Up @@ -894,6 +900,11 @@ void FixDXRActivation(bool fromAsyncUnused)
serializedObject.ApplyModifiedPropertiesWithoutUndo();
}

void CheckSceneContentForRayTracing(bool fromAsyncUnused)
{
HDRenderPipelineMenuItems.CheckSceneContentForRayTracing(null);
}

#endregion

#region Package Manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ static class Style
//configuration debugger
public static readonly string global = L10n.Tr("Global");
public static readonly string currentQuality = L10n.Tr("Current Quality");
public static readonly string currentScene = L10n.Tr("Current Scene");

public static readonly string check = L10n.Tr("Check");
public static readonly string resolve = L10n.Tr("Fix");
public static readonly string resolveAll = L10n.Tr("Fix All");
public static readonly string resolveAllQuality = L10n.Tr("Fix All Qualities");
Expand Down Expand Up @@ -199,6 +201,11 @@ public ConfigStyle(string label, string error, string button = null, MessageType
public static readonly ConfigStyle dxrResources = new ConfigStyle(
label: L10n.Tr("DXR resources"),
error: L10n.Tr("There is an issue with the DXR resources! Alternatively, Direct3D is not set as API (can be fixed with option above) or your hardware and/or OS cannot be used for DXR! (unfixable)"));
public static readonly ConfigStyle checkForRTX = new ConfigStyle(
label: L10n.Tr("Check Scene Content for HDRP Ray Tracing"),
error: L10n.Tr("Checks scene content for Ray Tracing issues. This includes checking if any Renderer has null Materials, null Meshes or Mesh Filters, more than 32 sub-Meshes in a Mesh, both Transparent and Opaque Materials in sub-Meshes, both Double-Sided and Single-Sided sub-Meshes or missing Renderers on LODs.\nResults will show in Console.\nThis check is also available in Edit > Rendering menu."),
button: Style.check,
messageType: MessageType.Info);

public static readonly string hdrpAssetDisplayDialogTitle = L10n.Tr("Create or Load HDRenderPipelineAsset");
public static readonly string hdrpAssetDisplayDialogContent = L10n.Tr("Do you want to create a fresh HDRenderPipelineAsset in the default resource folder and automatically assign it?");
Expand Down Expand Up @@ -406,10 +413,17 @@ private void CreateGUI()

ScopeBox globalScope = new ScopeBox(Style.global);
ScopeBox currentQualityScope = new ScopeBox(Style.currentQuality);
ScopeBox currentSceneScope = new ScopeBox(Style.currentScene);

m_BaseUpdatable.Add(globalScope);
m_BaseUpdatable.Add(currentQualityScope);

var addCurrentScene = new HiddableUpdatableContainer(
() => m_Configuration == Configuration.HDRP_DXR);
addCurrentScene.Add(currentSceneScope);
addCurrentScene.Init();
m_BaseUpdatable.Add(addCurrentScene);

AddHDRPConfigInfo(globalScope, QualityScope.Global);

var vrScopeGlobal = new HiddableUpdatableContainer(()
Expand Down Expand Up @@ -438,6 +452,12 @@ private void CreateGUI()
dxrScopeCurrentQuality.Init();
currentQualityScope.Add(dxrScopeCurrentQuality);

var dxrScopeCurrentScene = new HiddableUpdatableContainer(()
=> m_Configuration == Configuration.HDRP_DXR);
AddDXRConfigInfo(dxrScopeCurrentScene, QualityScope.Scene);
dxrScopeCurrentScene.Init();
currentSceneScope.Add(dxrScopeCurrentScene);

container.Add(CreateTitle(Style.migrationTitle));
container.Add(CreateLargeButton(Style.migrateAllButton, UpgradeStandardShaderMaterials.UpgradeMaterialsProject));
container.Add(CreateLargeButton(Style.migrateSelectedButton, UpgradeStandardShaderMaterials.UpgradeMaterialsSelection));
Expand Down