Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): ashikhmin-shirley readability fixups #2

Open
wants to merge 1 commit into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/lib/rendering/pbr/BsdfFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<shading::Bsdf>();
Expand All @@ -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;
}
Expand All @@ -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<shading::Bsdf>();
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/rendering/pbr/BsdfFactory.ispc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
14 changes: 7 additions & 7 deletions tests/lib/rendering/pbr/TestBsdfOneSampler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/rendering/pbr/TestBsdfOneSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
14 changes: 7 additions & 7 deletions tests/lib/rendering/pbr/TestBsdfOneSamplerv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/rendering/pbr/TestBsdfOneSamplerv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions tests/lib/rendering/pbr/TestBsdfSampler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/rendering/pbr/TestBsdfSampler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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();
Expand Down
12 changes: 6 additions & 6 deletions tests/lib/rendering/pbr/TestBsdfv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/rendering/pbr/TestBsdfv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down