12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*
- * 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 OpenXrSrg : SRG_PerObject
- {
- row_major float4x4 m_worldMatrix;
- row_major float4x4 m_viewProjMatrix;
- }
- struct VSInput
- {
- float3 m_position : POSITION;
- float4 m_color : COLOR0;
- };
- struct VSOutput
- {
- float4 m_position : SV_Position;
- float4 m_color : COLOR0;
- };
- VSOutput MainVS(VSInput vsInput)
- {
- VSOutput OUT;
-
- OUT.m_position = mul(OpenXrSrg::m_worldMatrix, float4(vsInput.m_position, 1.0));
- OUT.m_position = mul(OpenXrSrg::m_viewProjMatrix, OUT.m_position);
- OUT.m_color = vsInput.m_color;
- return OUT;
- }
- struct PSOutput
- {
- float4 m_color : SV_Target0;
- };
- PSOutput MainPS(VSOutput vsOutput)
- {
- PSOutput OUT;
- OUT.m_color = vsOutput.m_color;
- return OUT;
- }
|