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.
32 lines
825 B
Plaintext
32 lines
825 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
|
|
*
|
|
*/
|
|
|
|
#include <Atom/Features/SrgSemantics.azsli>
|
|
|
|
ShaderResourceGroup ObjectSrg : SRG_PerDraw
|
|
{
|
|
float4 m_color;
|
|
row_major float3x4 m_modelToWorld;
|
|
row_major float4x4 m_viewProjectionOverride;
|
|
float m_pointSize;
|
|
|
|
float4x4 GetWorldMatrix()
|
|
{
|
|
float4x4 modelToWorld = float4x4(
|
|
float4(1, 0, 0, 0),
|
|
float4(0, 1, 0, 0),
|
|
float4(0, 0, 1, 0),
|
|
float4(0, 0, 0, 1));
|
|
|
|
modelToWorld[0] = m_modelToWorld[0];
|
|
modelToWorld[1] = m_modelToWorld[1];
|
|
modelToWorld[2] = m_modelToWorld[2];
|
|
return modelToWorld;
|
|
}
|
|
}
|