Browse Source

Minor renaming

Panagiotis Christopoulos Charitos 2 years ago
parent
commit
a7bd3dd2b7

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

@@ -128,7 +128,7 @@ Error GlobalIlluminationProbeComponent::update(SceneComponentUpdateInfo& info, B
 		gpuProbe.m_halfTexelSizeU = 1.0f / (F32(m_cellCounts.y()) * 6.0f) / 2.0f;
 		gpuProbe.m_halfTexelSizeU = 1.0f / (F32(m_cellCounts.y()) * 6.0f) / 2.0f;
 		gpuProbe.m_fadeDistance = m_fadeDistance;
 		gpuProbe.m_fadeDistance = m_fadeDistance;
 		gpuProbe.m_uuid = m_uuid;
 		gpuProbe.m_uuid = m_uuid;
-		gpuProbe.m_arrayIndex = getArrayIndex();
+		gpuProbe.m_componentArrayIndex = getArrayIndex();
 		m_gpuSceneProbe.uploadToGpuScene(gpuProbe);
 		m_gpuSceneProbe.uploadToGpuScene(gpuProbe);
 	}
 	}
 
 

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

@@ -106,7 +106,7 @@ Error LightComponent::update(SceneComponentUpdateInfo& info, Bool& updated)
 		gpuLight.m_visibleRenderablesHashIndex = (reallyShadow) ? m_hash.getIndex() : 0;
 		gpuLight.m_visibleRenderablesHashIndex = (reallyShadow) ? m_hash.getIndex() : 0;
 		gpuLight.m_flags = GpuSceneLightFlag::kPointLight;
 		gpuLight.m_flags = GpuSceneLightFlag::kPointLight;
 		gpuLight.m_flags |= (reallyShadow) ? GpuSceneLightFlag::kShadow : GpuSceneLightFlag::kNone;
 		gpuLight.m_flags |= (reallyShadow) ? GpuSceneLightFlag::kShadow : GpuSceneLightFlag::kNone;
-		gpuLight.m_arrayIndex = getArrayIndex();
+		gpuLight.m_componentArrayIndex = getArrayIndex();
 		gpuLight.m_uuid = m_uuid;
 		gpuLight.m_uuid = m_uuid;
 		for(U32 f = 0; f < m_shadowAtlasUvViewportCount; ++f)
 		for(U32 f = 0; f < m_shadowAtlasUvViewportCount; ++f)
 		{
 		{
@@ -155,7 +155,7 @@ Error LightComponent::update(SceneComponentUpdateInfo& info, Bool& updated)
 		gpuLight.m_visibleRenderablesHashIndex = (reallyShadow) ? m_hash.getIndex() : 0;
 		gpuLight.m_visibleRenderablesHashIndex = (reallyShadow) ? m_hash.getIndex() : 0;
 		gpuLight.m_flags = GpuSceneLightFlag::kSpotLight;
 		gpuLight.m_flags = GpuSceneLightFlag::kSpotLight;
 		gpuLight.m_flags |= (reallyShadow) ? GpuSceneLightFlag::kShadow : GpuSceneLightFlag::kNone;
 		gpuLight.m_flags |= (reallyShadow) ? GpuSceneLightFlag::kShadow : GpuSceneLightFlag::kNone;
-		gpuLight.m_arrayIndex = getArrayIndex();
+		gpuLight.m_componentArrayIndex = getArrayIndex();
 		gpuLight.m_uuid = m_uuid;
 		gpuLight.m_uuid = m_uuid;
 		gpuLight.m_innerCos = cos(m_spot.m_innerAngle / 2.0f);
 		gpuLight.m_innerCos = cos(m_spot.m_innerAngle / 2.0f);
 		gpuLight.m_direction = -m_worldTransform.getRotation().getZAxis();
 		gpuLight.m_direction = -m_worldTransform.getRotation().getZAxis();

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

@@ -72,7 +72,7 @@ Error ReflectionProbeComponent::update(SceneComponentUpdateInfo& info, Bool& upd
 		gpuProbe.m_aabbMax = aabbWorld.getMax().xyz();
 		gpuProbe.m_aabbMax = aabbWorld.getMax().xyz();
 
 
 		gpuProbe.m_uuid = m_uuid;
 		gpuProbe.m_uuid = m_uuid;
-		gpuProbe.m_arrayIndex = getArrayIndex();
+		gpuProbe.m_componentArrayIndex = getArrayIndex();
 		m_gpuSceneProbe.uploadToGpuScene(gpuProbe);
 		m_gpuSceneProbe.uploadToGpuScene(gpuProbe);
 	}
 	}
 
 

+ 1 - 1
AnKi/Shaders/GpuVisibilityNonRenderables.ankiprog

@@ -117,7 +117,7 @@ Vec4 getSphere(GpuSceneGlobalIlluminationProbe l)
 		InterlockedAdd(g_counterBuffer[kFeedbackCounterIdx], 1, idx);
 		InterlockedAdd(g_counterBuffer[kFeedbackCounterIdx], 1, idx);
 
 
 		g_cpuFeedbackBuffer[idx * 2 + 1] = g_objects[svDispatchThreadId].m_uuid;
 		g_cpuFeedbackBuffer[idx * 2 + 1] = g_objects[svDispatchThreadId].m_uuid;
-		g_cpuFeedbackBuffer[idx * 2 + 2] = g_objects[svDispatchThreadId].m_arrayIndex;
+		g_cpuFeedbackBuffer[idx * 2 + 2] = g_objects[svDispatchThreadId].m_componentArrayIndex;
 	}
 	}
 #endif
 #endif
 
 

+ 3 - 3
AnKi/Shaders/Include/GpuSceneTypes.h

@@ -97,7 +97,7 @@ struct GpuSceneLight
 	U32 m_visibleRenderablesHashIndex; ///< Points to a GpuSceneLightVisibleRenderablesHash
 	U32 m_visibleRenderablesHashIndex; ///< Points to a GpuSceneLightVisibleRenderablesHash
 
 
 	GpuSceneLightFlag m_flags;
 	GpuSceneLightFlag m_flags;
-	U32 m_arrayIndex; ///< Array index of the LightComponent in the CPU scene.
+	U32 m_componentArrayIndex; ///< Array index of the LightComponent in the CPU scene.
 	U32 m_uuid; ///< The UUID of that light. If it's zero the GPU will not inform the CPU about it.
 	U32 m_uuid; ///< The UUID of that light. If it's zero the GPU will not inform the CPU about it.
 	F32 m_innerCos; ///< Only for spot light.
 	F32 m_innerCos; ///< Only for spot light.
 
 
@@ -120,7 +120,7 @@ struct GpuSceneReflectionProbe
 	U32 m_uuid;
 	U32 m_uuid;
 
 
 	Vec3 m_aabbMax ANKI_CPP_CODE(= Vec3(kSomeFarDistance));
 	Vec3 m_aabbMax ANKI_CPP_CODE(= Vec3(kSomeFarDistance));
-	U32 m_arrayIndex; ///< Array in the CPU scene.
+	U32 m_componentArrayIndex; ///< Array in the CPU scene.
 };
 };
 constexpr U32 kSizeof_GpuSceneReflectionProbe = 3u * sizeof(Vec4);
 constexpr U32 kSizeof_GpuSceneReflectionProbe = 3u * sizeof(Vec4);
 static_assert(sizeof(GpuSceneReflectionProbe) == kSizeof_GpuSceneReflectionProbe);
 static_assert(sizeof(GpuSceneReflectionProbe) == kSizeof_GpuSceneReflectionProbe);
@@ -132,7 +132,7 @@ struct GpuSceneGlobalIlluminationProbe
 	U32 m_uuid;
 	U32 m_uuid;
 
 
 	Vec3 m_aabbMax ANKI_CPP_CODE(= Vec3(kSomeFarDistance));
 	Vec3 m_aabbMax ANKI_CPP_CODE(= Vec3(kSomeFarDistance));
-	U32 m_arrayIndex; ///< Array in the CPU scene.
+	U32 m_componentArrayIndex; ///< Array in the CPU scene.
 
 
 	U32 m_volumeTexture; ///< Bindless index of the irradiance volume texture.
 	U32 m_volumeTexture; ///< Bindless index of the irradiance volume texture.
 	F32 m_halfTexelSizeU; ///< (1.0 / textureSize(texArr[textureIndex]).x) / 2.0
 	F32 m_halfTexelSizeU; ///< (1.0 / textureSize(texArr[textureIndex]).x) / 2.0