b4a2edec6a
* Final update copyright headers to reference license files at the repo root Signed-off-by: spham <spham@amazon.com> * Fix copyright validator unit tests to support the stale O3DE header scenario Signed-off-by: spham <spham@amazon.com>
38 lines
982 B
Plaintext
38 lines
982 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 <Atom/Features/SrgSemantics.azsli>
|
|
|
|
ShaderResourceGroup ObjectSrg : SRG_PerObject
|
|
{
|
|
row_major float3x4 m_modelToWorld;
|
|
|
|
float3 m_aabbPos;
|
|
float3 m_outerAabbMin;
|
|
float3 m_outerAabbMax;
|
|
float3 m_innerAabbMin;
|
|
float3 m_innerAabbMax;
|
|
bool m_useParallaxCorrection;
|
|
TextureCube m_reflectionCubeMap;
|
|
|
|
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] = ObjectSrg::m_modelToWorld[0];
|
|
modelToWorld[1] = ObjectSrg::m_modelToWorld[1];
|
|
modelToWorld[2] = ObjectSrg::m_modelToWorld[2];
|
|
return modelToWorld;
|
|
}
|
|
}
|