You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ATOM-15728 Shader Hot Reload Fails in Debug Build The main change was to add OnAssetReady handlers to each of the asset classes. See comments in ShaderAsset::OnAssetReady for a detailed explanation. In short, OnAssetReloaded gets missed while assets are being reloaded at the same time on multiple threads, but OnAssetReady is always called whenever connecting to the AssetBus because of its AssetConnectionPolicy. The above change required the addition of a new AssetInitBus to call the PostLoadInit() functions. Because OnAssetReady connects to buses that are not mutex-protected, they have to be connected on the main thread. AssetInitBus::PostLoadInit is called every frame in RPISystem::SimulationTick. All Atom's asset handlers that need to do post-load initialization must connect to the AssetInitBus, and the asset will disconnect itself after initialization is complete. We also need the Shader class to handle OnShaderAssetReinitialized to properly handle the shader reload. With these changes I can click back and forth between "Blending On" and "Blending Off" many times (like 20 times) without issue. |
5 years ago | |
|---|---|---|
| .. | ||
| LuaMaterialFunctor.cpp | 5 years ago | |
| MaterialAsset.cpp | 5 years ago | |
| MaterialAssetCreator.cpp | 5 years ago | |
| MaterialAssetCreatorCommon.cpp | 5 years ago | |
| MaterialDynamicMetadata.cpp | 5 years ago | |
| MaterialFunctor.cpp | 5 years ago | |
| MaterialPropertiesLayout.cpp | 5 years ago | |
| MaterialPropertyDescriptor.cpp | 5 years ago | |
| MaterialPropertyValue.cpp | 5 years ago | |
| MaterialTypeAsset.cpp | 5 years ago | |
| MaterialTypeAssetCreator.cpp | 5 years ago | |
| ShaderCollection.cpp | 5 years ago | |