Panagiotis Christopoulos Charitos 4 years ago
parent
commit
9148fc2352

+ 1 - 1
AnKi/Core/ConfigSet.cpp

@@ -11,7 +11,7 @@
 // Used by the config options
 #include <AnKi/Util/System.h>
 #include <AnKi/Math.h>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 22 - 22
AnKi/Renderer/ClusterBinning.cpp

@@ -139,11 +139,11 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 		rqueue.m_reflectionProbes.setArray(rqueue.m_reflectionProbes.getBegin(), MAX_VISIBLE_REFLECTION_PROBES);
 	}
 
-	if(ANKI_UNLIKELY(rqueue.m_giProbes.getSize() > MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2))
+	if(ANKI_UNLIKELY(rqueue.m_giProbes.getSize() > MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES))
 	{
 		ANKI_R_LOGW("Visible GI probes exceed the max value by %u",
-					rqueue.m_giProbes.getSize() - MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2);
-		rqueue.m_giProbes.setArray(rqueue.m_giProbes.getBegin(), MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2);
+					rqueue.m_giProbes.getSize() - MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES);
+		rqueue.m_giProbes.setArray(rqueue.m_giProbes.getBegin(), MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES);
 	}
 
 	// Allocate buffers
@@ -155,7 +155,7 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 
 	if(rqueue.m_pointLights.getSize())
 	{
-		cs.m_pointLightsAddress = stagingMem.allocateFrame(rqueue.m_pointLights.getSize() * sizeof(PointLight2),
+		cs.m_pointLightsAddress = stagingMem.allocateFrame(rqueue.m_pointLights.getSize() * sizeof(PointLight),
 														   StagingGpuMemoryType::UNIFORM, cs.m_pointLightsToken);
 	}
 	else
@@ -165,7 +165,7 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 
 	if(rqueue.m_spotLights.getSize())
 	{
-		cs.m_spotLightsAddress = stagingMem.allocateFrame(rqueue.m_spotLights.getSize() * sizeof(SpotLight2),
+		cs.m_spotLightsAddress = stagingMem.allocateFrame(rqueue.m_spotLights.getSize() * sizeof(SpotLight),
 														  StagingGpuMemoryType::UNIFORM, cs.m_spotLightsToken);
 	}
 	else
@@ -176,7 +176,7 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 	if(rqueue.m_reflectionProbes.getSize())
 	{
 		cs.m_reflectionProbesAddress =
-			stagingMem.allocateFrame(rqueue.m_reflectionProbes.getSize() * sizeof(ReflectionProbe2),
+			stagingMem.allocateFrame(rqueue.m_reflectionProbes.getSize() * sizeof(ReflectionProbe),
 									 StagingGpuMemoryType::UNIFORM, cs.m_reflectionProbesToken);
 	}
 	else
@@ -186,7 +186,7 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 
 	if(rqueue.m_decals.getSize())
 	{
-		cs.m_decalsAddress = stagingMem.allocateFrame(rqueue.m_decals.getSize() * sizeof(Decal2),
+		cs.m_decalsAddress = stagingMem.allocateFrame(rqueue.m_decals.getSize() * sizeof(Decal),
 													  StagingGpuMemoryType::UNIFORM, cs.m_decalsToken);
 	}
 	else
@@ -197,7 +197,7 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 	if(rqueue.m_fogDensityVolumes.getSize())
 	{
 		cs.m_fogDensityVolumesAddress =
-			stagingMem.allocateFrame(rqueue.m_fogDensityVolumes.getSize() * sizeof(FogDensityVolume2),
+			stagingMem.allocateFrame(rqueue.m_fogDensityVolumes.getSize() * sizeof(FogDensityVolume),
 									 StagingGpuMemoryType::UNIFORM, cs.m_fogDensityVolumesToken);
 	}
 	else
@@ -208,7 +208,7 @@ void ClusterBinning::writeClustererBuffers(RenderingContext& ctx)
 	if(rqueue.m_giProbes.getSize())
 	{
 		cs.m_globalIlluminationProbesAddress =
-			stagingMem.allocateFrame(rqueue.m_giProbes.getSize() * sizeof(GlobalIlluminationProbe2),
+			stagingMem.allocateFrame(rqueue.m_giProbes.getSize() * sizeof(GlobalIlluminationProbe),
 									 StagingGpuMemoryType::UNIFORM, cs.m_globalIlluminationProbesToken);
 	}
 	else
@@ -240,11 +240,11 @@ void ClusterBinning::writeClustererBuffersTask()
 	// Point lights
 	if(rqueue.m_pointLights.getSize())
 	{
-		PointLight2* lights = static_cast<PointLight2*>(cs.m_pointLightsAddress);
+		PointLight* lights = static_cast<PointLight*>(cs.m_pointLightsAddress);
 
 		for(U32 i = 0; i < rqueue.m_pointLights.getSize(); ++i)
 		{
-			PointLight2& out = lights[i];
+			PointLight& out = lights[i];
 			const PointLightQueueElement& in = rqueue.m_pointLights[i];
 
 			out.m_position = in.m_worldPosition;
@@ -271,12 +271,12 @@ void ClusterBinning::writeClustererBuffersTask()
 	// Spot lights
 	if(rqueue.m_spotLights.getSize())
 	{
-		SpotLight2* lights = static_cast<SpotLight2*>(cs.m_spotLightsAddress);
+		SpotLight* lights = static_cast<SpotLight*>(cs.m_spotLightsAddress);
 
 		for(U32 i = 0; i < rqueue.m_spotLights.getSize(); ++i)
 		{
 			const SpotLightQueueElement& in = rqueue.m_spotLights[i];
-			SpotLight2& out = lights[i];
+			SpotLight& out = lights[i];
 
 			out.m_position = in.m_worldTransform.getTranslationPart().xyz();
 			memcpy(&out.m_edgePoints[0][0], &in.m_edgePoints[0][0], sizeof(out.m_edgePoints));
@@ -303,12 +303,12 @@ void ClusterBinning::writeClustererBuffersTask()
 	// Reflection probes
 	if(rqueue.m_reflectionProbes.getSize())
 	{
-		ReflectionProbe2* probes = static_cast<ReflectionProbe2*>(cs.m_reflectionProbesAddress);
+		ReflectionProbe* probes = static_cast<ReflectionProbe*>(cs.m_reflectionProbesAddress);
 
 		for(U32 i = 0; i < rqueue.m_reflectionProbes.getSize(); ++i)
 		{
 			const ReflectionProbeQueueElement& in = rqueue.m_reflectionProbes[i];
-			ReflectionProbe2& out = probes[i];
+			ReflectionProbe& out = probes[i];
 
 			out.m_position = in.m_worldPosition;
 			out.m_cubemapIndex = F32(in.m_textureArrayIndex);
@@ -320,14 +320,14 @@ void ClusterBinning::writeClustererBuffersTask()
 	// Decals
 	if(rqueue.m_decals.getSize())
 	{
-		Decal2* decals = static_cast<Decal2*>(cs.m_decalsAddress);
+		Decal* decals = static_cast<Decal*>(cs.m_decalsAddress);
 
 		TextureView* diffuseAtlas = nullptr;
 		TextureView* specularRoughnessAtlas = nullptr;
 		for(U32 i = 0; i < rqueue.m_decals.getSize(); ++i)
 		{
 			const DecalQueueElement& in = rqueue.m_decals[i];
-			Decal2& out = decals[i];
+			Decal& out = decals[i];
 
 			if((diffuseAtlas != nullptr && diffuseAtlas != in.m_diffuseAtlas)
 			   || (specularRoughnessAtlas != nullptr && specularRoughnessAtlas != in.m_specularRoughnessAtlas))
@@ -365,12 +365,12 @@ void ClusterBinning::writeClustererBuffersTask()
 	// Fog volumes
 	if(rqueue.m_fogDensityVolumes.getSize())
 	{
-		FogDensityVolume2* volumes = static_cast<FogDensityVolume2*>(cs.m_fogDensityVolumesAddress);
+		FogDensityVolume* volumes = static_cast<FogDensityVolume*>(cs.m_fogDensityVolumesAddress);
 
 		for(U32 i = 0; i < rqueue.m_fogDensityVolumes.getSize(); ++i)
 		{
 			const FogDensityQueueElement& in = rqueue.m_fogDensityVolumes[i];
-			FogDensityVolume2& out = volumes[i];
+			FogDensityVolume& out = volumes[i];
 
 			out.m_density = in.m_density;
 			if(in.m_isBox)
@@ -391,12 +391,12 @@ void ClusterBinning::writeClustererBuffersTask()
 	// GI
 	if(rqueue.m_giProbes.getSize())
 	{
-		GlobalIlluminationProbe2* probes = static_cast<GlobalIlluminationProbe2*>(cs.m_globalIlluminationProbesAddress);
+		GlobalIlluminationProbe* probes = static_cast<GlobalIlluminationProbe*>(cs.m_globalIlluminationProbesAddress);
 
 		for(U32 i = 0; i < rqueue.m_giProbes.getSize(); ++i)
 		{
 			const GlobalIlluminationProbeQueueElement& in = rqueue.m_giProbes[i];
-			GlobalIlluminationProbe2& out = probes[i];
+			GlobalIlluminationProbe& out = probes[i];
 
 			out.m_aabbMin = in.m_aabbMin;
 			out.m_aabbMax = in.m_aabbMax;
@@ -449,7 +449,7 @@ void ClusterBinning::writeClustererBuffersTask()
 		// Directional light
 		if(rqueue.m_directionalLight.m_uuid != 0)
 		{
-			DirectionalLight2& out = unis.m_directionalLight;
+			DirectionalLight& out = unis.m_directionalLight;
 			const DirectionalLightQueueElement& in = rqueue.m_directionalLight;
 
 			out.m_diffuseColor = in.m_diffuseColor;

+ 1 - 1
AnKi/Renderer/Common.h

@@ -9,7 +9,7 @@
 #include <AnKi/Core/StagingGpuMemoryManager.h>
 #include <AnKi/Util/Ptr.h>
 #include <AnKi/Shaders/Include/Evsm.h>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
AnKi/Renderer/GlobalIllumination.cpp

@@ -83,7 +83,7 @@ void GlobalIllumination::setRenderGraphDependencies(RenderingContext& ctx, Rende
 void GlobalIllumination::bindVolumeTextures(const RenderingContext& ctx, RenderPassWorkContext& rgraphCtx, U32 set,
 											U32 binding) const
 {
-	for(U32 idx = 0; idx < MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2; ++idx)
+	for(U32 idx = 0; idx < MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES; ++idx)
 	{
 		if(idx < ctx.m_renderQueue->m_giProbes.getSize())
 		{

+ 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/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 #include <AnKi/Shaders/Include/ModelTypes.h>
 
 namespace anki

+ 1 - 1
AnKi/Renderer/Renderer.cpp

@@ -12,7 +12,7 @@
 #include <AnKi/Collision/Aabb.h>
 #include <AnKi/Collision/Plane.h>
 #include <AnKi/Collision/Functions.h>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 #include <AnKi/Renderer/ProbeReflections.h>
 #include <AnKi/Renderer/GBuffer.h>

+ 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/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
AnKi/Scene/Components/LightComponent.cpp

@@ -11,7 +11,7 @@
 #include <AnKi/Collision.h>
 #include <AnKi/Resource/ResourceManager.h>
 #include <AnKi/Resource/TextureResource.h>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
AnKi/Scene/LightNode.cpp

@@ -9,7 +9,7 @@
 #include <AnKi/Scene/Components/MoveComponent.h>
 #include <AnKi/Scene/Components/SpatialComponent.h>
 #include <AnKi/Scene/Components/FrustumComponent.h>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
AnKi/Scene/ReflectionProbeNode.cpp

@@ -10,7 +10,7 @@
 #include <AnKi/Scene/Components/SpatialComponent.h>
 #include <AnKi/Scene/SceneGraph.h>
 #include <AnKi/Renderer/LightShading.h>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 namespace anki
 {

+ 1 - 1
AnKi/Shaders/ApplyIrradianceToReflection.ankiprog

@@ -5,7 +5,7 @@
 
 #pragma anki start comp
 #include <AnKi/Shaders/Pack.glsl>
-#include <AnKi/Shaders/LightFunctions2.glsl>
+#include <AnKi/Shaders/LightFunctions.glsl>
 
 layout(local_size_x = 8, local_size_y = 8, local_size_z = 6) in;
 

+ 11 - 11
AnKi/Shaders/ClusterBinning.ankiprog

@@ -11,7 +11,7 @@ ANKI_SPECIALIZATION_CONSTANT_UVEC2(RENDERING_SIZE, 4);
 
 #pragma anki start comp
 
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 #include <AnKi/Shaders/Common.glsl>
 #include <AnKi/Shaders/CollisionFunctions.glsl>
 
@@ -30,7 +30,7 @@ layout(set = 0, binding = 1, scalar) writeonly buffer b_clusters
 
 layout(set = 0, binding = 2, scalar) uniform b_pointLights
 {
-	PointLight2 u_pointLights[MAX_VISIBLE_POINT_LIGHTS];
+	PointLight u_pointLights[MAX_VISIBLE_POINT_LIGHTS];
 };
 
 layout(set = 0, binding = 3, scalar) uniform b_spotLights
@@ -40,22 +40,22 @@ layout(set = 0, binding = 3, scalar) uniform b_spotLights
 
 layout(set = 0, binding = 4, scalar) uniform b_reflectionProbes
 {
-	ReflectionProbe2 u_reflectionProbes[MAX_VISIBLE_REFLECTION_PROBES];
+	ReflectionProbe u_reflectionProbes[MAX_VISIBLE_REFLECTION_PROBES];
 };
 
 layout(set = 0, binding = 5, scalar) uniform b_giProbes
 {
-	GlobalIlluminationProbe2 u_giProbes[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2];
+	GlobalIlluminationProbe u_giProbes[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES];
 };
 
 layout(set = 0, binding = 6, scalar) uniform b_fogVolumes
 {
-	FogDensityVolume2 u_fogVolumes[MAX_VISIBLE_FOG_DENSITY_VOLUMES];
+	FogDensityVolume u_fogVolumes[MAX_VISIBLE_FOG_DENSITY_VOLUMES];
 };
 
 layout(set = 0, binding = 7, scalar) uniform b_decals
 {
-	Decal2 u_decals[MAX_VISIBLE_DECALS];
+	Decal u_decals[MAX_VISIBLE_DECALS];
 };
 
 const U32 TILE_COUNT = TILE_COUNT_X * TILE_COUNT_Y;
@@ -150,7 +150,7 @@ void main()
 	if(isPointLight())
 	{
 		objectArrayIdx = clustererObjectIdx;
-		const PointLight2 light = u_pointLights[objectArrayIdx];
+		const PointLight light = u_pointLights[objectArrayIdx];
 		collides = testRaySphere(rayOrigin, rayDir, light.m_position, light.m_radius, t0, t1);
 	}
 	// Spot light
@@ -195,7 +195,7 @@ void main()
 	else if(isDecal())
 	{
 		objectArrayIdx = clustererObjectIdx - u_unis.m_objectCountsUpTo[CLUSTER_OBJECT_TYPE_DECAL - 1u];
-		const Decal2 decal = u_decals[objectArrayIdx];
+		const Decal decal = u_decals[objectArrayIdx];
 
 		collides = testRayObb(rayOrigin, rayDir, decal.m_obbExtend, decal.m_invertedTransform, t0, t1);
 	}
@@ -203,7 +203,7 @@ void main()
 	else if(isFogVolume())
 	{
 		objectArrayIdx = clustererObjectIdx - u_unis.m_objectCountsUpTo[CLUSTER_OBJECT_TYPE_FOG_DENSITY_VOLUME - 1u];
-		const FogDensityVolume2 vol = u_fogVolumes[objectArrayIdx];
+		const FogDensityVolume vol = u_fogVolumes[objectArrayIdx];
 
 		if(vol.m_isBox != 0u)
 		{
@@ -220,7 +220,7 @@ void main()
 	else if(isReflectionProbe())
 	{
 		objectArrayIdx = clustererObjectIdx - u_unis.m_objectCountsUpTo[CLUSTER_OBJECT_TYPE_REFLECTION_PROBE - 1u];
-		const ReflectionProbe2 probe = u_reflectionProbes[objectArrayIdx];
+		const ReflectionProbe probe = u_reflectionProbes[objectArrayIdx];
 
 		collides = testRayAabb(rayOrigin, rayDir, probe.m_aabbMin, probe.m_aabbMax, t0, t1);
 	}
@@ -229,7 +229,7 @@ void main()
 	{
 		objectArrayIdx =
 			clustererObjectIdx - u_unis.m_objectCountsUpTo[CLUSTER_OBJECT_TYPE_GLOBAL_ILLUMINATION_PROBE - 1u];
-		const GlobalIlluminationProbe2 probe = u_giProbes[objectArrayIdx];
+		const GlobalIlluminationProbe probe = u_giProbes[objectArrayIdx];
 
 		collides = testRayAabb(rayOrigin, rayDir, probe.m_aabbMin, probe.m_aabbMax, t0, t1);
 	}

+ 9 - 9
AnKi/Shaders/ClusteredShadingCommon2.glsl → AnKi/Shaders/ClusteredShadingCommon.glsl

@@ -5,7 +5,7 @@
 
 #pragma once
 
-#include <AnKi/Shaders/LightFunctions2.glsl>
+#include <AnKi/Shaders/LightFunctions.glsl>
 
 //
 // Common uniforms
@@ -23,12 +23,12 @@ layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_UNIFORMS_BINDING
 #if defined(CLUSTERED_SHADING_LIGHTS_BINDING)
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_LIGHTS_BINDING, scalar) uniform b_pointLights
 {
-	PointLight2 u_pointLights2[MAX_VISIBLE_POINT_LIGHTS];
+	PointLight u_pointLights2[MAX_VISIBLE_POINT_LIGHTS];
 };
 
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_LIGHTS_BINDING + 1, scalar) uniform b_spotLights
 {
-	SpotLight2 u_spotLights2[MAX_VISIBLE_SPOT_LIGHTS];
+	SpotLight u_spotLights2[MAX_VISIBLE_SPOT_LIGHTS];
 };
 
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_LIGHTS_BINDING + 2) uniform texture2D u_shadowAtlasTex;
@@ -40,7 +40,7 @@ layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_LIGHTS_BINDING +
 #if defined(CLUSTERED_SHADING_REFLECTIONS_BINDING)
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_REFLECTIONS_BINDING, scalar) uniform b_reflectionProbes
 {
-	ReflectionProbe2 u_reflectionProbes2[MAX_VISIBLE_REFLECTION_PROBES];
+	ReflectionProbe u_reflectionProbes2[MAX_VISIBLE_REFLECTION_PROBES];
 };
 
 layout(set = CLUSTERED_SHADING_SET,
@@ -55,7 +55,7 @@ layout(set = CLUSTERED_SHADING_SET,
 #if defined(CLUSTERED_SHADING_DECALS_BINDING)
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_DECALS_BINDING, scalar) uniform b_decals
 {
-	Decal2 u_decals2[MAX_VISIBLE_DECALS];
+	Decal u_decals2[MAX_VISIBLE_DECALS];
 };
 
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_DECALS_BINDING + 1) uniform texture2D u_diffuseDecalTex;
@@ -69,7 +69,7 @@ layout(set = CLUSTERED_SHADING_SET,
 #if defined(CLUSTERED_SHADING_FOG_BINDING)
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_FOG_BINDING, scalar) uniform b_fogDensityVolumes
 {
-	FogDensityVolume2 u_fogDensityVolumes[MAX_VISIBLE_FOG_DENSITY_VOLUMES];
+	FogDensityVolume u_fogDensityVolumes[MAX_VISIBLE_FOG_DENSITY_VOLUMES];
 };
 #endif
 
@@ -78,11 +78,11 @@ layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_FOG_BINDING, sca
 //
 #if defined(CLUSTERED_SHADING_GI_BINDING)
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_GI_BINDING) uniform texture3D
-	u_globalIlluminationTextures[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2];
+	u_globalIlluminationTextures[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES];
 
 layout(set = CLUSTERED_SHADING_SET, binding = CLUSTERED_SHADING_GI_BINDING + 1, scalar) uniform b_giProbes
 {
-	GlobalIlluminationProbe2 u_giProbes[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2];
+	GlobalIlluminationProbe u_giProbes[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES];
 };
 #endif
 
@@ -134,7 +134,7 @@ Vec3 clusterHeatmap(Cluster cluster, U32 objectTypeMask)
 
 	if((objectTypeMask & (1u << CLUSTER_OBJECT_TYPE_GLOBAL_ILLUMINATION_PROBE)) != 0)
 	{
-		maxObjects += MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2;
+		maxObjects += MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES;
 		count += bitCount(cluster.m_giProbesMask);
 	}
 

+ 1 - 1
AnKi/Shaders/ExponentialShadowmappingResolve.ankiprog

@@ -7,7 +7,7 @@ ANKI_SPECIALIZATION_CONSTANT_UVEC2(INPUT_TEXTURE_SIZE, 0);
 
 #pragma anki start comp
 #include <AnKi/Shaders/GaussianBlurCommon.glsl>
-#include <AnKi/Shaders/LightFunctions2.glsl>
+#include <AnKi/Shaders/LightFunctions.glsl>
 
 layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
 

+ 3 - 3
AnKi/Shaders/ForwardShadingCommonFrag.glsl

@@ -17,7 +17,7 @@ layout(set = 0, binding = 2) uniform texture3D u_lightVol;
 #define CLUSTERED_SHADING_UNIFORMS_BINDING 3
 #define CLUSTERED_SHADING_LIGHTS_BINDING 4
 #define CLUSTERED_SHADING_CLUSTERS_BINDING 7
-#include <AnKi/Shaders/ClusteredShadingCommon2.glsl>
+#include <AnKi/Shaders/ClusteredShadingCommon.glsl>
 
 layout(location = 0) out Vec4 out_color;
 
@@ -47,7 +47,7 @@ Vec3 computeLightColorHigh(Vec3 diffCol, Vec3 worldPos)
 	{
 		const I32 idx = findLSB64(cluster.m_pointLightsMask);
 		cluster.m_pointLightsMask &= ~(1ul << U64(idx));
-		const PointLight2 light = u_pointLights2[idx];
+		const PointLight light = u_pointLights2[idx];
 
 		const Vec3 diffC = diffCol * light.m_diffuseColor;
 
@@ -72,7 +72,7 @@ Vec3 computeLightColorHigh(Vec3 diffCol, Vec3 worldPos)
 	{
 		const I32 idx = findLSB64(cluster.m_spotLightsMask);
 		cluster.m_spotLightsMask &= ~(1ul << U64(idx));
-		const SpotLight2 light = u_spotLights2[idx];
+		const SpotLight light = u_spotLights2[idx];
 
 		const Vec3 diffC = diffCol * light.m_diffuseColor;
 

+ 2 - 2
AnKi/Shaders/GBufferPost.ankiprog

@@ -23,7 +23,7 @@ layout(set = 0, binding = 2) uniform sampler u_trilinearRepeatSampler;
 #define CLUSTERED_SHADING_UNIFORMS_BINDING 3
 #define CLUSTERED_SHADING_DECALS_BINDING 4
 #define CLUSTERED_SHADING_CLUSTERS_BINDING 7
-#include <AnKi/Shaders/ClusteredShadingCommon2.glsl>
+#include <AnKi/Shaders/ClusteredShadingCommon.glsl>
 
 layout(location = 0) in Vec2 in_uv;
 
@@ -62,7 +62,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_decalsMask);
 		cluster.m_decalsMask &= ~(1ul << U64(idx));
-		const Decal2 decal = u_decals2[idx];
+		const Decal decal = u_decals2[idx];
 
 		// Project pos to decal space
 		const Vec4 texCoords4 = decal.m_textureMatrix * Vec4(worldPos, 1.0);

+ 1 - 1
AnKi/Shaders/Include/ClusteredShadingFunctions.h

@@ -5,7 +5,7 @@
 
 #pragma once
 
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 
 ANKI_BEGIN_NAMESPACE
 

+ 27 - 27
AnKi/Shaders/Include/ClusteredShadingTypes2.h → AnKi/Shaders/Include/ClusteredShadingTypes.h

@@ -24,7 +24,7 @@ const U32 MAX_VISIBLE_SPOT_LIGHTS = 64u;
 const U32 MAX_VISIBLE_DECALS = 64u;
 const U32 MAX_VISIBLE_FOG_DENSITY_VOLUMES = 16u;
 const U32 MAX_VISIBLE_REFLECTION_PROBES = 16u;
-const U32 MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2 = 8u;
+const U32 MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES = 8u;
 
 // Other consts
 const F32 CLUSTER_OBJECT_FRUSTUM_NEAR_PLANE = 0.1f / 4.0f; ///< The near plane of various clusterer object frustums.
@@ -32,7 +32,7 @@ const U32 MAX_SHADOW_CASCADES2 = 4u;
 const F32 SUBSURFACE_MIN = 0.01f;
 
 /// Point light.
-struct PointLight2
+struct PointLight
 {
 	Vec3 m_position; ///< Position in world space.
 	Vec3 m_diffuseColor;
@@ -42,11 +42,11 @@ struct PointLight2
 	F32 m_shadowAtlasTileScale; ///< UV scale for all tiles.
 	Vec2 m_shadowAtlasTileOffsets[6u];
 };
-const U32 _ANKI_SIZEOF_PointLight2 = 22u * ANKI_SIZEOF(U32);
-ANKI_SHADER_STATIC_ASSERT(sizeof(PointLight2) == _ANKI_SIZEOF_PointLight2);
+const U32 _ANKI_SIZEOF_PointLight = 22u * ANKI_SIZEOF(U32);
+ANKI_SHADER_STATIC_ASSERT(sizeof(PointLight) == _ANKI_SIZEOF_PointLight);
 
 /// Spot light.
-struct SpotLight2
+struct SpotLight
 {
 	Vec3 m_position; ///< Position in world space.
 	Vec3 m_edgePoints[4u]; ///< Edge points in world space.
@@ -60,8 +60,8 @@ struct SpotLight2
 	Vec2 m_padding;
 	Mat4 m_textureMatrix;
 };
-const U32 _ANKI_SIZEOF_SpotLight2 = 28u * ANKI_SIZEOF(U32) + ANKI_SIZEOF(Mat4);
-ANKI_SHADER_STATIC_ASSERT(sizeof(SpotLight2) == _ANKI_SIZEOF_SpotLight2);
+const U32 _ANKI_SIZEOF_SpotLight = 28u * ANKI_SIZEOF(U32) + ANKI_SIZEOF(Mat4);
+ANKI_SHADER_STATIC_ASSERT(sizeof(SpotLight) == _ANKI_SIZEOF_SpotLight);
 
 /// Spot light different view. This is the same structure as SpotLight but it's designed for binning.
 struct SpotLightBinning
@@ -77,12 +77,12 @@ struct SpotLightBinning
 	Vec2 m_padding;
 	Mat4 m_textureMatrix;
 };
-const U32 _ANKI_SIZEOF_SpotLightBinning = _ANKI_SIZEOF_SpotLight2;
+const U32 _ANKI_SIZEOF_SpotLightBinning = _ANKI_SIZEOF_SpotLight;
 ANKI_SHADER_STATIC_ASSERT(sizeof(SpotLightBinning) == _ANKI_SIZEOF_SpotLightBinning);
-ANKI_SHADER_STATIC_ASSERT(alignof(SpotLightBinning) == alignof(SpotLight2));
+ANKI_SHADER_STATIC_ASSERT(alignof(SpotLightBinning) == alignof(SpotLight));
 
 /// Directional light (sun).
-struct DirectionalLight2
+struct DirectionalLight
 {
 	Vec3 m_diffuseColor;
 	U32 m_cascadeCount; ///< If it's zero then it doesn't cast shadow.
@@ -94,22 +94,22 @@ struct DirectionalLight2
 	U32 m_padding;
 	Mat4 m_textureMatrices[MAX_SHADOW_CASCADES2];
 };
-const U32 _ANKI_SIZEOF_DirectionalLight2 = 12u * ANKI_SIZEOF(U32) + MAX_SHADOW_CASCADES2 * ANKI_SIZEOF(Mat4);
-ANKI_SHADER_STATIC_ASSERT(sizeof(DirectionalLight2) == _ANKI_SIZEOF_DirectionalLight2);
+const U32 _ANKI_SIZEOF_DirectionalLight = 12u * ANKI_SIZEOF(U32) + MAX_SHADOW_CASCADES2 * ANKI_SIZEOF(Mat4);
+ANKI_SHADER_STATIC_ASSERT(sizeof(DirectionalLight) == _ANKI_SIZEOF_DirectionalLight);
 
 /// Representation of a reflection probe.
-struct ReflectionProbe2
+struct ReflectionProbe
 {
 	Vec3 m_position; ///< Position of the probe in world space.
 	F32 m_cubemapIndex; ///< Index in the cubemap array texture.
 	Vec3 m_aabbMin;
 	Vec3 m_aabbMax;
 };
-const U32 _ANKI_SIZEOF_ReflectionProbe2 = 10u * ANKI_SIZEOF(U32);
-ANKI_SHADER_STATIC_ASSERT(sizeof(ReflectionProbe2) == _ANKI_SIZEOF_ReflectionProbe2);
+const U32 _ANKI_SIZEOF_ReflectionProbe = 10u * ANKI_SIZEOF(U32);
+ANKI_SHADER_STATIC_ASSERT(sizeof(ReflectionProbe) == _ANKI_SIZEOF_ReflectionProbe);
 
-/// Decal2.
-struct Decal2
+/// Decal.
+struct Decal
 {
 	Vec4 m_diffuseUv;
 	Vec4 m_normRoughnessUv;
@@ -119,22 +119,22 @@ struct Decal2
 	Vec3 m_obbExtend;
 	F32 m_padding;
 };
-const U32 _ANKI_SIZEOF_Decal2 = 4u * ANKI_SIZEOF(Vec4) + 2u * ANKI_SIZEOF(Mat4);
-ANKI_SHADER_STATIC_ASSERT(sizeof(Decal2) == _ANKI_SIZEOF_Decal2);
+const U32 _ANKI_SIZEOF_Decal = 4u * ANKI_SIZEOF(Vec4) + 2u * ANKI_SIZEOF(Mat4);
+ANKI_SHADER_STATIC_ASSERT(sizeof(Decal) == _ANKI_SIZEOF_Decal);
 
 /// Fog density volume.
-struct FogDensityVolume2
+struct FogDensityVolume
 {
 	Vec3 m_aabbMinOrSphereCenter;
 	U32 m_isBox;
 	Vec3 m_aabbMaxOrSphereRadiusSquared;
 	F32 m_density;
 };
-const U32 _ANKI_SIZEOF_FogDensityVolume2 = 2u * ANKI_SIZEOF(Vec4);
-ANKI_SHADER_STATIC_ASSERT(sizeof(FogDensityVolume2) == _ANKI_SIZEOF_FogDensityVolume2);
+const U32 _ANKI_SIZEOF_FogDensityVolume = 2u * ANKI_SIZEOF(Vec4);
+ANKI_SHADER_STATIC_ASSERT(sizeof(FogDensityVolume) == _ANKI_SIZEOF_FogDensityVolume);
 
 /// Global illumination probe
-struct GlobalIlluminationProbe2
+struct GlobalIlluminationProbe
 {
 	Vec3 m_aabbMin;
 	Vec3 m_aabbMax;
@@ -145,8 +145,8 @@ struct GlobalIlluminationProbe2
 	/// Used to calculate a factor that is zero when fragPos is close to AABB bounds and 1.0 at fadeDistance and less.
 	F32 m_fadeDistance;
 };
-const U32 _ANKI_SIZEOF_GlobalIlluminationProbe2 = 9u * ANKI_SIZEOF(U32);
-ANKI_SHADER_STATIC_ASSERT(sizeof(GlobalIlluminationProbe2) == _ANKI_SIZEOF_GlobalIlluminationProbe2);
+const U32 _ANKI_SIZEOF_GlobalIlluminationProbe = 9u * ANKI_SIZEOF(U32);
+ANKI_SHADER_STATIC_ASSERT(sizeof(GlobalIlluminationProbe) == _ANKI_SIZEOF_GlobalIlluminationProbe);
 
 /// Common matrices.
 struct CommonMatrices
@@ -198,10 +198,10 @@ struct ClusteredShadingUniforms
 	CommonMatrices m_matrices;
 	CommonMatrices m_previousMatrices;
 
-	DirectionalLight2 m_directionalLight;
+	DirectionalLight m_directionalLight;
 };
 const U32 _ANKI_SIZEOF_ClusteredShadingUniforms =
-	28u * ANKI_SIZEOF(U32) + 2u * ANKI_SIZEOF(CommonMatrices) + ANKI_SIZEOF(DirectionalLight2);
+	28u * ANKI_SIZEOF(U32) + 2u * ANKI_SIZEOF(CommonMatrices) + ANKI_SIZEOF(DirectionalLight);
 ANKI_SHADER_STATIC_ASSERT(sizeof(ClusteredShadingUniforms) == _ANKI_SIZEOF_ClusteredShadingUniforms);
 
 /// Information that a tile or a Z-split will contain.

+ 1 - 1
AnKi/Shaders/IrradianceDice.ankiprog

@@ -14,7 +14,7 @@
 
 #include <AnKi/Shaders/Functions.glsl>
 #include <AnKi/Shaders/Pack.glsl>
-#include <AnKi/Shaders/LightFunctions2.glsl>
+#include <AnKi/Shaders/LightFunctions.glsl>
 
 #define DEBUG_MODE 0 // 0: disable, 1: different color per dice face, 2: different color per cell
 

+ 6 - 7
AnKi/Shaders/LightFunctions2.glsl → AnKi/Shaders/LightFunctions.glsl

@@ -10,7 +10,7 @@
 #include <AnKi/Shaders/Functions.glsl>
 #include <AnKi/Shaders/CollisionFunctions.glsl>
 #include <AnKi/Shaders/Pack.glsl>
-#include <AnKi/Shaders/Include/ClusteredShadingTypes2.h>
+#include <AnKi/Shaders/Include/ClusteredShadingTypes.h>
 #include <AnKi/Shaders/Include/Evsm.h>
 
 // Do some EVSM magic with depth
@@ -162,7 +162,7 @@ U32 computeShadowSampleCount(const U32 COUNT, F32 zVSpace)
 	return sampleCount;
 }
 
-F32 computeShadowFactorSpotLight(SpotLight2 light, Vec3 worldPos, texture2D spotMap, sampler spotMapSampler)
+F32 computeShadowFactorSpotLight(SpotLight light, Vec3 worldPos, texture2D spotMap, sampler spotMapSampler)
 {
 	const Vec4 texCoords4 = light.m_textureMatrix * Vec4(worldPos, 1.0);
 	const Vec3 texCoords3 = texCoords4.xyz / texCoords4.w;
@@ -173,7 +173,7 @@ F32 computeShadowFactorSpotLight(SpotLight2 light, Vec3 worldPos, texture2D spot
 }
 
 // Compute the shadow factor of point (omni) lights.
-F32 computeShadowFactorPointLight(PointLight2 light, Vec3 frag2Light, texture2D shadowMap, sampler shadowMapSampler)
+F32 computeShadowFactorPointLight(PointLight light, Vec3 frag2Light, texture2D shadowMap, sampler shadowMapSampler)
 {
 	const Vec3 dir = -frag2Light;
 	const Vec3 dirabs = abs(dir);
@@ -214,7 +214,7 @@ F32 computeShadowFactorPointLight(PointLight2 light, Vec3 frag2Light, texture2D
 }
 
 // Compute the shadow factor of a directional light
-F32 computeShadowFactorDirLight(DirectionalLight2 light, U32 cascadeIdx, Vec3 worldPos, texture2D shadowMap,
+F32 computeShadowFactorDirLight(DirectionalLight light, U32 cascadeIdx, Vec3 worldPos, texture2D shadowMap,
 								sampler shadowMapSampler)
 {
 #define ANKI_FAST_CASCADES_WORKAROUND 1 // Doesn't make sense but it's super fast
@@ -343,9 +343,8 @@ Vec3 sampleAmbientDice(Vec3 posx, Vec3 negx, Vec3 posy, Vec3 negy, Vec3 posz, Ve
 }
 
 // Sample the irradiance term from the clipmap
-Vec3 sampleGlobalIllumination(const Vec3 worldPos, const Vec3 normal, const GlobalIlluminationProbe2 probe,
-							  texture3D textures[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES2],
-							  sampler linearAnyClampSampler)
+Vec3 sampleGlobalIllumination(const Vec3 worldPos, const Vec3 normal, const GlobalIlluminationProbe probe,
+							  texture3D textures[MAX_VISIBLE_GLOBAL_ILLUMINATION_PROBES], sampler linearAnyClampSampler)
 {
 	// Find the UVW
 	Vec3 uvw = (worldPos - probe.m_aabbMin) / (probe.m_aabbMax - probe.m_aabbMin);

+ 8 - 8
AnKi/Shaders/LightShading.ankiprog

@@ -25,7 +25,7 @@ ANKI_SPECIALIZATION_CONSTANT_U32(IR_MIPMAP_COUNT, 4);
 #define CLUSTERED_SHADING_REFLECTIONS_BINDING 4
 #define CLUSTERED_SHADING_GI_BINDING 7
 #define CLUSTERED_SHADING_CLUSTERS_BINDING 9
-#include <AnKi/Shaders/ClusteredShadingCommon2.glsl>
+#include <AnKi/Shaders/ClusteredShadingCommon.glsl>
 
 layout(set = 0, binding = 10) uniform sampler u_nearestAnyClampSampler;
 layout(set = 0, binding = 11) uniform sampler u_trilinearClampSampler;
@@ -100,7 +100,7 @@ void main()
 
 	// Dir light
 	const Vec3 viewDir = normalize(u_clusteredShading.m_cameraPosition - worldPos);
-	const DirectionalLight2 dirLight = u_clusteredShading.m_directionalLight;
+	const DirectionalLight dirLight = u_clusteredShading.m_directionalLight;
 	if(dirLight.m_active != 0u)
 	{
 		F32 shadowFactor;
@@ -133,7 +133,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_pointLightsMask);
 		cluster.m_pointLightsMask &= ~(1ul << U64(idx));
-		const PointLight2 light = u_pointLights2[idx];
+		const PointLight light = u_pointLights2[idx];
 
 		LIGHTING_COMMON_BRDF();
 
@@ -155,7 +155,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_spotLightsMask);
 		cluster.m_spotLightsMask &= ~(1ul << U64(idx));
-		const SpotLight2 light = u_spotLights2[idx];
+		const SpotLight light = u_spotLights2[idx];
 
 		LIGHTING_COMMON_BRDF();
 
@@ -186,7 +186,7 @@ void main()
 		{
 			// Only one probe, do a fast path without blend weight
 
-			const ReflectionProbe2 probe = u_reflectionProbes2[findLSB(cluster.m_reflectionProbesMask)];
+			const ReflectionProbe probe = u_reflectionProbes2[findLSB(cluster.m_reflectionProbesMask)];
 
 			// Sample
 			const Vec3 cubeUv = intersectProbe(worldPos, reflDir, probe.m_aabbMin, probe.m_aabbMax, probe.m_position);
@@ -204,7 +204,7 @@ void main()
 			{
 				const U32 idx = U32(findLSB(cluster.m_reflectionProbesMask));
 				cluster.m_reflectionProbesMask &= ~(1u << idx);
-				const ReflectionProbe2 probe = u_reflectionProbes2[idx];
+				const ReflectionProbe probe = u_reflectionProbes2[idx];
 
 				// Compute blend weight
 				const F32 blendWeight = computeProbeBlendWeight(worldPos, probe.m_aabbMin, probe.m_aabbMax, 0.2);
@@ -244,7 +244,7 @@ void main()
 		{
 			// All subgroups point to the same probe and there is only one probe, do a fast path without blend weight
 
-			const GlobalIlluminationProbe2 probe = u_giProbes[findLSB(cluster.m_giProbesMask)];
+			const GlobalIlluminationProbe probe = u_giProbes[findLSB(cluster.m_giProbesMask)];
 
 			// Sample
 			diffIndirect = sampleGlobalIllumination(worldPos, gbuffer.m_normal, probe, u_globalIlluminationTextures,
@@ -262,7 +262,7 @@ void main()
 			{
 				const U32 idx = U32(findLSB(cluster.m_giProbesMask));
 				cluster.m_giProbesMask &= ~(1u << idx);
-				const GlobalIlluminationProbe2 probe = u_giProbes[idx];
+				const GlobalIlluminationProbe probe = u_giProbes[idx];
 
 				// Compute blend weight
 				const F32 blendWeight =

+ 4 - 4
AnKi/Shaders/RtShadowsRayGen.ankiprog

@@ -17,7 +17,7 @@
 #define CLUSTERED_SHADING_UNIFORMS_BINDING 0
 #define CLUSTERED_SHADING_LIGHTS_BINDING 1
 #define CLUSTERED_SHADING_CLUSTERS_BINDING 4
-#include <AnKi/Shaders/ClusteredShadingCommon2.glsl>
+#include <AnKi/Shaders/ClusteredShadingCommon.glsl>
 
 // Used by the hit shaders. When changing the binding you need to update other shaders
 layout(set = 0, binding = 5) uniform sampler u_trilinearRepeatSampler;
@@ -109,7 +109,7 @@ void main()
 	}
 
 	// Dir light
-	const DirectionalLight2 dirLight = u_clusteredShading.m_directionalLight;
+	const DirectionalLight dirLight = u_clusteredShading.m_directionalLight;
 	ANKI_BRANCH if(dirLight.m_active != 0u && dirLight.m_cascadeCount > 0)
 	{
 		for(U32 i = 0; i < RAYS_PER_PIXEL; ++i)
@@ -130,7 +130,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_pointLightsMask);
 		cluster.m_pointLightsMask &= ~(1ul << U64(idx));
-		const PointLight2 light = u_pointLights2[idx];
+		const PointLight light = u_pointLights2[idx];
 
 		ANKI_BRANCH if(light.m_shadowAtlasTileScale >= 0.0)
 		{
@@ -157,7 +157,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_spotLightsMask);
 		cluster.m_spotLightsMask &= ~(1ul << U64(idx));
-		const SpotLight2 light = u_spotLights2[idx];
+		const SpotLight light = u_spotLights2[idx];
 
 		ANKI_BRANCH if(light.m_shadowLayer != MAX_U32)
 		{

+ 4 - 4
AnKi/Shaders/ShadowmapsResolve.ankiprog

@@ -14,7 +14,7 @@ ANKI_SPECIALIZATION_CONSTANT_U32(TILE_SIZE, 5);
 #define CLUSTERED_SHADING_UNIFORMS_BINDING 0
 #define CLUSTERED_SHADING_LIGHTS_BINDING 1
 #define CLUSTERED_SHADING_CLUSTERS_BINDING 4
-#include <AnKi/Shaders/ClusteredShadingCommon2.glsl>
+#include <AnKi/Shaders/ClusteredShadingCommon.glsl>
 
 const UVec2 WORKGROUP_SIZE = UVec2(8, 8);
 layout(local_size_x = WORKGROUP_SIZE.x, local_size_y = WORKGROUP_SIZE.y, local_size_z = 1) in;
@@ -48,7 +48,7 @@ void main()
 	F32 shadowFactors[maxShadowCastersPerFragment] = F32[](0.0, 0.0, 0.0, 0.0);
 
 	// Dir light
-	const DirectionalLight2 dirLight = u_clusteredShading.m_directionalLight;
+	const DirectionalLight dirLight = u_clusteredShading.m_directionalLight;
 	if(dirLight.m_active != 0u && dirLight.m_cascadeCount > 0)
 	{
 		const F32 positiveZViewSpace =
@@ -83,7 +83,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_pointLightsMask);
 		cluster.m_pointLightsMask &= ~(1ul << U64(idx));
-		const PointLight2 light = u_pointLights2[idx];
+		const PointLight light = u_pointLights2[idx];
 
 		ANKI_BRANCH if(light.m_shadowAtlasTileScale >= 0.0)
 		{
@@ -100,7 +100,7 @@ void main()
 	{
 		const I32 idx = findLSB64(cluster.m_spotLightsMask);
 		cluster.m_spotLightsMask &= ~(1ul << U64(idx));
-		const SpotLight2 light = u_spotLights2[idx];
+		const SpotLight light = u_spotLights2[idx];
 
 		ANKI_BRANCH if(light.m_shadowLayer != MAX_U32)
 		{

+ 1 - 1
AnKi/Shaders/TraditionalDeferredShading.ankiprog

@@ -46,7 +46,7 @@ void main()
 // FRAG
 #pragma anki start frag
 #include <AnKi/Shaders/Pack.glsl>
-#include <AnKi/Shaders/LightFunctions2.glsl>
+#include <AnKi/Shaders/LightFunctions.glsl>
 #include <AnKi/Shaders/Include/TraditionalDeferredShadingTypes.h>
 
 layout(location = 0) out Vec3 out_color;

+ 7 - 7
AnKi/Shaders/VolumetricLightingAccumulation.ankiprog

@@ -32,7 +32,7 @@ layout(set = 0, binding = 4) uniform texture3D u_prevVolume;
 #define CLUSTERED_SHADING_GI_BINDING 9
 #define CLUSTERED_SHADING_FOG_BINDING 11
 #define CLUSTERED_SHADING_CLUSTERS_BINDING 12
-#include <AnKi/Shaders/ClusteredShadingCommon2.glsl>
+#include <AnKi/Shaders/ClusteredShadingCommon.glsl>
 
 Vec3 g_globalInvocationID = Vec3(gl_GlobalInvocationID);
 
@@ -99,7 +99,7 @@ Vec4 accumulateLightsAndFog(Cluster cluster, Vec3 worldPos, F32 negativeZViewSpa
 	const Vec3 viewDir = normalize(u_clusteredShading.m_cameraPosition - worldPos);
 
 	// Dir light
-	const DirectionalLight2 dirLight = u_clusteredShading.m_directionalLight;
+	const DirectionalLight dirLight = u_clusteredShading.m_directionalLight;
 	if(dirLight.m_active != 0u)
 	{
 		F32 factor = phaseFunction(viewDir, dirLight.m_direction, PHASE_FUNCTION_ANISOTROPY);
@@ -124,7 +124,7 @@ Vec4 accumulateLightsAndFog(Cluster cluster, Vec3 worldPos, F32 negativeZViewSpa
 	{
 		const I32 idx = findLSB64(cluster.m_pointLightsMask);
 		cluster.m_pointLightsMask &= ~(1ul << U64(idx));
-		const PointLight2 light = u_pointLights2[idx];
+		const PointLight light = u_pointLights2[idx];
 
 		const Vec3 frag2Light = light.m_position - worldPos;
 		F32 factor = computeAttenuationFactor(light.m_squareRadiusOverOne, frag2Light);
@@ -146,7 +146,7 @@ Vec4 accumulateLightsAndFog(Cluster cluster, Vec3 worldPos, F32 negativeZViewSpa
 	{
 		const I32 idx = findLSB64(cluster.m_spotLightsMask);
 		cluster.m_spotLightsMask &= ~(1ul << U64(idx));
-		const SpotLight2 light = u_spotLights2[idx];
+		const SpotLight light = u_spotLights2[idx];
 
 		const Vec3 frag2Light = light.m_position - worldPos;
 		F32 factor = computeAttenuationFactor(light.m_squareRadiusOverOne, frag2Light);
@@ -175,7 +175,7 @@ Vec4 accumulateLightsAndFog(Cluster cluster, Vec3 worldPos, F32 negativeZViewSpa
 		{
 			// Only one probe, do a fast path without blend weight
 
-			const GlobalIlluminationProbe2 probe = u_giProbes[findLSB(cluster.m_giProbesMask)];
+			const GlobalIlluminationProbe probe = u_giProbes[findLSB(cluster.m_giProbesMask)];
 
 			// Sample
 			diffIndirect = sampleGlobalIllumination(worldPos, viewDir, probe, u_globalIlluminationTextures,
@@ -193,7 +193,7 @@ Vec4 accumulateLightsAndFog(Cluster cluster, Vec3 worldPos, F32 negativeZViewSpa
 			{
 				const U32 idx = U32(findLSB(cluster.m_giProbesMask));
 				cluster.m_giProbesMask &= ~(1u << idx);
-				const GlobalIlluminationProbe2 probe = u_giProbes[idx];
+				const GlobalIlluminationProbe probe = u_giProbes[idx];
 
 				// Compute blend weight
 				const F32 blendWeight =
@@ -222,7 +222,7 @@ Vec4 accumulateLightsAndFog(Cluster cluster, Vec3 worldPos, F32 negativeZViewSpa
 		{
 			const U32 idx = U32(findLSB(cluster.m_fogDensityVolumesMask));
 			cluster.m_fogDensityVolumesMask &= ~(1u << idx);
-			const FogDensityVolume2 vol = u_fogDensityVolumes[idx];
+			const FogDensityVolume vol = u_fogDensityVolumes[idx];
 
 			F32 factor;
 			ANKI_BRANCH if(vol.m_isBox == 1u)