From 88be599c2e04e8ef83dc23b91f2c0c4e66c5ff59 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 1 May 2023 13:53:25 -0700 Subject: [PATCH] Use width instead of heigh --- libs/ibl/src/CubemapIBL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ibl/src/CubemapIBL.cpp b/libs/ibl/src/CubemapIBL.cpp index f6ce8ab269..ecde2fafe3 100644 --- a/libs/ibl/src/CubemapIBL.cpp +++ b/libs/ibl/src/CubemapIBL.cpp @@ -1022,7 +1022,7 @@ void CubemapIBL::DFG(JobSystem& js, Image& dst, bool multiscatter, bool cloth) { // here we're using ^2, but other mappings are possible. // ==> coord = sqrt(linear_roughness) const float linear_roughness = coord * coord; - for (size_t x = 0; x < height; x++, data++) { + for (size_t x = 0; x < width; x++, data++) { // const float NoV = float(x) / (width-1); const float NoV = saturate((x + 0.5f) / width); float3 r = { dfvFunction(NoV, linear_roughness, 1024), 0 };