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