Files
o3de/Templates/DefaultProject/Template/ShaderLib/scenesrg.srgi
T
Qing Tao d9cbc97ec0 ATOM-16063 Remove SetShaderResourceGroupCallback in scene and update scene srg handling (#3969)
ATOM-16273 Compiling SceneSRG before updating it can cause a gpu crash

Changes include:
1. Removed Scene::SetShaderResourceGroupCallback() function and clean up code which use this function.
2. Moved SceneTimeSrg.azsli to RPI's DefaultSceneSrg folder and setup the constants in RPI::Scene
3. Add AZ::Event for Scene's update srg event which features and update scene srg at proper place
4. UpdateTransformServcie FP to use PrepareSceneSrg event handler.
5. Clean up shaders and srgs used in project templates.

Signed-off-by: Qing Tao <qingtao@amazon.com>
2021-09-10 10:38:16 -07:00

27 lines
812 B
Plaintext

// {BEGIN_LICENSE}
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// {END_LICENSE}
#pragma once
// Please read README.md for an explanation on why scenesrg.srgi and viewsrg.srgi are
// located in this folder (And how you can optionally customize your own scenesrg.srgi
// and viewsrg.srgi in your game project).
#include <Atom/Features/SrgSemantics.azsli>
partial ShaderResourceGroup SceneSrg : SRG_PerScene
{
/* Intentionally Empty. Helps define the SrgSemantic for SceneSrg once.*/
};
#define AZ_COLLECTING_PARTIAL_SRGS
#include <Atom/Feature/Common/Assets/ShaderResourceGroups/SceneSrgAll.azsli>
#undef AZ_COLLECTING_PARTIAL_SRGS