From 56d254b5a1af054d9cd3e7a7805c607fe97483dd Mon Sep 17 00:00:00 2001 From: Ryan Russell Date: Thu, 16 Mar 2023 17:00:36 -0400 Subject: [PATCH] chore(tests): ashikhmin-shirley readability fixups Signed-off-by: Ryan Russell --- tests/lib/rendering/pbr/BsdfFactory.h | 12 ++++++------ tests/lib/rendering/pbr/BsdfFactory.ispc | 4 ++-- tests/lib/rendering/pbr/TestBsdfOneSampler.cc | 14 +++++++------- tests/lib/rendering/pbr/TestBsdfOneSampler.h | 8 ++++---- tests/lib/rendering/pbr/TestBsdfOneSamplerv.cc | 14 +++++++------- tests/lib/rendering/pbr/TestBsdfOneSamplerv.h | 8 ++++---- tests/lib/rendering/pbr/TestBsdfSampler.cc | 12 ++++++------ tests/lib/rendering/pbr/TestBsdfSampler.h | 8 ++++---- tests/lib/rendering/pbr/TestBsdfv.cc | 12 ++++++------ tests/lib/rendering/pbr/TestBsdfv.h | 8 ++++---- 10 files changed, 50 insertions(+), 50 deletions(-) diff --git a/tests/lib/rendering/pbr/BsdfFactory.h b/tests/lib/rendering/pbr/BsdfFactory.h index b8aab255..cd29825f 100644 --- a/tests/lib/rendering/pbr/BsdfFactory.h +++ b/tests/lib/rendering/pbr/BsdfFactory.h @@ -341,9 +341,9 @@ class KajiyaKayFabricBsdfFactory : public BsdfFactory { //---------------------------------------------------------------------------- -class AshikminhShirleyBsdfFactory : public BsdfFactory { +class AshikhminShirleyBsdfFactory : public BsdfFactory { public: - AshikminhShirleyBsdfFactory(float roughness) : mRoughness(roughness) {} + AshikhminShirleyBsdfFactory(float roughness) : mRoughness(roughness) {} shading::Bsdf *operator()(scene_rdl2::alloc::Arena& arena, const scene_rdl2::math::ReferenceFrame &frame) const { shading::Bsdf *bsdf = arena.allocWithCtor(); @@ -357,7 +357,7 @@ class AshikminhShirleyBsdfFactory : public BsdfFactory { shading::Bsdfv *getBsdfv(scene_rdl2::alloc::Arena& arena, const scene_rdl2::math::ReferenceFrame &frame) const { shading::Bsdfv *bsdfv = - ispc::AshikminhShirleyBsdfFactory(ispcArena(arena), ispcFrame(frame), mRoughness); + ispc::AshikhminShirleyBsdfFactory(ispcArena(arena), ispcFrame(frame), mRoughness); return bsdfv; } @@ -366,9 +366,9 @@ class AshikminhShirleyBsdfFactory : public BsdfFactory { }; -class AshikminhShirleyFullBsdfFactory : public BsdfFactory { +class AshikhminShirleyFullBsdfFactory : public BsdfFactory { public: - AshikminhShirleyFullBsdfFactory(float roughness) : mRoughness(roughness) {} + AshikhminShirleyFullBsdfFactory(float roughness) : mRoughness(roughness) {} shading::Bsdf *operator()(scene_rdl2::alloc::Arena& arena, const scene_rdl2::math::ReferenceFrame &frame) const { shading::Bsdf *bsdf = arena.allocWithCtor(); @@ -386,7 +386,7 @@ class AshikminhShirleyFullBsdfFactory : public BsdfFactory { shading::Bsdfv *getBsdfv(scene_rdl2::alloc::Arena& arena, const scene_rdl2::math::ReferenceFrame &frame) const { shading::Bsdfv *bsdfv = - ispc::AshikminhShirleyFullBsdfFactory(ispcArena(arena), ispcFrame(frame), mRoughness); + ispc::AshikhminShirleyFullBsdfFactory(ispcArena(arena), ispcFrame(frame), mRoughness); return bsdfv; } private: diff --git a/tests/lib/rendering/pbr/BsdfFactory.ispc b/tests/lib/rendering/pbr/BsdfFactory.ispc index 83b449b7..8ae13228 100644 --- a/tests/lib/rendering/pbr/BsdfFactory.ispc +++ b/tests/lib/rendering/pbr/BsdfFactory.ispc @@ -293,7 +293,7 @@ FabricBsdfFactory(uniform Arena * uniform arena, #pragma ignore warning(all) export varying Bsdf * uniform -AshikminhShirleyBsdfFactory(uniform Arena * uniform arena, +AshikhminShirleyBsdfFactory(uniform Arena * uniform arena, const uniform ReferenceFrame * uniform frame, uniform float roughness) { @@ -316,7 +316,7 @@ AshikminhShirleyBsdfFactory(uniform Arena * uniform arena, #pragma ignore warning(all) export varying Bsdf * uniform -AshikminhShirleyFullBsdfFactory(uniform Arena * uniform arena, +AshikhminShirleyFullBsdfFactory(uniform Arena * uniform arena, const uniform ReferenceFrame * uniform frame, uniform float roughness) { diff --git a/tests/lib/rendering/pbr/TestBsdfOneSampler.cc b/tests/lib/rendering/pbr/TestBsdfOneSampler.cc index bd98613d..ce3e0852 100755 --- a/tests/lib/rendering/pbr/TestBsdfOneSampler.cc +++ b/tests/lib/rendering/pbr/TestBsdfOneSampler.cc @@ -285,15 +285,15 @@ TestBsdfOneSampler::testKajiyaKayFabric() //---------------------------------------------------------------------------- void -TestBsdfOneSampler::testAshikminhShirley() +TestBsdfOneSampler::testAshikhminShirley() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfOneSampler::testAshikminhShirley() ####################"); + printInfo("##### TestBsdfOneSampler::testAshikhminShirley() ####################"); for (int i=0; i < sRoughnessCount; i++) { printInfo("===== Roughness: %f ====================", sRoughness[i]); - AshikminhShirleyBsdfFactory factory(sRoughness[i]); + AshikhminShirleyBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.03, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDF_ONE_SAMPLER); @@ -303,16 +303,16 @@ TestBsdfOneSampler::testAshikminhShirley() void -TestBsdfOneSampler::testAshikminhShirleyFull() +TestBsdfOneSampler::testAshikhminShirleyFull() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfOneSampler::testAshikminhShirleyFull() ####################"); + printInfo("##### TestBsdfOneSampler::testAshikhminShirleyFull() ####################"); for (int i=0; i < sRoughnessCount; i++) { // TODO: There is a heisenbug in here where the consistency check fails // with small roughnesses. It stops failing when trying to debug (?!?) - // Since we don't really use AshikminhShirley I am skipping this + // Since we don't really use AshikhminShirley I am skipping this // here for now if (sRoughness[i] < 0.3f) { continue; @@ -323,7 +323,7 @@ TestBsdfOneSampler::testAshikminhShirleyFull() int sampleCount = getSampleCount(sRoughness[i]) + getSampleCount(sRoughness[sRoughnessCount - 1]); - AshikminhShirleyFullBsdfFactory factory(sRoughness[i]); + AshikhminShirleyFullBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.02, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDF_ONE_SAMPLER); diff --git a/tests/lib/rendering/pbr/TestBsdfOneSampler.h b/tests/lib/rendering/pbr/TestBsdfOneSampler.h index e51e8728..93d6dda8 100644 --- a/tests/lib/rendering/pbr/TestBsdfOneSampler.h +++ b/tests/lib/rendering/pbr/TestBsdfOneSampler.h @@ -48,8 +48,8 @@ class TestBsdfOneSampler : public CppUnit::TestFixture CPPUNIT_TEST(testDwaFabric); CPPUNIT_TEST(testKajiyaKayFabric); - CPPUNIT_TEST(testAshikminhShirley); - //CPPUNIT_TEST(testAshikminhShirleyFull); + CPPUNIT_TEST(testAshikhminShirley); + //CPPUNIT_TEST(testAshikhminShirleyFull); CPPUNIT_TEST(testWardCorrected); CPPUNIT_TEST(testWardDuer); @@ -81,8 +81,8 @@ class TestBsdfOneSampler : public CppUnit::TestFixture void testDwaFabric(); void testKajiyaKayFabric(); - void testAshikminhShirley(); - void testAshikminhShirleyFull(); + void testAshikhminShirley(); + void testAshikhminShirleyFull(); void testWardCorrected(); void testWardDuer(); diff --git a/tests/lib/rendering/pbr/TestBsdfOneSamplerv.cc b/tests/lib/rendering/pbr/TestBsdfOneSamplerv.cc index b873bbaf..3f5aeceb 100755 --- a/tests/lib/rendering/pbr/TestBsdfOneSamplerv.cc +++ b/tests/lib/rendering/pbr/TestBsdfOneSamplerv.cc @@ -290,15 +290,15 @@ TestBsdfOneSamplerv::testKajiyaKayFabric() //---------------------------------------------------------------------------- void -TestBsdfOneSamplerv::testAshikminhShirley() +TestBsdfOneSamplerv::testAshikhminShirley() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfOneSamplerv::testAshikminhShirley() ####################"); + printInfo("##### TestBsdfOneSamplerv::testAshikhminShirley() ####################"); for (int i=0; i < sRoughnessCount; i++) { printInfo("===== Roughness: %f ====================", sRoughness[i]); - AshikminhShirleyBsdfFactory factory(sRoughness[i]); + AshikhminShirleyBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.03, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDF_ONE_SAMPLERV); @@ -308,16 +308,16 @@ TestBsdfOneSamplerv::testAshikminhShirley() void -TestBsdfOneSamplerv::testAshikminhShirleyFull() +TestBsdfOneSamplerv::testAshikhminShirleyFull() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfOneSamplerv::testAshikminhShirleyFull() ####################"); + printInfo("##### TestBsdfOneSamplerv::testAshikhminShirleyFull() ####################"); for (int i=0; i < sRoughnessCount; i++) { // TODO: There is a heisenbug in here where the consistency check fails // with small roughnesses. It stops failing when trying to debug (?!?) - // Since we don't really use AshikminhShirley I am skipping this + // Since we don't really use AshikhminShirley I am skipping this // here for now if (sRoughness[i] < 0.3f) { continue; @@ -328,7 +328,7 @@ TestBsdfOneSamplerv::testAshikminhShirleyFull() int sampleCount = getSampleCount(sRoughness[i]) + getSampleCount(sRoughness[sRoughnessCount - 1]); - AshikminhShirleyFullBsdfFactory factory(sRoughness[i]); + AshikhminShirleyFullBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.02, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDF_ONE_SAMPLERV); diff --git a/tests/lib/rendering/pbr/TestBsdfOneSamplerv.h b/tests/lib/rendering/pbr/TestBsdfOneSamplerv.h index c1e92667..7a503873 100644 --- a/tests/lib/rendering/pbr/TestBsdfOneSamplerv.h +++ b/tests/lib/rendering/pbr/TestBsdfOneSamplerv.h @@ -37,8 +37,8 @@ class TestBsdfOneSamplerv : public CppUnit::TestFixture CPPUNIT_TEST(testDwaFabric); CPPUNIT_TEST(testKajiyaKayFabric); - CPPUNIT_TEST(testAshikminhShirley); - //CPPUNIT_TEST(testAshikminhShirleyFull); + CPPUNIT_TEST(testAshikhminShirley); + //CPPUNIT_TEST(testAshikhminShirleyFull); CPPUNIT_TEST(testWardCorrected); CPPUNIT_TEST(testWardDuer); @@ -68,8 +68,8 @@ class TestBsdfOneSamplerv : public CppUnit::TestFixture void testDwaFabric(); void testKajiyaKayFabric(); - void testAshikminhShirley(); - void testAshikminhShirleyFull(); + void testAshikhminShirley(); + void testAshikhminShirleyFull(); void testWardCorrected(); void testWardDuer(); diff --git a/tests/lib/rendering/pbr/TestBsdfSampler.cc b/tests/lib/rendering/pbr/TestBsdfSampler.cc index db1eb814..e693adcb 100755 --- a/tests/lib/rendering/pbr/TestBsdfSampler.cc +++ b/tests/lib/rendering/pbr/TestBsdfSampler.cc @@ -302,15 +302,15 @@ TestBsdfSampler::testKajiyaKayFabric() //---------------------------------------------------------------------------- void -TestBsdfSampler::testAshikminhShirley() +TestBsdfSampler::testAshikhminShirley() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfSampler::testAshikminhShirley() ####################"); + printInfo("##### TestBsdfSampler::testAshikhminShirley() ####################"); for (int i=0; i < sRoughnessCount; i++) { printInfo("===== Roughness: %f ====================", sRoughness[i]); - AshikminhShirleyBsdfFactory factory(sRoughness[i]); + AshikhminShirleyBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.02, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDF_SAMPLER); runTest(test, sViewAnglesTheta, 1, getSampleCount(sRoughness[i])); @@ -319,18 +319,18 @@ TestBsdfSampler::testAshikminhShirley() void -TestBsdfSampler::testAshikminhShirleyFull() +TestBsdfSampler::testAshikhminShirleyFull() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfSampler::testAshikminhShirleyFull() ####################"); + printInfo("##### TestBsdfSampler::testAshikhminShirleyFull() ####################"); for (int i=0; i < sRoughnessCount; i++) { printInfo("===== Roughness: %f ====================", sRoughness[i]); int sampleCount = getSampleCount(sRoughness[i]) + getSampleCount(sRoughness[sRoughnessCount - 1]); - AshikminhShirleyFullBsdfFactory factory(sRoughness[i]); + AshikhminShirleyFullBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.02, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDF_SAMPLER); diff --git a/tests/lib/rendering/pbr/TestBsdfSampler.h b/tests/lib/rendering/pbr/TestBsdfSampler.h index c24554c8..c560ea99 100644 --- a/tests/lib/rendering/pbr/TestBsdfSampler.h +++ b/tests/lib/rendering/pbr/TestBsdfSampler.h @@ -48,8 +48,8 @@ class TestBsdfSampler : public CppUnit::TestFixture CPPUNIT_TEST(testDwaFabric); CPPUNIT_TEST(testKajiyaKayFabric); - CPPUNIT_TEST(testAshikminhShirley); - //CPPUNIT_TEST(testAshikminhShirleyFull); + CPPUNIT_TEST(testAshikhminShirley); + //CPPUNIT_TEST(testAshikhminShirleyFull); CPPUNIT_TEST(testWardCorrected); CPPUNIT_TEST(testWardDuer); @@ -84,8 +84,8 @@ class TestBsdfSampler : public CppUnit::TestFixture void testDwaFabric(); void testKajiyaKayFabric(); - void testAshikminhShirley(); - void testAshikminhShirleyFull(); + void testAshikhminShirley(); + void testAshikhminShirleyFull(); void testWardCorrected(); void testWardDuer(); diff --git a/tests/lib/rendering/pbr/TestBsdfv.cc b/tests/lib/rendering/pbr/TestBsdfv.cc index 56349efb..0a91f1aa 100755 --- a/tests/lib/rendering/pbr/TestBsdfv.cc +++ b/tests/lib/rendering/pbr/TestBsdfv.cc @@ -302,15 +302,15 @@ TestBsdfv::testKajiyaKayFabric() //---------------------------------------------------------------------------- void -TestBsdfv::testAshikminhShirley() +TestBsdfv::testAshikhminShirley() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfv::testAshikminhShirley() ####################"); + printInfo("##### TestBsdfv::testAshikhminShirley() ####################"); for (int i=0; i < sRoughnessCount; i++) { printInfo("===== Roughness: %f ====================", sRoughness[i]); - AshikminhShirleyBsdfFactory factory(sRoughness[i]); + AshikhminShirleyBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.03, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDFV); runTest(test, sViewAnglesTheta, 1, getSampleCount(sRoughness[i])); @@ -319,18 +319,18 @@ TestBsdfv::testAshikminhShirley() void -TestBsdfv::testAshikminhShirleyFull() +TestBsdfv::testAshikhminShirleyFull() { scene_rdl2::math::ReferenceFrame frame; - printInfo("##### TestBsdfv::testAshikminhShirleyFull() ####################"); + printInfo("##### TestBsdfv::testAshikhminShirleyFull() ####################"); for (int i=0; i < sRoughnessCount; i++) { printInfo("===== Roughness: %f ====================", sRoughness[i]); int sampleCount = getSampleCount(sRoughness[i]) + getSampleCount(sRoughness[sRoughnessCount - 1]); - AshikminhShirleyFullBsdfFactory factory(sRoughness[i]); + AshikhminShirleyFullBsdfFactory factory(sRoughness[i]); TestBsdfSettings test(factory, frame, true, 0.008, 0.02, (sRoughness[i] > 0.1f), (sRoughness[i] > 0.1f), TestBsdfSettings::BSDFV); diff --git a/tests/lib/rendering/pbr/TestBsdfv.h b/tests/lib/rendering/pbr/TestBsdfv.h index ddc65615..a1c6e710 100644 --- a/tests/lib/rendering/pbr/TestBsdfv.h +++ b/tests/lib/rendering/pbr/TestBsdfv.h @@ -43,8 +43,8 @@ class TestBsdfv : public CppUnit::TestFixture CPPUNIT_TEST(testDwaFabric); CPPUNIT_TEST(testKajiyaKayFabric); - CPPUNIT_TEST(testAshikminhShirley); - CPPUNIT_TEST(testAshikminhShirleyFull); + CPPUNIT_TEST(testAshikhminShirley); + CPPUNIT_TEST(testAshikhminShirleyFull); CPPUNIT_TEST(testWardCorrected); CPPUNIT_TEST(testWardDuer); @@ -75,8 +75,8 @@ class TestBsdfv : public CppUnit::TestFixture void testDwaFabric(); void testKajiyaKayFabric(); - void testAshikminhShirley(); - void testAshikminhShirleyFull(); + void testAshikhminShirley(); + void testAshikhminShirleyFull(); void testWardCorrected(); void testWardDuer();