Skip to content

Commit 804014f

Browse files
committed
added IsMicrofacet to bxdf_traits
1 parent 53ab934 commit 804014f

File tree

11 files changed

+17
-1
lines changed

11 files changed

+17
-1
lines changed

include/nbl/builtin/hlsl/bxdf/reflection/beckmann.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ template<typename C>
3131
struct traits<bxdf::reflection::SBeckmannIsotropic<C> >
3232
{
3333
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
34+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
3435
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
3536
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3637
};
@@ -39,6 +40,7 @@ template<typename C>
3940
struct traits<bxdf::reflection::SBeckmannAnisotropic<C> >
4041
{
4142
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
43+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
4244
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
4345
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
4446
};

include/nbl/builtin/hlsl/bxdf/reflection/delta_distribution.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ template<typename C>
7474
struct traits<bxdf::reflection::SDeltaDistribution<C> >
7575
{
7676
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
77+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = false;
7778
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = false;
7879
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
7980
};

include/nbl/builtin/hlsl/bxdf/reflection/ggx.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ template<typename C>
3131
struct traits<bxdf::reflection::SGGXIsotropic<C> >
3232
{
3333
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
34+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
3435
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
3536
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3637
};
@@ -39,6 +40,7 @@ template<typename C>
3940
struct traits<bxdf::reflection::SGGXAnisotropic<C> >
4041
{
4142
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
43+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
4244
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
4345
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
4446
};

include/nbl/builtin/hlsl/bxdf/reflection/lambertian.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ template<typename C>
2525
struct traits<bxdf::reflection::SLambertian<C> >
2626
{
2727
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
28+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = false;
2829
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = false;
2930
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3031
};

include/nbl/builtin/hlsl/bxdf/reflection/oren_nayar.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ template<typename C>
2525
struct traits<bxdf::reflection::SOrenNayar<C> >
2626
{
2727
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
28+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = false;
2829
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
2930
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3031
};

include/nbl/builtin/hlsl/bxdf/transmission/beckmann.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ template<typename C>
3131
struct traits<bxdf::transmission::SBeckmannDielectricIsotropic<C> >
3232
{
3333
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
34+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
3435
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
3536
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3637
};
@@ -39,6 +40,7 @@ template<typename C>
3940
struct traits<bxdf::transmission::SBeckmannDielectricAnisotropic<C> >
4041
{
4142
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
43+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
4244
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
4345
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
4446
};

include/nbl/builtin/hlsl/bxdf/transmission/delta_distribution.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ template<typename C>
7171
struct traits<bxdf::transmission::SDeltaDistribution<C> >
7272
{
7373
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
74+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = false;
7475
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = false;
7576
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
7677
};

include/nbl/builtin/hlsl/bxdf/transmission/ggx.hlsl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ template<typename C>
3131
struct traits<bxdf::transmission::SGGXDielectricIsotropic<C> >
3232
{
3333
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
34+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
3435
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
3536
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3637
};
@@ -39,6 +40,7 @@ template<typename C>
3940
struct traits<bxdf::transmission::SGGXDielectricAnisotropic<C> >
4041
{
4142
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
43+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = true;
4244
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
4345
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
4446
};

include/nbl/builtin/hlsl/bxdf/transmission/lambertian.hlsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ template<typename C>
2525
struct traits<bxdf::transmission::SLambertian<C> >
2626
{
2727
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
28+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = false;
2829
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = false;
2930
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3031
};

include/nbl/builtin/hlsl/bxdf/transmission/oren_nayar.hlsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ using SOrenNayar = base::SOrenNayarBase<Config, true>;
2424
template<typename C>
2525
struct traits<bxdf::transmission::SOrenNayar<C> >
2626
{
27-
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BRDF;
27+
NBL_CONSTEXPR_STATIC_INLINE BxDFType type = BT_BSDF;
28+
NBL_CONSTEXPR_STATIC_INLINE bool IsMicrofacet = false;
2829
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotV = true;
2930
NBL_CONSTEXPR_STATIC_INLINE bool clampNdotL = true;
3031
};

0 commit comments

Comments
 (0)