-
Notifications
You must be signed in to change notification settings - Fork 855
[10.x.x HDRP] Fix issue with raytracing resources not properly initialize #4268
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -612,7 +612,20 @@ void UpgradeResourcesInAssetIfNeeded(HDRenderPipelineAsset asset) | |
ResourceReloader.ReloadAllNullIn(asset.renderPipelineResources, HDUtils.GetHDRenderPipelinePath()); | ||
#endif | ||
|
||
if (GatherRayTracingSupport(asset.currentPlatformRenderPipelineSettings)) | ||
bool requiresRayTracingResources = false; | ||
// Make sure to include ray-tracing resources if at least one of the defaultAsset or quality levels needs it | ||
if (defaultAsset.currentPlatformRenderPipelineSettings.supportRayTracing) | ||
requiresRayTracingResources = true; | ||
Comment on lines
+615
to
+618
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can be simplified as Does former GatherRayTracingSupport also check if hardware is compatible? Should we check it here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indeed, will make the change on master. We must not check hardware support as you can build with a GPU not supporting it |
||
|
||
int qualityLevelCount = QualitySettings.names.Length; | ||
for (int i = 0; i < qualityLevelCount && !requiresRayTracingResources; ++i) | ||
{ | ||
var hdrpAsset = QualitySettings.GetRenderPipelineAssetAt(i) as HDRenderPipelineAsset; | ||
if (hdrpAsset != null && hdrpAsset.currentPlatformRenderPipelineSettings.supportRayTracing) | ||
requiresRayTracingResources = true; | ||
} | ||
|
||
if (requiresRayTracingResources) | ||
{ | ||
if (asset.renderPipelineRayTracingResources == null) | ||
asset.renderPipelineRayTracingResources | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not need BindingFlags.Static. There will never have static field in resources as they are not serialized.