Merge remote-tracking branch 'upstream/stabilization/2106' into santorac/stabilization/2106/HotReloadFixes
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
},
|
||||
"ImageDescriptor": {
|
||||
"Format": "R16G16B16A16_FLOAT",
|
||||
"MipLevels": "8",
|
||||
"SharedQueueMask": "Graphics"
|
||||
}
|
||||
},
|
||||
"GenerateFullMipChain": true
|
||||
}
|
||||
],
|
||||
"Connections": [
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ClassData": {
|
||||
"PassTemplate": {
|
||||
"Name": "ReflectionScreenSpaceCompositePassTemplate",
|
||||
"PassClass": "FullScreenTriangle",
|
||||
"PassClass": "ReflectionScreenSpaceCompositePass",
|
||||
"Slots": [
|
||||
{
|
||||
"Name": "TraceInput",
|
||||
|
||||
+4
-6
@@ -37,6 +37,9 @@ ShaderResourceGroup PassSrg : SRG_PerPass
|
||||
AddressV = Clamp;
|
||||
AddressW = Clamp;
|
||||
};
|
||||
|
||||
// the max roughness mip level for sampling the previous frame image
|
||||
uint m_maxMipLevel;
|
||||
}
|
||||
|
||||
#include <Atom/RPI/ShaderResourceGroups/DefaultDrawSrg.azsli>
|
||||
@@ -69,10 +72,6 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
float4 positionWS = mul(ViewSrg::m_viewProjectionInverseMatrix, projectedPos);
|
||||
positionWS /= positionWS.w;
|
||||
|
||||
//float4 positionVS = mul(ViewSrg::m_projectionMatrixInverse, projectedPos);
|
||||
//positionVS /= positionVS.w;
|
||||
//float4 positionWS = mul(ViewSrg::m_viewMatrixInverse, positionVS);
|
||||
|
||||
// compute ray from camera to surface position
|
||||
float3 cameraToPositionWS = normalize(positionWS.xyz - ViewSrg::m_worldPosition);
|
||||
|
||||
@@ -103,8 +102,7 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex)
|
||||
// compute the roughness mip to use in the previous frame image
|
||||
// remap the roughness mip into a lower range to more closely match the material roughness values
|
||||
const float MaxRoughness = 0.5f;
|
||||
const float MaxRoughnessMip = 7;
|
||||
float mip = saturate(roughness / MaxRoughness) * MaxRoughnessMip;
|
||||
float mip = saturate(roughness / MaxRoughness) * PassSrg::m_maxMipLevel;
|
||||
|
||||
// sample reflection value from the roughness mip
|
||||
float4 reflectionColor = float4(PassSrg::m_previousFrame.SampleLevel(PassSrg::LinearSampler, tracePrevUV, mip).rgb, 1.0f);
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
#include <DiffuseGlobalIllumination/DiffuseGlobalIlluminationFeatureProcessor.h>
|
||||
#include <ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h>
|
||||
#include <ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.h>
|
||||
#include <ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h>
|
||||
#include <ReflectionScreenSpace/ReflectionCopyFrameBufferPass.h>
|
||||
#include <OcclusionCullingPlane/OcclusionCullingPlaneFeatureProcessor.h>
|
||||
|
||||
@@ -283,6 +284,7 @@ namespace AZ
|
||||
// Add Reflection passes
|
||||
passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurPass"), &Render::ReflectionScreenSpaceBlurPass::Create);
|
||||
passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurChildPass"), &Render::ReflectionScreenSpaceBlurChildPass::Create);
|
||||
passSystem->AddPassCreator(Name("ReflectionScreenSpaceCompositePass"), &Render::ReflectionScreenSpaceCompositePass::Create);
|
||||
passSystem->AddPassCreator(Name("ReflectionCopyFrameBufferPass"), &Render::ReflectionCopyFrameBufferPass::Create);
|
||||
|
||||
// Add RayTracing pas
|
||||
|
||||
+14
-1
@@ -20,6 +20,8 @@
|
||||
#include <Atom/RPI.Public/AuxGeom/AuxGeomDraw.h>
|
||||
#include <Atom/RPI.Public/ColorManagement/TransformColor.h>
|
||||
#include <Atom/RPI.Public/Pass/PassSystemInterface.h>
|
||||
#include <Atom/RPI.Public/Pass/PassFilter.h>
|
||||
#include <Atom/RPI.Public/Pass/Specific/EnvironmentCubeMapPass.h>
|
||||
#include <Atom/RPI.Public/RenderPipeline.h>
|
||||
#include <Atom/RPI.Public/Scene.h>
|
||||
#include <Atom/RPI.Public/View.h>
|
||||
@@ -1070,7 +1072,18 @@ namespace AZ
|
||||
segment.m_pipelineViewTag = viewTag;
|
||||
if (!segment.m_view || segment.m_view->GetName() != viewName)
|
||||
{
|
||||
segment.m_view = RPI::View::CreateView(viewName, RPI::View::UsageShadow);
|
||||
RPI::View::UsageFlags usageFlags = RPI::View::UsageShadow;
|
||||
|
||||
// if the shadow is rendering in an EnvironmentCubeMapPass it also needs to be a ReflectiveCubeMap view,
|
||||
// to filter out shadows from objects that are excluded from the cubemap
|
||||
RPI::PassClassFilter<RPI::EnvironmentCubeMapPass> passFilter;
|
||||
AZStd::vector<AZ::RPI::Pass*> cubeMapPasses = AZ::RPI::PassSystemInterface::Get()->FindPasses(passFilter);
|
||||
if (!cubeMapPasses.empty())
|
||||
{
|
||||
usageFlags |= RPI::View::UsageReflectiveCubeMap;
|
||||
}
|
||||
|
||||
segment.m_view = RPI::View::CreateView(viewName, usageFlags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -37,6 +37,9 @@ namespace AZ
|
||||
//! to store the previous frame image
|
||||
Data::Instance<RPI::AttachmentImage>& GetFrameBufferImageAttachment() { return m_frameBufferImageAttachment; }
|
||||
|
||||
//! Returns the number of mip levels in the blur
|
||||
uint32_t GetNumBlurMips() const { return m_numBlurMips; }
|
||||
|
||||
private:
|
||||
explicit ReflectionScreenSpaceBlurPass(const RPI::PassDescriptor& descriptor);
|
||||
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "ReflectionScreenSpaceCompositePass.h"
|
||||
#include "ReflectionScreenSpaceBlurPass.h"
|
||||
#include <Atom/RPI.Public/Pass/PassSystemInterface.h>
|
||||
#include <Atom/RPI.Public/Pass/PassFilter.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace Render
|
||||
{
|
||||
RPI::Ptr<ReflectionScreenSpaceCompositePass> ReflectionScreenSpaceCompositePass::Create(const RPI::PassDescriptor& descriptor)
|
||||
{
|
||||
RPI::Ptr<ReflectionScreenSpaceCompositePass> pass = aznew ReflectionScreenSpaceCompositePass(descriptor);
|
||||
return AZStd::move(pass);
|
||||
}
|
||||
|
||||
ReflectionScreenSpaceCompositePass::ReflectionScreenSpaceCompositePass(const RPI::PassDescriptor& descriptor)
|
||||
: RPI::FullscreenTrianglePass(descriptor)
|
||||
{
|
||||
}
|
||||
|
||||
void ReflectionScreenSpaceCompositePass::CompileResources([[maybe_unused]] const RHI::FrameGraphCompileContext& context)
|
||||
{
|
||||
if (!m_shaderResourceGroup)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RPI::PassHierarchyFilter passFilter(AZ::Name("ReflectionScreenSpaceBlurPass"));
|
||||
const AZStd::vector<RPI::Pass*>& passes = RPI::PassSystemInterface::Get()->FindPasses(passFilter);
|
||||
if (!passes.empty())
|
||||
{
|
||||
Render::ReflectionScreenSpaceBlurPass* blurPass = azrtti_cast<ReflectionScreenSpaceBlurPass*>(passes.front());
|
||||
|
||||
// compute the max mip level based on the available mips in the previous frame image, and capping it
|
||||
// to stay within a range that has reasonable data
|
||||
const uint32_t MaxNumRoughnessMips = 8;
|
||||
uint32_t maxMipLevel = AZStd::min(MaxNumRoughnessMips, blurPass->GetNumBlurMips()) - 1;
|
||||
|
||||
auto constantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_maxMipLevel"));
|
||||
m_shaderResourceGroup->SetConstant(constantIndex, maxMipLevel);
|
||||
}
|
||||
|
||||
FullscreenTrianglePass::CompileResources(context);
|
||||
}
|
||||
} // namespace RPI
|
||||
} // namespace AZ
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Atom/RPI.Public/Pass/Pass.h>
|
||||
#include <Atom/RPI.Public/Pass/FullscreenTrianglePass.h>
|
||||
#include <Atom/RPI.Public/Shader/ShaderResourceGroup.h>
|
||||
#include <Atom/RPI.Public/Shader/Shader.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace Render
|
||||
{
|
||||
//! This pass composites the screenspace reflection trace onto the reflection buffer.
|
||||
class ReflectionScreenSpaceCompositePass
|
||||
: public RPI::FullscreenTrianglePass
|
||||
{
|
||||
AZ_RPI_PASS(ReflectionScreenSpaceCompositePass);
|
||||
|
||||
public:
|
||||
AZ_RTTI(Render::ReflectionScreenSpaceCompositePass, "{88739CC9-C3F1-413A-A527-9916C697D93A}", FullscreenTrianglePass);
|
||||
AZ_CLASS_ALLOCATOR(Render::ReflectionScreenSpaceCompositePass, SystemAllocator, 0);
|
||||
|
||||
//! Creates a new pass without a PassTemplate
|
||||
static RPI::Ptr<ReflectionScreenSpaceCompositePass> Create(const RPI::PassDescriptor& descriptor);
|
||||
|
||||
private:
|
||||
explicit ReflectionScreenSpaceCompositePass(const RPI::PassDescriptor& descriptor);
|
||||
|
||||
// Pass Overrides...
|
||||
void CompileResources(const RHI::FrameGraphCompileContext& context) override;
|
||||
};
|
||||
} // namespace RPI
|
||||
} // namespace AZ
|
||||
@@ -629,6 +629,11 @@ namespace AZ
|
||||
|
||||
Data::Asset<RPI::ModelLodAsset> lodAsset;
|
||||
modelLodCreator.End(lodAsset);
|
||||
if (!lodAsset.IsReady())
|
||||
{
|
||||
// [GFX TODO] During mesh reload the modelLodCreator could report errors and result in the lodAsset not ready.
|
||||
return nullptr;
|
||||
}
|
||||
modelCreator.AddLodAsset(AZStd::move(lodAsset));
|
||||
|
||||
lodIndex++;
|
||||
|
||||
@@ -267,6 +267,8 @@ set(FILES
|
||||
Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h
|
||||
Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp
|
||||
Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.h
|
||||
Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp
|
||||
Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h
|
||||
Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp
|
||||
Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.h
|
||||
Source/ScreenSpace/DeferredFogSettings.cpp
|
||||
|
||||
@@ -12691,8 +12691,7 @@ static int glad_vk_find_extensions_vulkan( VkPhysicalDevice physical_device) {
|
||||
#endif
|
||||
GLAD_VK_KHR_push_descriptor = glad_vk_has_extension("VK_KHR_push_descriptor", extension_count, extensions);
|
||||
GLAD_VK_KHR_ray_tracing = (glad_vk_has_extension("VK_KHR_acceleration_structure", extension_count, extensions)
|
||||
&& glad_vk_has_extension("VK_KHR_ray_tracing_pipeline", extension_count, extensions)
|
||||
&& glad_vk_has_extension("VK_KHR_ray_query", extension_count, extensions));
|
||||
&& glad_vk_has_extension("VK_KHR_ray_tracing_pipeline", extension_count, extensions));
|
||||
GLAD_VK_KHR_relaxed_block_layout = glad_vk_has_extension("VK_KHR_relaxed_block_layout", extension_count, extensions);
|
||||
GLAD_VK_KHR_sampler_mirror_clamp_to_edge = glad_vk_has_extension("VK_KHR_sampler_mirror_clamp_to_edge", extension_count, extensions);
|
||||
GLAD_VK_KHR_sampler_ycbcr_conversion = glad_vk_has_extension("VK_KHR_sampler_ycbcr_conversion", extension_count, extensions);
|
||||
|
||||
+7
-3
@@ -14,13 +14,14 @@
|
||||
},
|
||||
"clearCoat": {
|
||||
"enable": true,
|
||||
"normalMap": "EngineAssets/Textures/perlinNoiseNormal_ddn.tif"
|
||||
"normalMap": "EngineAssets/Textures/perlinNoiseNormal_ddn.tif",
|
||||
"normalStrength": 0.10000000149011612
|
||||
},
|
||||
"general": {
|
||||
"applySpecularAA": true
|
||||
},
|
||||
"metallic": {
|
||||
"factor": 0.5
|
||||
"factor": 0.10000000149011612
|
||||
},
|
||||
"normal": {
|
||||
"factor": 0.05000000074505806,
|
||||
@@ -31,6 +32,9 @@
|
||||
},
|
||||
"roughness": {
|
||||
"factor": 0.0
|
||||
},
|
||||
"specularF0": {
|
||||
"enableMultiScatterCompensation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
"Gem"
|
||||
],
|
||||
"user_tags": [
|
||||
"AtomConent"
|
||||
"AtomContent"
|
||||
],
|
||||
"icon_path": "preview.png"
|
||||
}
|
||||
|
||||
+4
-4
@@ -112,13 +112,13 @@ namespace AZ
|
||||
->DataElement(Edit::UIHandlers::Default, &AreaLightComponentConfig::m_enableShutters, "Enable shutters", "Restrict the light to a specific beam angle depending on shape.")
|
||||
->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::ShuttersMustBeEnabled)
|
||||
->DataElement(Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_innerShutterAngleDegrees, "Inner angle", "The inner angle of the shutters where the light beam begins to be occluded.")
|
||||
->Attribute(Edit::Attributes::Min, 0.0f)
|
||||
->Attribute(Edit::Attributes::Max, 180.0f)
|
||||
->Attribute(Edit::Attributes::Min, 0.5f)
|
||||
->Attribute(Edit::Attributes::Max, 90.0f)
|
||||
->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShutters)
|
||||
->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShuttersDisabled)
|
||||
->DataElement(Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_outerShutterAngleDegrees, "Outer angle", "The outer angle of the shutters where the light beam is completely occluded.")
|
||||
->Attribute(Edit::Attributes::Min, 0.0f)
|
||||
->Attribute(Edit::Attributes::Max, 180.0f)
|
||||
->Attribute(Edit::Attributes::Min, 0.5f)
|
||||
->Attribute(Edit::Attributes::Max, 90.0f)
|
||||
->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShutters)
|
||||
->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShuttersDisabled)
|
||||
|
||||
|
||||
@@ -311,7 +311,8 @@ namespace AZ
|
||||
Data::Asset<RPI::ModelAsset> modelAsset = actor->GetMeshAsset();
|
||||
if (!modelAsset.IsReady())
|
||||
{
|
||||
AZ_Error("CreateSkinnedMeshInputFromActor", false, "Attempting to create skinned mesh input buffers for an actor that doesn't have a loaded model.");
|
||||
AZ_Warning("CreateSkinnedMeshInputFromActor", false, "Check if the actor has a mesh added. Right click the source file in the asset browser, click edit settings, "
|
||||
"and navigate to the Meshes tab. Add a mesh if it's missing.");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -456,9 +456,8 @@ namespace AZ
|
||||
void AtomActorInstance::Create()
|
||||
{
|
||||
Destroy();
|
||||
|
||||
m_skinnedMeshInputBuffers = GetRenderActor()->FindOrCreateSkinnedMeshInputBuffers();
|
||||
AZ_Error("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to get SkinnedMeshInputBuffers from Actor.");
|
||||
AZ_Warning("AtomActorInstance", m_skinnedMeshInputBuffers, "Failed to create SkinnedMeshInputBuffers from Actor. It is likely that this actor doesn't have any meshes");
|
||||
if (m_skinnedMeshInputBuffers)
|
||||
{
|
||||
m_boneTransforms = CreateBoneTransformBufferFromActorInstance(m_actorInstance, GetSkinningMethod());
|
||||
|
||||
@@ -69,10 +69,16 @@ proj.launch-config = {loc('../../SDK/Atom/Scripts/Python/DCC_Materials/maya_mate
|
||||
loc('../../azpy/__init__.py'): ('custom',
|
||||
(u'',
|
||||
'launch-oobMrvXFf1SwtYBg')),
|
||||
loc('../../azpy/constants.py'): ('custom',
|
||||
(u'',
|
||||
'launch-GeaM41WYMGA1sEfm')),
|
||||
loc('../../azpy/env_base.py'): ('project',
|
||||
(u'',
|
||||
'launch-GeaM41WYMGA1sEfm')),
|
||||
loc('../../azpy/maya/callbacks/node_message_callback_handler.py'): ('c'\
|
||||
'ustom',
|
||||
(u'',
|
||||
'launch-GeaM41WYMGA1sEfm')),
|
||||
loc('../../config.py'): ('custom',
|
||||
(u'',
|
||||
'launch-GeaM41WYMGA1sEfm'))}
|
||||
|
||||
@@ -165,12 +165,14 @@ def get_current_project():
|
||||
bootstrap_box = None
|
||||
|
||||
try:
|
||||
bootstrap_box = Box.from_json(filename=PATH_USER_O3DE_BOOTSTRAP,
|
||||
bootstrap_box = Box.from_json(filename=str(Path(PATH_USER_O3DE_BOOTSTRAP).resolve()),
|
||||
encoding="utf-8",
|
||||
errors="strict",
|
||||
object_pairs_hook=OrderedDict)
|
||||
except FileExistsError as e:
|
||||
_LOGGER.error('File does not exist: {}'.format(PATH_USER_O3DE_BOOTSTRAP))
|
||||
except Exception as e:
|
||||
# this file runs in py2.7 for Maya 2020, FileExistsError is not defined
|
||||
_LOGGER.error('FileExistsError: {}'.format(PATH_USER_O3DE_BOOTSTRAP))
|
||||
_LOGGER.error('exception is: {}'.format(e))
|
||||
|
||||
if bootstrap_box:
|
||||
# this seems fairly hard coded - what if the data changes?
|
||||
|
||||
@@ -226,7 +226,18 @@ TAG_DEFAULT_PY = str('Launch_pyBASE.bat')
|
||||
FILENAME_DEFAULT_CONFIG = str('DCCSI_config.json')
|
||||
|
||||
# new o3de related paths
|
||||
PATH_USER_O3DE = str('{home}\\{o3de}').format(home=expanduser("~"),
|
||||
# os.path.expanduser("~") returns different values in py2.7 vs 3
|
||||
PATH_USER_HOME = expanduser("~")
|
||||
_LOGGER.debug('user home: {}'.format(PATH_USER_HOME))
|
||||
|
||||
# special case, make sure didn't return <user>\documents
|
||||
parts = os.path.split(PATH_USER_HOME)
|
||||
|
||||
if str(parts[1].lower()) == 'documents':
|
||||
PATH_USER_HOME = parts[0]
|
||||
_LOGGER.debug('user home CORRECTED: {}'.format(PATH_USER_HOME))
|
||||
|
||||
PATH_USER_O3DE = str('{home}\\{o3de}').format(home=PATH_USER_HOME,
|
||||
o3de=TAG_O3DE_FOLDER)
|
||||
PATH_USER_O3DE_REGISTRY = str('{0}\\Registry').format(PATH_USER_O3DE)
|
||||
PATH_USER_O3DE_BOOTSTRAP = str('{reg}\\{file}').format(reg=PATH_USER_O3DE_REGISTRY,
|
||||
|
||||
Reference in New Issue
Block a user