123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- * 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 <viewsrg.srgi>
- #include <Atom/Features/PBR/DefaultObjectSrg.azsli>
- #include <Atom/RPI/ShaderResourceGroups/DefaultDrawSrg.azsli>
- #include <Atom/Features/Pipeline/Forward/ForwardPassSrg.azsli>
- struct VertexInput
- {
- float3 m_position : POSITION;
- float2 m_uv : UV0;
- };
- struct VertexOutput
- {
- float4 m_position : SV_Position;
- float2 m_uv : UV0;
- };
- VertexOutput MainVS(VertexInput input)
- {
- VertexOutput output;
- float3 worldPosition = mul(ObjectSrg::GetWorldMatrix(), float4(input.m_position, 1)).xyz;
- output.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(worldPosition, 1.0));
- output.m_uv = input.m_uv;
-
- return output;
- }
- struct PixelOutput
- {
- float4 m_color : SV_Target0;
- };
- PixelOutput MainPS(VertexOutput input)
- {
- PixelOutput output;
- output.m_color = float4(input.m_uv, 0, 1);
- return output;
- }
|