12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- /*
- * 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>
- #include <viewsrg.srgi>
- ShaderResourceGroup PerContextSrg : SRG_PerSubPass
- {
- float m_scale;
- }
- ShaderResourceGroup PerDrawSrg : SRG_PerDraw
- {
- float3 m_positionOffset;
- }
- struct VSInput
- {
- float3 m_position : POSITION;
- float4 m_color : COLOR0;
- };
- struct VSOutput
- {
- float4 m_position : SV_Position;
- float4 m_color : COLOR0;
- };
- VSOutput MainVS(VSInput IN)
- {
- VSOutput OUT;
-
- OUT.m_position = float4(IN.m_position + PerDrawSrg::m_positionOffset, 1.0f);// * PerContextSrg::m_scale;
- OUT.m_position = mul(ViewSrg::m_viewProjectionMatrix, OUT.m_position);
- OUT.m_color = IN.m_color;
- return OUT;
- };
- struct PSOutput
- {
- float4 m_diffuse : SV_Target0;
- };
- PSOutput MainPS(VSOutput IN)
- {
- PSOutput OUT;
- OUT.m_diffuse = IN.m_color;
- return OUT;
- };
|