2
0
Panagiotis Christopoulos Charitos 5 жил өмнө
parent
commit
5e5161ed01
34 өөрчлөгдсөн 127 нэмэгдсэн , 97 устгасан
  1. 1 1
      anki/renderer/ClusterBin.h
  2. 1 1
      anki/renderer/LensFlare.cpp
  3. 1 1
      anki/renderer/ProbeReflections.cpp
  4. 1 1
      anki/renderer/RenderQueue.h
  5. 1 1
      anki/renderer/Renderer.cpp
  6. 1 1
      anki/renderer/Ssgi.cpp
  7. 1 1
      anki/renderer/Ssr.cpp
  8. 1 1
      anki/renderer/TraditionalDeferredShading.cpp
  9. 1 1
      anki/resource/MaterialResource.h
  10. 1 1
      anki/scene/GpuParticleEmitterNode.cpp
  11. 1 1
      anki/scene/LightNode.cpp
  12. 1 1
      anki/scene/ReflectionProbeNode.cpp
  13. 1 1
      anki/scene/components/DecalComponent.cpp
  14. 1 1
      anki/scene/components/FrustumComponent.h
  15. 1 1
      anki/scene/components/LightComponent.cpp
  16. 2 1
      anki/shader_compiler/ShaderProgramParser.cpp
  17. 1 1
      anki/shaders/GBufferGpuParticles.ankiprog
  18. 1 1
      anki/shaders/GpuParticlesSimulation.ankiprog
  19. 1 1
      anki/shaders/LensFlareSprite.ankiprog
  20. 2 1
      anki/shaders/LightFunctions.glsl
  21. 2 1
      anki/shaders/LightShadingApplyFog.ankiprog
  22. 5 5
      anki/shaders/RtShadowsHit.ankiprog
  23. 1 1
      anki/shaders/Ssgi.ankiprog
  24. 1 1
      anki/shaders/Ssr.ankiprog
  25. 1 1
      anki/shaders/TraditionalDeferredShading.ankiprog
  26. 2 1
      anki/shaders/VolumetricFogAccumulation.ankiprog
  27. 70 0
      anki/shaders/include/ClusteredShadingFunctions.h
  28. 0 58
      anki/shaders/include/ClusteredShadingTypes.h
  29. 0 0
      anki/shaders/include/LensFlareTypes.h
  30. 23 9
      anki/shaders/include/ModelTypes.h
  31. 0 0
      anki/shaders/include/ParticleTypes.h
  32. 0 0
      anki/shaders/include/SsgiTypes.h
  33. 0 0
      anki/shaders/include/SsrTypes.h
  34. 0 0
      anki/shaders/include/TraditionalDeferredShadingTypes.h

+ 1 - 1
anki/renderer/ClusterBin.h

@@ -6,7 +6,7 @@
 #pragma once
 
 #include <anki/renderer/Common.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingFunctions.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/LensFlare.cpp

@@ -9,7 +9,7 @@
 #include <anki/renderer/Renderer.h>
 #include <anki/core/ConfigSet.h>
 #include <anki/util/Functions.h>
-#include <anki/shaders/include/LensFlareSprite.h>
+#include <anki/shaders/include/LensFlareTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/ProbeReflections.cpp

@@ -11,7 +11,7 @@
 #include <anki/core/ConfigSet.h>
 #include <anki/util/Tracer.h>
 #include <anki/resource/MeshResource.h>
-#include <anki/shaders/include/TraditionalDeferredShading.h>
+#include <anki/shaders/include/TraditionalDeferredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/RenderQueue.h

@@ -8,7 +8,7 @@
 #include <anki/renderer/Common.h>
 #include <anki/resource/RenderingKey.h>
 #include <anki/ui/Canvas.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/Renderer.cpp

@@ -33,7 +33,7 @@
 #include <anki/renderer/GlobalIllumination.h>
 #include <anki/renderer/GenericCompute.h>
 #include <anki/renderer/ShadowmapsResolve.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/Ssgi.cpp

@@ -9,7 +9,7 @@
 #include <anki/renderer/GBuffer.h>
 #include <anki/renderer/DownscaleBlur.h>
 #include <anki/core/ConfigSet.h>
-#include <anki/shaders/include/Ssgi.h>
+#include <anki/shaders/include/SsgiTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/Ssr.cpp

@@ -10,7 +10,7 @@
 #include <anki/renderer/DownscaleBlur.h>
 #include <anki/renderer/RenderQueue.h>
 #include <anki/core/ConfigSet.h>
-#include <anki/shaders/include/Ssr.h>
+#include <anki/shaders/include/SsrTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/renderer/TraditionalDeferredShading.cpp

@@ -7,7 +7,7 @@
 #include <anki/renderer/RenderQueue.h>
 #include <anki/resource/ResourceManager.h>
 #include <anki/resource/MeshResource.h>
-#include <anki/shaders/include/TraditionalDeferredShading.h>
+#include <anki/shaders/include/TraditionalDeferredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/resource/MaterialResource.h

@@ -11,7 +11,7 @@
 #include <anki/resource/TextureResource.h>
 #include <anki/Math.h>
 #include <anki/util/Enum.h>
-#include <anki/shaders/include/GpuModel.h>
+#include <anki/shaders/include/ModelTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/scene/GpuParticleEmitterNode.cpp

@@ -10,7 +10,7 @@
 #include <anki/scene/components/GenericGpuComputeJobComponent.h>
 #include <anki/scene/components/RenderComponent.h>
 #include <anki/resource/ResourceManager.h>
-#include <anki/shaders/include/GpuParticles.h>
+#include <anki/shaders/include/ParticleTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/scene/LightNode.cpp

@@ -10,7 +10,7 @@
 #include <anki/scene/components/SpatialComponent.h>
 #include <anki/scene/components/FrustumComponent.h>
 #include <anki/resource/ResourceManager.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/scene/ReflectionProbeNode.cpp

@@ -11,7 +11,7 @@
 #include <anki/scene/SceneGraph.h>
 #include <anki/scene/SceneGraph.h>
 #include <anki/renderer/LightShading.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/scene/components/DecalComponent.cpp

@@ -6,7 +6,7 @@
 #include <anki/scene/components/DecalComponent.h>
 #include <anki/scene/SceneGraph.h>
 #include <anki/resource/ResourceManager.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
anki/scene/components/FrustumComponent.h

@@ -11,7 +11,7 @@
 #include <anki/collision/Obb.h>
 #include <anki/collision/ConvexHullShape.h>
 #include <anki/collision/Plane.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingFunctions.h>
 
 namespace anki
 {

+ 1 - 1
anki/scene/components/LightComponent.cpp

@@ -9,7 +9,7 @@
 #include <anki/scene/SceneGraph.h>
 #include <anki/scene/Octree.h>
 #include <anki/Collision.h>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 2 - 1
anki/shader_compiler/ShaderProgramParser.cpp

@@ -176,7 +176,8 @@ static const char* SHADER_HEADER = R"(#version 460 core
 #define _ANKI_CONCATENATE(a, b) a##b
 #define ANKI_CONCATENATE(a, b) _ANKI_CONCATENATE(a, b)
 
-#define ANKI_SIZEOF(basicType) _ANKI_CONCATENATE(_ANKI_SIZEOF_, basicType)
+#define ANKI_SIZEOF(type) _ANKI_CONCATENATE(_ANKI_SIZEOF_, type)
+#define ANKI_ALIGNOF(type) _ANKI_CONCATENATE(_ANKI_ALIGNOF_, type)
 
 #define _ANKI_SCONST_X(type, n, id, defltVal) \
 	layout(constant_id = id) const type n = defltVal; \

+ 1 - 1
anki/shaders/GBufferGpuParticles.ankiprog

@@ -6,7 +6,7 @@
 #pragma anki mutator ANKI_PASS 0 2 3
 #pragma anki mutator ANKI_VELOCITY 0 1
 
-#include <anki/shaders/include/GpuParticles.h>
+#include <anki/shaders/include/ParticleTypes.h>
 
 struct PerDraw
 {

+ 1 - 1
anki/shaders/GpuParticlesSimulation.ankiprog

@@ -7,7 +7,7 @@
 
 #pragma anki start comp
 
-#include <anki/shaders/include/GpuParticles.h>
+#include <anki/shaders/include/ParticleTypes.h>
 #include <anki/shaders/Common.glsl>
 
 layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

+ 1 - 1
anki/shaders/LensFlareSprite.ankiprog

@@ -5,7 +5,7 @@
 
 #pragma anki start vert
 #include <anki/shaders/Common.glsl>
-#include <anki/shaders/include/LensFlareSprite.h>
+#include <anki/shaders/include/LensFlareTypes.h>
 
 // The block contains data for all flares
 layout(std140, set = 0, binding = 0) readonly buffer ssbo00

+ 2 - 1
anki/shaders/LightFunctions.glsl

@@ -9,7 +9,8 @@
 
 #include <anki/shaders/Functions.glsl>
 #include <anki/shaders/Pack.glsl>
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
+#include <anki/shaders/include/ClusteredShadingFunctions.h>
 #include <anki/shaders/include/Evsm.h>
 
 // Do some EVSM magic with depth

+ 2 - 1
anki/shaders/LightShadingApplyFog.ankiprog

@@ -11,7 +11,8 @@ ANKI_SPECIALIZATION_CONSTANT_U32(FOG_LAST_CLASTER, 0, 1u);
 
 #pragma anki start frag
 
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
+#include <anki/shaders/include/ClusteredShadingFunctions.h>
 #include <anki/shaders/Common.glsl>
 
 layout(location = 0) in Vec2 in_uv;

+ 5 - 5
anki/shaders/RtShadowsHit.ankiprog

@@ -9,7 +9,7 @@
 #pragma anki mutator ALPHA_TEXTURE 0 1
 
 #include <anki/shaders/Common.glsl>
-#include <anki/shaders/include/GpuModel.h>
+#include <anki/shaders/include/ModelTypes.h>
 
 #if ALPHA_TEXTURE == 1
 layout(set = 0, binding = 0, scalar) buffer b_ankiModels
@@ -29,7 +29,7 @@ layout(location = 0) rayPayloadInEXT F32 g_payload;
 hitAttributeEXT vec2 g_attribs;
 
 ANKI_REF(U16Vec3, 2);
-ANKI_REF(GpuVertex, 4);
+ANKI_REF(MainVertex, ANKI_ALIGNOF(MainVertex));
 
 void main()
 {
@@ -40,9 +40,9 @@ void main()
 	const U32 offset = gl_PrimitiveID * ANKI_SIZEOF(U16Vec3);
 	const U16Vec3 indices = U16Vec3Ref(nonuniformEXT(mesh.m_indexBufferPtr + offset)).m_value;
 
-	const GpuVertex vert0 = GpuVertexRef(mesh.m_vertexBufferPtr + indices[0] * ANKI_SIZEOF(GpuVertex)).m_value;
-	const GpuVertex vert1 = GpuVertexRef(mesh.m_vertexBufferPtr + indices[1] * ANKI_SIZEOF(GpuVertex)).m_value;
-	const GpuVertex vert2 = GpuVertexRef(mesh.m_vertexBufferPtr + indices[2] * ANKI_SIZEOF(GpuVertex)).m_value;
+	const MainVertex vert0 = MainVertexRef(mesh.m_mainVertexBufferPtr + indices[0] * ANKI_SIZEOF(MainVertex)).m_value;
+	const MainVertex vert1 = MainVertexRef(mesh.m_mainVertexBufferPtr + indices[1] * ANKI_SIZEOF(MainVertex)).m_value;
+	const MainVertex vert2 = MainVertexRef(mesh.m_mainVertexBufferPtr + indices[2] * ANKI_SIZEOF(MainVertex)).m_value;
 
 	const Vec3 barycentrics = Vec3(1.0f - g_attribs.x - g_attribs.y, g_attribs.x, g_attribs.y);
 

+ 1 - 1
anki/shaders/Ssgi.ankiprog

@@ -16,7 +16,7 @@
 #include <anki/shaders/Functions.glsl>
 #include <anki/shaders/Pack.glsl>
 #include <anki/shaders/ImportanceSampling.glsl>
-#include <anki/shaders/include/Ssgi.h>
+#include <anki/shaders/include/SsgiTypes.h>
 
 const UVec2 WORKGROUP_SIZE = UVec2(16, 16);
 layout(local_size_x = WORKGROUP_SIZE.x, local_size_y = WORKGROUP_SIZE.y, local_size_z = 1) in;

+ 1 - 1
anki/shaders/Ssr.ankiprog

@@ -15,7 +15,7 @@
 #pragma anki start comp
 #include <anki/shaders/Functions.glsl>
 #include <anki/shaders/Pack.glsl>
-#include <anki/shaders/include/Ssr.h>
+#include <anki/shaders/include/SsrTypes.h>
 #include <anki/shaders/Tonemapping.glsl>
 #include <anki/shaders/SsRaymarching.glsl>
 

+ 1 - 1
anki/shaders/TraditionalDeferredShading.ankiprog

@@ -47,7 +47,7 @@ void main()
 #pragma anki start frag
 #include <anki/shaders/Pack.glsl>
 #include <anki/shaders/LightFunctions.glsl>
-#include <anki/shaders/include/TraditionalDeferredShading.h>
+#include <anki/shaders/include/TraditionalDeferredShadingTypes.h>
 
 layout(location = 0) out Vec3 out_color;
 

+ 2 - 1
anki/shaders/VolumetricFogAccumulation.ankiprog

@@ -8,7 +8,8 @@ ANKI_SPECIALIZATION_CONSTANT_U32(FINAL_CLUSTER_Z, 9, 1);
 
 #pragma anki start comp
 
-#include <anki/shaders/include/ClusteredShading.h>
+#include <anki/shaders/include/ClusteredShadingTypes.h>
+#include <anki/shaders/include/ClusteredShadingFunctions.h>
 #include <anki/shaders/Common.glsl>
 
 const UVec2 WORKGROUP_SIZE = UVec2(8, 8);

+ 70 - 0
anki/shaders/include/ClusteredShadingFunctions.h

@@ -0,0 +1,70 @@
+// Copyright (C) 2009-2020, Panagiotis Christopoulos Charitos and contributors.
+// All rights reserved.
+// Code licensed under the BSD License.
+// http://www.anki3d.org/LICENSE
+
+#pragma once
+
+#include <anki/shaders/include/ClusteredShadingTypes.h>
+
+ANKI_BEGIN_NAMESPACE
+
+ANKI_SHADER_FUNC_INLINE F32 computeClusterKf(ClustererMagicValues magic, Vec3 worldPos)
+{
+	const F32 fz = sqrt(dot(magic.m_val0.xyz(), worldPos) - magic.m_val0.w());
+	return fz;
+}
+
+ANKI_SHADER_FUNC_INLINE U32 computeClusterK(ClustererMagicValues magic, Vec3 worldPos)
+{
+	return U32(computeClusterKf(magic, worldPos));
+}
+
+// Compute cluster index
+ANKI_SHADER_FUNC_INLINE U32 computeClusterIndex(ClustererMagicValues magic, Vec2 uv, Vec3 worldPos, U32 clusterCountX,
+												U32 clusterCountY)
+{
+	const UVec2 xy = UVec2(uv * Vec2(F32(clusterCountX), F32(clusterCountY)));
+	const U32 k = computeClusterK(magic, worldPos);
+	return k * (clusterCountX * clusterCountY) + xy.y() * clusterCountX + xy.x();
+}
+
+// Compute the Z of the near plane given a cluster idx
+ANKI_SHADER_FUNC_INLINE F32 computeClusterNearf(ClustererMagicValues magic, F32 fk)
+{
+	return magic.m_val1.x() * fk * fk + magic.m_val1.y();
+}
+
+// Compute the Z of the near plane given a cluster idx
+ANKI_SHADER_FUNC_INLINE F32 computeClusterNear(ClustererMagicValues magic, U32 k)
+{
+	return computeClusterNearf(magic, F32(k));
+}
+
+// Compute the UV coordinates of a volume texture that encloses the clusterer
+ANKI_SHADER_FUNC_INLINE Vec3 computeClustererVolumeTextureUvs(ClustererMagicValues magic, Vec2 uv, Vec3 worldPos,
+															  U32 clusterCountZ)
+{
+	const F32 k = computeClusterKf(magic, worldPos);
+	return Vec3(uv, k / F32(clusterCountZ));
+}
+
+// Compute the far plane of a shadow cascade. "p" is the power that defines the distance curve.
+// "effectiveShadowDistance" is the far plane of the last cascade.
+ANKI_SHADER_FUNC_INLINE F32 computeShadowCascadeDistance(U32 cascadeIdx, F32 p, F32 effectiveShadowDistance,
+														 U32 shadowCascadeCount)
+{
+	return pow((F32(cascadeIdx) + 1.0f) / F32(shadowCascadeCount), p) * effectiveShadowDistance;
+}
+
+// The reverse of computeShadowCascadeDistance().
+ANKI_SHADER_FUNC_INLINE U32 computeShadowCascadeIndex(F32 distance, F32 p, F32 effectiveShadowDistance,
+													  U32 shadowCascadeCount)
+{
+	const F32 shadowCascadeCountf = F32(shadowCascadeCount);
+	F32 idx = pow(distance / effectiveShadowDistance, 1.0f / p) * shadowCascadeCountf;
+	idx = min(idx, shadowCascadeCountf - 1.0f);
+	return U32(idx);
+}
+
+ANKI_END_NAMESPACE

+ 0 - 58
anki/shaders/include/ClusteredShading.h → anki/shaders/include/ClusteredShadingTypes.h

@@ -161,62 +161,4 @@ const U32 _ANKI_SIZEOF_LightingUniforms =
 	9u * ANKI_SIZEOF(Vec4) + 8u * ANKI_SIZEOF(Mat4) + ANKI_SIZEOF(DirectionalLight);
 ANKI_SHADER_STATIC_ASSERT(sizeof(LightingUniforms) == _ANKI_SIZEOF_LightingUniforms);
 
-ANKI_SHADER_FUNC_INLINE F32 computeClusterKf(ClustererMagicValues magic, Vec3 worldPos)
-{
-	const F32 fz = sqrt(dot(magic.m_val0.xyz(), worldPos) - magic.m_val0.w());
-	return fz;
-}
-
-ANKI_SHADER_FUNC_INLINE U32 computeClusterK(ClustererMagicValues magic, Vec3 worldPos)
-{
-	return U32(computeClusterKf(magic, worldPos));
-}
-
-// Compute cluster index
-ANKI_SHADER_FUNC_INLINE U32 computeClusterIndex(ClustererMagicValues magic, Vec2 uv, Vec3 worldPos, U32 clusterCountX,
-												U32 clusterCountY)
-{
-	const UVec2 xy = UVec2(uv * Vec2(F32(clusterCountX), F32(clusterCountY)));
-	const U32 k = computeClusterK(magic, worldPos);
-	return k * (clusterCountX * clusterCountY) + xy.y() * clusterCountX + xy.x();
-}
-
-// Compute the Z of the near plane given a cluster idx
-ANKI_SHADER_FUNC_INLINE F32 computeClusterNearf(ClustererMagicValues magic, F32 fk)
-{
-	return magic.m_val1.x() * fk * fk + magic.m_val1.y();
-}
-
-// Compute the Z of the near plane given a cluster idx
-ANKI_SHADER_FUNC_INLINE F32 computeClusterNear(ClustererMagicValues magic, U32 k)
-{
-	return computeClusterNearf(magic, F32(k));
-}
-
-// Compute the UV coordinates of a volume texture that encloses the clusterer
-ANKI_SHADER_FUNC_INLINE Vec3 computeClustererVolumeTextureUvs(ClustererMagicValues magic, Vec2 uv, Vec3 worldPos,
-															  U32 clusterCountZ)
-{
-	const F32 k = computeClusterKf(magic, worldPos);
-	return Vec3(uv, k / F32(clusterCountZ));
-}
-
-// Compute the far plane of a shadow cascade. "p" is the power that defines the distance curve.
-// "effectiveShadowDistance" is the far plane of the last cascade.
-ANKI_SHADER_FUNC_INLINE F32 computeShadowCascadeDistance(U32 cascadeIdx, F32 p, F32 effectiveShadowDistance,
-														 U32 shadowCascadeCount)
-{
-	return pow((F32(cascadeIdx) + 1.0f) / F32(shadowCascadeCount), p) * effectiveShadowDistance;
-}
-
-// The reverse of computeShadowCascadeDistance().
-ANKI_SHADER_FUNC_INLINE U32 computeShadowCascadeIndex(F32 distance, F32 p, F32 effectiveShadowDistance,
-													  U32 shadowCascadeCount)
-{
-	const F32 shadowCascadeCountf = F32(shadowCascadeCount);
-	F32 idx = pow(distance / effectiveShadowDistance, 1.0f / p) * shadowCascadeCountf;
-	idx = min(idx, shadowCascadeCountf - 1.0f);
-	return U32(idx);
-}
-
 ANKI_END_NAMESPACE

+ 0 - 0
anki/shaders/include/LensFlareSprite.h → anki/shaders/include/LensFlareTypes.h


+ 23 - 9
anki/shaders/include/GpuModel.h → anki/shaders/include/ModelTypes.h

@@ -12,22 +12,36 @@ ANKI_BEGIN_NAMESPACE
 const U32 UV_CHANNEL_0 = 0;
 const U32 UV_CHANNEL_COUNT = 1;
 
-struct GpuVertex
+/// The main vertex that contains normals, tangents and UVs
+struct MainVertex
 {
-	U32 m_normal; // Packed in R10G10B10A2SNorm
-	U32 m_tangent; // Packed in R10G10B10A2SNorm
+	U32 m_normal; ///< Packed in a custom R11G11B10_SNorm
+	U32 m_tangent; ///< Packed in a custom R10G10B11A1_SNorm format
 	HVec2 m_uvs[UV_CHANNEL_COUNT];
 };
 
-const U32 _ANKI_SIZEOF_GpuVertex = 4 * 3;
-const U32 _ANKI_ALIGNOF_GpuVertex = 4;
-ANKI_SHADER_STATIC_ASSERT(_ANKI_SIZEOF_GpuVertex == sizeof(GpuVertex));
+const U32 _ANKI_SIZEOF_MainVertex = 4 * 3;
+const U32 _ANKI_ALIGNOF_MainVertex = 4;
+ANKI_SHADER_STATIC_ASSERT(_ANKI_SIZEOF_MainVertex == sizeof(MainVertex));
 
+/// The vertex that contains the bone influences.
+struct BoneInfoVertex
+{
+	F32 m_boneIndices[4];
+	U8 m_boneWeights[4];
+};
+
+const U32 _ANKI_SIZEOF_BoneInfoVertex = 5 * 4;
+const U32 _ANKI_ALIGNOF_BoneInfoVertex = 4;
+ANKI_SHADER_STATIC_ASSERT(_ANKI_SIZEOF_BoneInfoVertex == sizeof(BoneInfoVertex));
+
+/// A structure that contains all the info of a geometry.
 struct GpuMesh
 {
-	U64 m_indexBufferPtr; // Points to a buffer of U16
-	U64 m_positionBufferPtr; // Points to a buffer of Vec3
-	U64 m_vertexBufferPtr; // Points to a buffer of Vertex
+	U64 m_indexBufferPtr; ///< Points to a buffer of U16 indices.
+	U64 m_positionBufferPtr; ///< Points to a buffer of Vec3 positions.
+	U64 m_mainVertexBufferPtr; ///< Points to a buffer of MainVertex.
+	U64 m_boneInfoVertexBufferPtr; ///< Points to a buffer of BoneInfoVertex.
 	U32 m_indexCount;
 	U32 m_vertexCount;
 };

+ 0 - 0
anki/shaders/include/GpuParticles.h → anki/shaders/include/ParticleTypes.h


+ 0 - 0
anki/shaders/include/Ssgi.h → anki/shaders/include/SsgiTypes.h


+ 0 - 0
anki/shaders/include/Ssr.h → anki/shaders/include/SsrTypes.h


+ 0 - 0
anki/shaders/include/TraditionalDeferredShading.h → anki/shaders/include/TraditionalDeferredShadingTypes.h