123456789101112131415161718192021222324252627282930 |
- /*
- * 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>
- struct InstanceData
- {
- float4 m_color;
- float4 m_offset;
- float4 m_scale;
- float4 m_velocity;
- };
- float3 TransformInstancePos(float3 pos, InstanceData instanceData)
- {
- return (pos * instanceData.m_scale.xyz) + instanceData.m_offset.xyz;
- }
- ShaderResourceGroup IndirectSceneSrg : SRG_PerDraw
- {
- StructuredBuffer<InstanceData> m_instancesData;
- row_major float4x4 m_matrix;
- }
|