Files
o3de/Gems/Atom/RPI/Assets/Shaders/DecomposeMsImage.azsl
T
galibzon da2ce2d7f0 Normalize Shader vs Shaders Folders (#4925)
Normalize Shader vs Shaders Folders (#4925)
Signed-off-by: garrieta <garrieta@amazon.com>
2021-10-25 13:23:43 -05:00

24 lines
727 B
Plaintext

/*
* 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
*
*/
#include <Atom/Features/SrgSemantics.azsli>
ShaderResourceGroup ObjectSrg : SRG_PerObject
{
Texture2DMS<float4> m_msImage;
RWTexture2DArray<float4> m_outputImage;
}
#define ThreadGroupSize 16
[numthreads(ThreadGroupSize, ThreadGroupSize, 1)]
void MainCS(uint3 groupID : SV_GroupID, uint3 groupThreadID : SV_GroupThreadID)
{
uint3 samplePos = groupID * ThreadGroupSize + groupThreadID;
ObjectSrg::m_outputImage[samplePos] = ObjectSrg::m_msImage.Load(samplePos.xy, groupThreadID.z);
}