/* * 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 "Compute.azsli" struct VSInput { float3 m_position : POSITION; float2 m_uv : UV0; }; struct VSOutput { float4 m_position : SV_Position; float2 m_uv : UV0; }; VSOutput MainVS(VSInput vsInput) { VSOutput OUT; OUT.m_position = float4(vsInput.m_position, 1.0); OUT.m_uv = vsInput.m_uv; return OUT; } struct PSOutput { float4 m_color : SV_Target0; }; PSOutput MainPS(VSOutput psInput) { PSOutput OUT; int index = int(floor(psInput.m_position.y) * ConstantSrg::dimension.x + floor(psInput.m_position.x)); OUT.m_color = float4(BufferSrg::m_computeBuffer[index].m_data.xyz, 1.0); return OUT; }