diff options
author | asuonpaa <34128694+asuonpaa@users.noreply.github.com> | 2022-04-21 11:17:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 09:17:13 +0100 |
commit | 8b145a6c89dcdb4ec28173339dd176fb7b6f43ed (patch) | |
tree | 21735414ff778e1426aa89f5efe557d13da15450 /src/amberscript/parser_sampler_test.cc | |
parent | 627ee453d6047ced0e2dd13cde983b341d0615e3 (diff) | |
download | amber-8b145a6c89dcdb4ec28173339dd176fb7b6f43ed.tar.gz |
Add depth compare support for samplers (#987)
Diffstat (limited to 'src/amberscript/parser_sampler_test.cc')
-rw-r--r-- | src/amberscript/parser_sampler_test.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/amberscript/parser_sampler_test.cc b/src/amberscript/parser_sampler_test.cc index 6cba69d..d4b0dd1 100644 --- a/src/amberscript/parser_sampler_test.cc +++ b/src/amberscript/parser_sampler_test.cc @@ -45,6 +45,8 @@ TEST_F(AmberScriptParserTest, SamplerDefaultValues) { EXPECT_EQ(0.0, sampler->GetMinLOD()); EXPECT_EQ(1.0, sampler->GetMaxLOD()); EXPECT_EQ(true, sampler->GetNormalizedCoords()); + EXPECT_EQ(false, sampler->GetCompareEnable()); + EXPECT_EQ(CompareOp::kNever, sampler->GetCompareOp()); } TEST_F(AmberScriptParserTest, SamplerCustomValues) { @@ -57,7 +59,9 @@ SAMPLER sampler MAG_FILTER linear \ BORDER_COLOR float_opaque_white \ MIN_LOD 2.5 \ MAX_LOD 5.0 \ - NORMALIZED_COORDS)"; + NORMALIZED_COORDS \ + COMPARE on \ + COMPARE_OP greater)"; Parser parser; Result r = parser.Parse(in); @@ -81,6 +85,8 @@ SAMPLER sampler MAG_FILTER linear \ EXPECT_EQ(2.5, sampler->GetMinLOD()); EXPECT_EQ(5.0, sampler->GetMaxLOD()); EXPECT_EQ(true, sampler->GetNormalizedCoords()); + EXPECT_EQ(true, sampler->GetCompareEnable()); + EXPECT_EQ(CompareOp::kGreater, sampler->GetCompareOp()); } TEST_F(AmberScriptParserTest, SamplerUnexpectedParameter) { |