From cc15e0d489f5768bc681fd19958456d52c8e8b39 Mon Sep 17 00:00:00 2001 From: Michael Riegger Date: Mon, 3 May 2021 13:19:53 -0700 Subject: [PATCH] Avoid alignment issue if it ever went to cbuffer --- .../Assets/ShaderResourceGroups/CoreLights/ViewSrg.azsli | 3 +-- .../Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli | 3 +-- .../Common/Assets/Shaders/LightCulling/LightCulling.azsl | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/CoreLights/ViewSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/CoreLights/ViewSrg.azsli index 6c4a6d2a36..aeb57259e7 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/CoreLights/ViewSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/CoreLights/ViewSrg.azsli @@ -73,8 +73,7 @@ partial ShaderResourceGroup ViewSrg float m_invAttenuationRadiusSquared; // For a radius at which this light no longer has an effect, 1 / radius^2. float3 m_rgbIntensityCandelas; float m_bulbRadius; - uint m_shadowIndices[3]; - uint m_padding; + uint4 m_shadowIndices; }; StructuredBuffer m_pointLights; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli index b392e07e06..2bccee4902 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderResourceGroups/RayTracingSceneSrg.azsli @@ -63,8 +63,7 @@ partial ShaderResourceGroup RayTracingSceneSrg float m_invAttenuationRadiusSquared; float3 m_rgbIntensity; float m_bulbRadius; - uint m_shadowIndices[3]; - uint m_padding; + uint4 m_shadowIndices; }; StructuredBuffer m_pointLights; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl index 398103a93f..41b42ca68b 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/LightCulling/LightCulling.azsl @@ -59,8 +59,7 @@ ShaderResourceGroup PassSrg : SRG_PerPass float m_invAttenuationRadiusSquared; // For a radius at which this light no longer has an effect, 1 / radius^2. float3 m_rgbIntensityCandelas; float m_bulbRadius; - uint m_shadowIndices[3]; - uint m_padding; + uint4 m_shadowIndices; }; struct DiskLight