Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
5218545
changes to dual measure quant, old stuff commented out for now
keptsecret Sep 4, 2025
f7525af
create query structs in beckmann ndf, removed query concepts, funcs r…
keptsecret Sep 5, 2025
c50db68
did the same for ggx ndf, some fixes to beckmann
keptsecret Sep 5, 2025
c49bedb
Merge branch 'master' into bxdf_fixes_cook_torrance
keptsecret Sep 8, 2025
319c954
fixes to ndf concept
keptsecret Sep 8, 2025
4eeacf1
moved eval, quotient/pdf into cook torrance base
keptsecret Sep 9, 2025
e7bc784
moved generate H into ndfs, generate impl in cook torrance base
keptsecret Sep 9, 2025
72226bb
use new cook torrance base in microfacet bxdfs
keptsecret Sep 9, 2025
f34b348
Merge branch 'master' into bxdf_fixes_cook_torrance
keptsecret Sep 10, 2025
ad13044
numerous typo bug fixes
keptsecret Sep 10, 2025
d8d2116
fixes to ggx ndf
keptsecret Sep 10, 2025
238b08e
fixed conductor fresnel naming ior as eta
keptsecret Sep 10, 2025
8bc707f
minor fixes to beckmann ndf, removed obsolete comments
keptsecret Sep 10, 2025
9fb28cf
added luminosity contribution hint to cook torrance bsdfs
keptsecret Sep 11, 2025
4cb8a0a
added aniso overloads to isotropic bxdf methods
keptsecret Sep 11, 2025
392dc31
checks for invalid generate sample
keptsecret Sep 11, 2025
02de86e
removed obsolete commented out stuff
keptsecret Sep 12, 2025
4a7f532
added cartesian-polar conversions from unit tests
keptsecret Sep 12, 2025
80c4f67
Merge branch 'fix_rotation_mat' into bxdf_fixes_cook_torrance
keptsecret Sep 15, 2025
6233bd1
Merge branch 'master' into bxdf_fixes_cook_torrance
keptsecret Sep 15, 2025
ce5fbac
vector hashes
keptsecret Sep 15, 2025
47e814b
Merge branch 'fix_rotation_mat' into bxdf_fixes_cook_torrance
keptsecret Sep 15, 2025
c983975
Merge branch 'master' into bxdf_fixes_cook_torrance
keptsecret Sep 16, 2025
0f2ee0b
fix fresnel usage in bxdf pdf
keptsecret Sep 17, 2025
b5f02e6
fix F calc in generate
keptsecret Sep 17, 2025
a111415
merge master, fix conflicts
keptsecret Sep 22, 2025
9655049
minor fixes to non cook torrance bxdf generate
keptsecret Sep 22, 2025
a1743d2
split out bxdf concept typdefs
keptsecret Sep 22, 2025
e6d663b
removed redundant thin_smooth_dielectric create
keptsecret Sep 22, 2025
340cee3
added and use notEqual spirv intrinsic
keptsecret Sep 22, 2025
a3733b1
moved polar coord stuff into its own file
keptsecret Sep 22, 2025
3e3589b
made smith functions return measureless
keptsecret Sep 22, 2025
4bdf199
use type alias macro from config
keptsecret Sep 22, 2025
4faecc3
adjust ndf concept, change fresnel conductor ior to eta
keptsecret Sep 23, 2025
407da2f
combine brdf/bsdf cook torrance into same struct, old stuff commented…
keptsecret Sep 23, 2025
638b8b5
moved duplicate code in eval, pdf, quotient_pdf into templated intera…
keptsecret Sep 23, 2025
c587820
some changes to fresnel, cook torrance base
keptsecret Sep 24, 2025
d438360
reverted ggx ndf to use optimizations
keptsecret Sep 24, 2025
5f49f11
pdf function checks for backfacing V
keptsecret Sep 25, 2025
627074b
reduced beckmann, ggx ndfs to single struct with enable_ifs
keptsecret Sep 25, 2025
3896231
put concepts back in for ndf impl
keptsecret Sep 26, 2025
91b39d5
ggx ndf determine clamp with template bool
keptsecret Sep 26, 2025
2a3cda3
moved A out of ndf base into generate base
keptsecret Sep 26, 2025
c9f9366
added create methods to ndfs, cook torrance base; slight changes to c…
keptsecret Sep 26, 2025
fd128e6
make beckmann + ggx bxdfs typedefs of cooktorrance base, functionalit…
keptsecret Sep 26, 2025
882375e
added flipSign func that copies sign of rhs
keptsecret Sep 29, 2025
b22d570
remove unused var
keptsecret Sep 29, 2025
c0586f5
moved cook torrance base into base folder, removed commented out in b…
keptsecret Sep 29, 2025
9eeb248
make lambertian + oren nayar bxdfs typedefs of corresponding base, fu…
keptsecret Sep 29, 2025
26c76e4
fix microfacet bxdf concept
keptsecret Sep 29, 2025
58e2a0b
fixes to cook torrance generate
keptsecret Sep 30, 2025
2a08728
templated ray_dir_info reflect/refract funcs
keptsecret Sep 30, 2025
b993e47
pdf should return inf when smooth cook torrance bxdf
keptsecret Sep 30, 2025
f3cb6ff
set pdf=0 in specific cases
keptsecret Oct 1, 2025
7389c9a
added checking for TIR in bsdfs
keptsecret Oct 1, 2025
ec5913b
change fresnel orientedeta based on NdotV, user needs to pass front f…
keptsecret Oct 2, 2025
bccdb0b
fixes flipSign and flipSignIfRHSNeg
keptsecret Oct 3, 2025
1e9e407
fix bsdf generate: LdotH and NdotL same sign, otherwise invalid sample
keptsecret Oct 3, 2025
dab51c3
cook torrance brdf returns invalid sample in cases, fix missing return
keptsecret Oct 3, 2025
53ab934
more util funcs for ray_dir_info, avoid setting vals directly
keptsecret Oct 3, 2025
804014f
added IsMicrofacet to bxdf_traits
keptsecret Oct 3, 2025
260f7a3
projectedSphere generate should take v by ref
keptsecret Oct 6, 2025
fd54ac4
removed vector std::hash because glm already implemented it
keptsecret Oct 6, 2025
5caf006
Merge branch 'master' into bxdf_fixes_cook_torrance
keptsecret Oct 6, 2025
7508b82
get orientedeta and rcp methods in fresnel + concept
keptsecret Oct 6, 2025
2b4a9c1
slight change to flipSignIfRHSNeg struct
keptsecret Oct 6, 2025
d3fa872
added two-sided fresnel concept
keptsecret Oct 6, 2025
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
383 changes: 383 additions & 0 deletions include/nbl/builtin/hlsl/bxdf/base/cook_torrance_base.hlsl

Large diffs are not rendered by default.

36 changes: 27 additions & 9 deletions include/nbl/builtin/hlsl/bxdf/base/lambertian.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,40 @@ struct SLambertianBase
{
return hlsl::promote<spectral_type>(_sample.getNdotL(_clamp) * numbers::inv_pi<scalar_type> * hlsl::mix(1.0, 0.5, IsBSDF));
}
spectral_type eval(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction)
{
return eval(_sample, interaction.isotropic);
}

sample_type generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector2_type u)
template<typename C=bool_constant<!IsBSDF> >
enable_if_t<C::value && !IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector2_type u)
{
// static_assert(!IsBSDF);
ray_dir_info_type L;
L.direction = sampling::ProjectedHemisphere<scalar_type>::generate(u);
L.setDirection(sampling::ProjectedHemisphere<scalar_type>::generate(u));
return sample_type::createFromTangentSpace(L, interaction.getFromTangentSpace());
}

sample_type generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector3_type u)
template<typename C=bool_constant<IsBSDF> >
enable_if_t<C::value && IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector3_type u)
{
// static_assert(IsBSDF);
vector3_type _u = u;
ray_dir_info_type L;
L.direction = sampling::ProjectedSphere<scalar_type>::generate(u);
L.setDirection(sampling::ProjectedSphere<scalar_type>::generate(_u));
return sample_type::createFromTangentSpace(L, interaction.getFromTangentSpace());
}
template<typename C=bool_constant<!IsBSDF> >
enable_if_t<C::value && !IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(isotropic_interaction_type) interaction, const vector2_type u)
{
return generate(anisotropic_interaction_type::create(interaction), u);
}
template<typename C=bool_constant<IsBSDF> >
enable_if_t<C::value && IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(isotropic_interaction_type) interaction, const vector3_type u)
{
return generate(anisotropic_interaction_type::create(interaction), u);
}

scalar_type pdf(NBL_CONST_REF_ARG(sample_type) _sample)
{
if (IsBSDF)
NBL_IF_CONSTEXPR (IsBSDF)
return sampling::ProjectedSphere<scalar_type>::pdf(_sample.getNdotL(_clamp));
else
return sampling::ProjectedHemisphere<scalar_type>::pdf(_sample.getNdotL(_clamp));
Expand All @@ -57,12 +71,16 @@ struct SLambertianBase
quotient_pdf_type quotient_and_pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction)
{
sampling::quotient_and_pdf<monochrome_type, scalar_type> qp;
if (IsBSDF)
NBL_IF_CONSTEXPR (IsBSDF)
qp = sampling::ProjectedSphere<scalar_type>::template quotient_and_pdf(_sample.getNdotL(_clamp));
else
qp = sampling::ProjectedHemisphere<scalar_type>::template quotient_and_pdf(_sample.getNdotL(_clamp));
return quotient_pdf_type::create(qp.quotient[0], qp.pdf);
}
quotient_pdf_type quotient_and_pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction)
{
return quotient_and_pdf(_sample, interaction.isotropic);
}
};

}
Expand Down
32 changes: 25 additions & 7 deletions include/nbl/builtin/hlsl/bxdf/base/oren_nayar.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,36 @@ struct SOrenNayarBase
query.VdotL = hlsl::dot(interaction.getV().getDirection(), _sample.getL().getDirection());
return __eval<SQuery>(query, _sample, interaction);
}
spectral_type eval(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction)
{
return eval(_sample, interaction.isotropic);
}

sample_type generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector2_type u)
template<typename C=bool_constant<!IsBSDF> >
enable_if_t<C::value && !IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector2_type u)
{
// static_assert(!IsBSDF);
ray_dir_info_type L;
L.direction = sampling::ProjectedHemisphere<scalar_type>::generate(u);
L.setDirection(sampling::ProjectedHemisphere<scalar_type>::generate(u));
return sample_type::createFromTangentSpace(L, interaction.getFromTangentSpace());
}

sample_type generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector3_type u)
template<typename C=bool_constant<IsBSDF> >
enable_if_t<C::value && IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction, const vector3_type u)
{
// static_assert(IsBSDF);
vector3_type _u = u;
ray_dir_info_type L;
L.direction = sampling::ProjectedSphere<scalar_type>::generate(u);
L.setDirection(sampling::ProjectedSphere<scalar_type>::generate(_u));
return sample_type::createFromTangentSpace(L, interaction.getFromTangentSpace());
}
template<typename C=bool_constant<!IsBSDF> >
enable_if_t<C::value && !IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(isotropic_interaction_type) interaction, const vector2_type u)
{
return generate(anisotropic_interaction_type::create(interaction), u);
}
template<typename C=bool_constant<IsBSDF> >
enable_if_t<C::value && IsBSDF, sample_type> generate(NBL_CONST_REF_ARG(isotropic_interaction_type) interaction, const vector3_type u)
{
return generate(anisotropic_interaction_type::create(interaction), u);
}

scalar_type pdf(NBL_CONST_REF_ARG(sample_type) _sample)
{
Expand All @@ -102,6 +116,10 @@ struct SOrenNayarBase
query.VdotL = hlsl::dot(interaction.getV().getDirection(), _sample.getL().getDirection());
return __quotient_and_pdf<SQuery>(query, _sample, interaction);
}
quotient_pdf_type quotient_and_pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction)
{
return quotient_and_pdf(_sample, interaction.isotropic);
}

scalar_type A2;
vector2_type AB;
Expand Down
82 changes: 62 additions & 20 deletions include/nbl/builtin/hlsl/bxdf/common.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "nbl/builtin/hlsl/ieee754.hlsl"
#include "nbl/builtin/hlsl/tgmath.hlsl"
#include "nbl/builtin/hlsl/math/functions.hlsl"
// #include "nbl/builtin/hlsl/glsl_compat/core.hlsl"
#include "nbl/builtin/hlsl/cpp_compat/promote.hlsl"
#include "nbl/builtin/hlsl/bxdf/fresnel.hlsl"
#include "nbl/builtin/hlsl/sampling/quotient_and_pdf.hlsl"
Expand All @@ -31,7 +32,7 @@ namespace ray_dir_info
#define NBL_CONCEPT_TPLT_PRM_KINDS (typename)
#define NBL_CONCEPT_TPLT_PRM_NAMES (T)
#define NBL_CONCEPT_PARAM_0 (rdirinfo, T)
#define NBL_CONCEPT_PARAM_1 (N, typename T::vector3_type)
#define NBL_CONCEPT_PARAM_1 (v, typename T::vector3_type)
#define NBL_CONCEPT_PARAM_2 (rcpEta, typename T::scalar_type)
#define NBL_CONCEPT_PARAM_3 (m, typename T::matrix3x3_type)
#define NBL_CONCEPT_PARAM_4 (rfl, Reflect<typename T::scalar_type>)
Expand All @@ -40,7 +41,7 @@ namespace ray_dir_info
#define NBL_CONCEPT_PARAM_7 (rr, ReflectRefract<typename T::scalar_type>)
NBL_CONCEPT_BEGIN(8)
#define rdirinfo NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
#define N NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
#define v NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
#define rcpEta NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
#define m NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_3
#define rfl NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_4
Expand All @@ -51,13 +52,16 @@ NBL_CONCEPT_END(
((NBL_CONCEPT_REQ_TYPE)(T::scalar_type))
((NBL_CONCEPT_REQ_TYPE)(T::vector3_type))
((NBL_CONCEPT_REQ_TYPE)(T::matrix3x3_type))
((NBL_CONCEPT_REQ_EXPR)(rdirinfo.setDirection(v)))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.getDirection()), ::nbl::hlsl::is_same_v, typename T::vector3_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.transmit()), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.reflect(rfl)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.refract(rfr, rcpEta)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.reflectTransmit(rfl, t)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.reflectRefract(rr, t, rcpEta)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.transform(m)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((rdirinfo.isValid()), ::nbl::hlsl::is_same_v, bool))
((NBL_CONCEPT_REQ_EXPR)(rdirinfo.makeInvalid()))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(is_scalar_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(is_vector_v, typename T::vector3_type))
);
Expand All @@ -67,7 +71,7 @@ NBL_CONCEPT_END(
#undef rfl
#undef m
#undef rcpEta
#undef N
#undef v
#undef rdirinfo
#include <nbl/builtin/hlsl/concepts/__end.hlsl>

Expand All @@ -78,6 +82,7 @@ struct SBasic
using vector3_type = vector<T, 3>;
using matrix3x3_type = matrix<T, 3, 3>;

void setDirection(const vector3_type v) { direction = v; }
vector3_type getDirection() NBL_CONST_MEMBER_FUNC { return direction; }

SBasic<T> transmit() NBL_CONST_MEMBER_FUNC
Expand All @@ -87,28 +92,32 @@ struct SBasic
return retval;
}

SBasic<T> reflect(NBL_CONST_REF_ARG(Reflect<scalar_type>) r) NBL_CONST_MEMBER_FUNC
template<typename R=Reflect<scalar_type> >
SBasic<T> reflect(NBL_CONST_REF_ARG(R) r) NBL_CONST_MEMBER_FUNC
{
SBasic<T> retval;
retval.direction = r();
return retval;
}

SBasic<T> refract(NBL_CONST_REF_ARG(Refract<scalar_type>) r, scalar_type rcpOrientedEta) NBL_CONST_MEMBER_FUNC
template<typename R=Refract<scalar_type> >
SBasic<T> refract(NBL_CONST_REF_ARG(R) r, scalar_type rcpOrientedEta) NBL_CONST_MEMBER_FUNC
{
SBasic<T> retval;
retval.direction = r(rcpOrientedEta);
return retval;
}

SBasic<T> reflectTransmit(NBL_CONST_REF_ARG(Reflect<scalar_type>) r, bool transmitted) NBL_CONST_MEMBER_FUNC
template<typename R=Reflect<scalar_type> >
SBasic<T> reflectTransmit(NBL_CONST_REF_ARG(R) r, bool transmitted) NBL_CONST_MEMBER_FUNC
{
SBasic<T> retval;
retval.direction = hlsl::mix(r(), -direction, transmitted);
return retval;
}

SBasic<T> reflectRefract(NBL_CONST_REF_ARG(ReflectRefract<scalar_type>) rr, bool transmitted, scalar_type rcpOrientedEta) NBL_CONST_MEMBER_FUNC
template<typename R=ReflectRefract<scalar_type> >
SBasic<T> reflectRefract(NBL_CONST_REF_ARG(R) rr, bool transmitted, scalar_type rcpOrientedEta) NBL_CONST_MEMBER_FUNC
{
SBasic<T> retval;
retval.direction = rr(transmitted, rcpOrientedEta);
Expand All @@ -128,6 +137,13 @@ struct SBasic
return retval;
}

void makeInvalid()
{
direction = vector3_type(0,0,0);
}

bool isValid() NBL_CONST_MEMBER_FUNC { return hlsl::any<vector<bool, 3> >(hlsl::glsl::notEqual(direction, hlsl::promote<vector3_type>(0.0))); }

vector3_type direction;
};
// more to come!
Expand Down Expand Up @@ -343,6 +359,7 @@ NBL_CONCEPT_END(
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((_sample.getBdotL2()), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((_sample.getNdotL(clampMode)), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((_sample.getNdotL2()), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((_sample.isValid()), ::nbl::hlsl::is_same_v, bool))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((T::createFromTangentSpace(rdirinfo,frame)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((T::create(rdirinfo,pV)), ::nbl::hlsl::is_same_v, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((T::create(rdirinfo,pV,pV,pV)), ::nbl::hlsl::is_same_v, T))
Expand Down Expand Up @@ -435,7 +452,7 @@ struct SLightSample
}
scalar_type getNdotL2() NBL_CONST_MEMBER_FUNC { return NdotL2; }

bool isValid() NBL_CONST_MEMBER_FUNC { return !hlsl::all<vector<bool, 3> >(hlsl::glsl::equal(L.getDirection(), hlsl::promote<vector3_type>(0.0))); }
bool isValid() NBL_CONST_MEMBER_FUNC { return L.isValid(); }


RayDirInfo L;
Expand Down Expand Up @@ -767,6 +784,22 @@ struct SAnisotropicMicrofacetCache
retval.BdotH = nbl::hlsl::dot<vector3_type>(interaction.getB(),H);
return retval;
}
static this_t create(
const scalar_type VdotH, const vector3_type L, const vector3_type H,
const vector3_type T, const vector3_type B, const vector3_type N, bool transmitted
)
{
this_t retval;
retval.iso_cache.VdotH = VdotH;
retval.iso_cache.LdotH = hlsl::mix(VdotH, hlsl::dot(L, H), transmitted);
scalar_type NdotH = hlsl::dot(N, H);
assert(NdotH > scalar_type(0.0));
retval.iso_cache.absNdotH = hlsl::abs(NdotH);
retval.iso_cache.NdotH2 = NdotH * NdotH;
retval.TdotH = hlsl::dot(T, H);
retval.BdotH = hlsl::dot(B, H);
return retval;
}

scalar_type getVdotL() NBL_CONST_MEMBER_FUNC { return iso_cache.getVdotL(); }
scalar_type getVdotH() NBL_CONST_MEMBER_FUNC { return iso_cache.getVdotH(); }
Expand All @@ -791,6 +824,23 @@ namespace bxdf_concepts
{
namespace impl
{

#define NBL_CONCEPT_NAME bxdf_common_typdefs
#define NBL_CONCEPT_TPLT_PRM_KINDS (typename)
#define NBL_CONCEPT_TPLT_PRM_NAMES (T)
#define NBL_CONCEPT_PARAM_0 (bxdf, T)
NBL_CONCEPT_BEGIN(1)
#define bxdf NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
NBL_CONCEPT_END(
((NBL_CONCEPT_REQ_TYPE)(T::scalar_type))
((NBL_CONCEPT_REQ_TYPE)(T::anisotropic_interaction_type))
((NBL_CONCEPT_REQ_TYPE)(T::sample_type))
((NBL_CONCEPT_REQ_TYPE)(T::spectral_type))
((NBL_CONCEPT_REQ_TYPE)(T::quotient_pdf_type))
);
#undef bxdf
#include <nbl/builtin/hlsl/concepts/__end.hlsl>

#define NBL_CONCEPT_NAME bxdf_common
#define NBL_CONCEPT_TPLT_PRM_KINDS (typename)
#define NBL_CONCEPT_TPLT_PRM_NAMES (T)
Expand All @@ -802,11 +852,7 @@ NBL_CONCEPT_BEGIN(3)
#define _sample NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
#define aniso NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
NBL_CONCEPT_END(
((NBL_CONCEPT_REQ_TYPE)(T::scalar_type))
((NBL_CONCEPT_REQ_TYPE)(T::anisotropic_interaction_type))
((NBL_CONCEPT_REQ_TYPE)(T::sample_type))
((NBL_CONCEPT_REQ_TYPE)(T::spectral_type))
((NBL_CONCEPT_REQ_TYPE)(T::quotient_pdf_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(bxdf_common_typdefs, T))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.eval(_sample, aniso)), ::nbl::hlsl::is_same_v, typename T::spectral_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.pdf(_sample)), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.quotient_and_pdf(_sample, aniso)), ::nbl::hlsl::is_same_v, typename T::quotient_pdf_type))
Expand Down Expand Up @@ -940,14 +986,10 @@ NBL_CONCEPT_BEGIN(4)
#define aniso NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
#define anisocache NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_3
NBL_CONCEPT_END(
((NBL_CONCEPT_REQ_TYPE)(T::scalar_type))
((NBL_CONCEPT_REQ_TYPE)(T::anisotropic_interaction_type))
((NBL_CONCEPT_REQ_TYPE)(T::sample_type))
((NBL_CONCEPT_REQ_TYPE)(T::spectral_type))
((NBL_CONCEPT_REQ_TYPE)(T::quotient_pdf_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(bxdf_common_typdefs, T))
((NBL_CONCEPT_REQ_TYPE)(T::anisocache_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.eval(_sample, aniso, anisocache)), ::nbl::hlsl::is_same_v, typename T::spectral_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.pdf(aniso, anisocache)), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.pdf(_sample, aniso, anisocache)), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.quotient_and_pdf(_sample, aniso, anisocache)), ::nbl::hlsl::is_same_v, typename T::quotient_pdf_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(LightSample, typename T::sample_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(concepts::FloatingPointLikeVectorial, typename T::spectral_type))
Expand Down Expand Up @@ -977,7 +1019,7 @@ NBL_CONCEPT_END(
((NBL_CONCEPT_REQ_TYPE)(T::isotropic_interaction_type))
((NBL_CONCEPT_REQ_TYPE)(T::isocache_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.eval(_sample, iso, isocache)), ::nbl::hlsl::is_same_v, typename T::spectral_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.pdf(iso, isocache)), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.pdf(_sample, iso, isocache)), ::nbl::hlsl::is_same_v, typename T::scalar_type))
((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((bxdf.quotient_and_pdf(_sample, iso, isocache)), ::nbl::hlsl::is_same_v, typename T::quotient_pdf_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(surface_interactions::Isotropic, typename T::isotropic_interaction_type))
((NBL_CONCEPT_REQ_TYPE_ALIAS_CONCEPT)(CreatableIsotropicMicrofacetCache, typename T::isocache_type))
Expand Down
Loading