You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
739 B
Plaintext
34 lines
739 B
Plaintext
/*
|
|
* 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
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <scenesrg.srgi>
|
|
#include <viewsrg.srgi>
|
|
|
|
struct VertexInput
|
|
{
|
|
float3 m_position : POSITION;
|
|
};
|
|
|
|
struct VertexOutput
|
|
{
|
|
float4 m_position : SV_Position;
|
|
};
|
|
|
|
VertexOutput MainVS(VertexInput input)
|
|
{
|
|
const float4x4 worldMatrix = ObjectSrg::GetWorldMatrix();
|
|
VertexOutput output;
|
|
|
|
const float3 worldPosition = mul(worldMatrix, float4(input.m_position, 1.0)).xyz;
|
|
output.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(worldPosition, 1.0));
|
|
|
|
return output;
|
|
}
|