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.
o3de/Gems/Atom/RPI/Assets/Shader/DecomposeMsImage.azsl

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);
}