Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
5def0b4
Fix checking valid jpeg file logic
Mar 14, 2026
f93f430
get opacity going!
devshgraphicsprogramming Mar 14, 2026
1a7bf02
really struggling with TWO_SIDED
devshgraphicsprogramming Mar 14, 2026
0dc31aa
add CFrontendIR node copying, stack reversal and individual BxDF expr…
devshgraphicsprogramming Mar 16, 2026
8aff0f7
Beer node needs a thickness unfortunately.
devshgraphicsprogramming Mar 16, 2026
1b0b6f3
quick hack around normalmaps and bumpmaps, sketch out the general ide…
devshgraphicsprogramming Mar 16, 2026
6a4e8df
Merge remote-tracking branch 'remotes/origin/hotfix_jpeg_loader' into…
devshgraphicsprogramming Mar 16, 2026
0c1e045
move UV transform to front of SParameterSet, keep variable length stu…
devshgraphicsprogramming Mar 16, 2026
850536c
implement BLEND_BSDF
devshgraphicsprogramming Mar 17, 2026
011e7f0
I forgot that for blends all layers need to be blended!
devshgraphicsprogramming Mar 17, 2026
2b34047
I don't want to admit how long it took me to debug this one
devshgraphicsprogramming Mar 17, 2026
2d3719f
fix the last thing in the material frontend
devshgraphicsprogramming Mar 18, 2026
ad0cf8d
fix TLAS export when Polygon Geometry can't be made into a BLAS
devshgraphicsprogramming Mar 18, 2026
5d2568b
merge master
devshgraphicsprogramming Mar 18, 2026
c86f8e1
Fix Wave include paths and failure dumps
AnastaZIuk Mar 19, 2026
4871e24
Clean up preprocess failure plumbing
AnastaZIuk Mar 19, 2026
1f73d6a
Backport Wave pragma fix and remove workaround
AnastaZIuk Mar 19, 2026
e4df2b2
Merge pull request #1025 from Devsh-Graphics-Programming/preprocessUp…
AnastaZIuk Mar 19, 2026
66da590
Use upstream gh-pages action for badges
AnastaZIuk Mar 19, 2026
f830a47
Promote NSC channel 66da590b3f06b586f69bdb522bad2f2eebf11b6f
github-actions[bot] Mar 19, 2026
00017ad
Merge pull request #1026 from Devsh-Graphics-Programming/ci/nsc-promo…
AnastaZIuk Mar 19, 2026
83e30e4
Merge branch 'master' into ris_bxdfs
keptsecret Mar 20, 2026
067d107
change concepts for bxdf to *_and_weight methods, make changes for co…
keptsecret Mar 20, 2026
fc6deb8
pdf method renamed to denominator, don't expect to be used
keptsecret Mar 20, 2026
c292f41
Merge remote-tracking branch 'remotes/origin/master' into mitsuba_xml…
devshgraphicsprogramming Mar 21, 2026
1a3d26a
Merge pull request #1021 from Devsh-Graphics-Programming/mitsuba_xml_…
devshgraphicsprogramming Mar 21, 2026
0afd2fa
fix MIS in the path tracer, dont make every ray that didn't miss go i…
devshgraphicsprogramming Mar 21, 2026
f2e2265
camelcase method names, no need for denominator method (pdf is pdf an…
keptsecret Mar 23, 2026
0708859
refactor cook torrance to fit concept
keptsecret Mar 23, 2026
b609179
znowu w zyciu mi nie wyszlo
devshgraphicsprogramming Mar 23, 2026
63cd4df
changes to method names in pt concept, use *_weight instead of pdf an…
keptsecret Mar 23, 2026
59e090e
record my discoveries
devshgraphicsprogramming Mar 23, 2026
a877934
renamed pdf to forwardPdf
keptsecret Mar 23, 2026
64ce3ba
add tractable pdf trait to bxdfs
keptsecret Mar 23, 2026
2539522
Merge remote-tracking branch 'remotes/origin/master' into mitsuba_xml…
devshgraphicsprogramming Mar 23, 2026
148b9bd
bxdf input random to generate has variable dimensions (brdf>=2; bsdf>…
keptsecret Mar 23, 2026
95a3862
merge master, fix conflicts
keptsecret Mar 24, 2026
946c9c7
pass ray to nee generate instead, store depth in ray
keptsecret Mar 24, 2026
4f4421d
nee deferredPdf is deferredWeight
keptsecret Mar 24, 2026
a70f420
all bxdfs have a cache type from generate to quotient_weight, microfa…
keptsecret Mar 24, 2026
dab4a18
eval should have its own cache type in concepts
keptsecret Mar 24, 2026
fb878a6
minor typo bug fixes
keptsecret Mar 25, 2026
4171059
eval returns a value_and_weight type, fixed some bugs in bxdf concept
keptsecret Mar 25, 2026
0e16279
made value_and_pdf compose from value_and_weight
keptsecret Mar 25, 2026
345865f
reuse quant query and other stuff from forwardPdf in quotient and eva…
keptsecret Mar 25, 2026
a98cd45
reuse reflectance from forwardpdf in eval
keptsecret Mar 25, 2026
d0ed7d3
renamed quotient_pdf type to quotient_weight type
keptsecret Mar 26, 2026
110547a
minor fixes to cook torrance, removed redundant functions
keptsecret Mar 26, 2026
ef9156e
only microfacet bxdfs need eval cache type, allow for overload with e…
keptsecret Mar 26, 2026
05124c2
latest example
keptsecret Mar 26, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/build-nabla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ jobs:
$imageBadge | Set-Content -Path "$imagePath/image-badge.json" -Encoding utf8

- name: Deploy Badges
uses: Devsh-Graphics-Programming/actions-gh-pages@v4.0.0-devsh.1
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: badges
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/boost/superproject
Submodule superproject updated 1 files
+1 −1 libs/wave
3 changes: 3 additions & 0 deletions include/nbl/asset/utils/IShaderCompiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include "nbl/builtin/hlsl/enums.hlsl"

#include <functional>

namespace nbl::asset
{

Expand Down Expand Up @@ -136,6 +138,7 @@ class NBL_API2 IShaderCompiler : public core::IReferenceCounted
E_SPIRV_VERSION targetSpirvVersion = E_SPIRV_VERSION::ESV_1_6;
bool depfile = false;
system::path depfilePath = {};
std::function<void(std::string_view)> onPartialOutputOnFailure = {};
};

// https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/SPIR-V.rst#debugging
Expand Down
22 changes: 12 additions & 10 deletions include/nbl/builtin/hlsl/bxdf/base/lambertian.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ struct SLambertianBase

NBL_CONSTEXPR_STATIC_INLINE BxDFClampMode _clamp = conditional_value<IsBSDF, BxDFClampMode, BxDFClampMode::BCM_ABS, BxDFClampMode::BCM_MAX>::value;

spectral_type eval(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type eval_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return hlsl::promote<spectral_type>(_sample.getNdotL(_clamp) * numbers::inv_pi<scalar_type> * hlsl::mix(1.0, 0.5, IsBSDF));
const spectral_type quo = hlsl::promote<spectral_type>(_sample.getNdotL(_clamp) * numbers::inv_pi<scalar_type> * hlsl::mix(1.0, 0.5, IsBSDF));
return quotient_pdf_type::create(quo, denominator(_sample, interaction));
}
spectral_type eval(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type eval_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return eval(_sample, interaction.isotropic);
return eval_and_weight(_sample, interaction.isotropic);
}

template<typename C=bool_constant<!IsBSDF> >
Expand Down Expand Up @@ -62,19 +63,20 @@ struct SLambertianBase
return generate(anisotropic_interaction_type::create(interaction), u);
}

scalar_type pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
// pdf function, because this BxDF has a tractable pdf, indicates that eval weight is also pdf
scalar_type denominator(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
NBL_IF_CONSTEXPR (IsBSDF)
return sampling::ProjectedSphere<scalar_type>::pdf(_sample.getNdotL(_clamp));
else
return sampling::ProjectedHemisphere<scalar_type>::pdf(_sample.getNdotL(_clamp));
}
scalar_type pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
scalar_type denominator(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return pdf(_sample, interaction.isotropic);
return denominator(_sample, interaction.isotropic);
}

quotient_pdf_type quotient_and_pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type quotient_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
sampling::quotient_and_pdf<monochrome_type, scalar_type> qp;
NBL_IF_CONSTEXPR (IsBSDF)
Expand All @@ -83,9 +85,9 @@ struct SLambertianBase
qp = sampling::ProjectedHemisphere<scalar_type>::template quotientAndPdf(_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) NBL_CONST_MEMBER_FUNC
quotient_pdf_type quotient_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return quotient_and_pdf(_sample, interaction.isotropic);
return quotient_and_weight(_sample, interaction.isotropic);
}
};

Expand Down
27 changes: 14 additions & 13 deletions include/nbl/builtin/hlsl/bxdf/base/oren_nayar.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ struct SOrenNayarBase
return hlsl::promote<spectral_type>(NdotL * numbers::inv_pi<scalar_type> * hlsl::mix(1.0, 0.5, IsBSDF) * __rec_pi_factored_out_wo_clamps(query.getVdotL(), NdotL, interaction.getNdotV(_clamp)));
}

spectral_type eval(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type eval_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
SQuery query;
query.VdotL = hlsl::dot(interaction.getV().getDirection(), _sample.getL().getDirection());
return __eval<SQuery>(query, _sample, interaction);
return quotient_pdf_type::create(__eval<SQuery>(query, _sample, interaction), denominator(_sample, interaction));
}
spectral_type eval(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type eval_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return eval(_sample, interaction.isotropic);
return eval_and_weight(_sample, interaction.isotropic);
}

template<typename C=bool_constant<!IsBSDF> >
Expand Down Expand Up @@ -97,34 +97,35 @@ struct SOrenNayarBase
return generate(anisotropic_interaction_type::create(interaction), u);
}

scalar_type pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
// pdf function, because this BxDF has a tractable pdf
scalar_type denominator(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
if (IsBSDF)
return sampling::ProjectedSphere<scalar_type>::pdf(_sample.getNdotL(_clamp));
else
return sampling::ProjectedHemisphere<scalar_type>::pdf(_sample.getNdotL(_clamp));
}
scalar_type pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
scalar_type denominator(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return pdf(_sample, interaction.isotropic);
return denominator(_sample, interaction.isotropic);
}

template<typename Query>
quotient_pdf_type __quotient_and_pdf(NBL_CONST_REF_ARG(Query) query, NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type __quotient_and_weight(NBL_CONST_REF_ARG(Query) query, NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
scalar_type _pdf = pdf(_sample, interaction);
scalar_type _pdf = denominator(_sample, interaction);
scalar_type q = __rec_pi_factored_out_wo_clamps(query.getVdotL(), _sample.getNdotL(_clamp), interaction.getNdotV(_clamp));
return quotient_pdf_type::create(q, _pdf);
}
quotient_pdf_type quotient_and_pdf(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
quotient_pdf_type quotient_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(isotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
SQuery query;
query.VdotL = hlsl::dot(interaction.getV().getDirection(), _sample.getL().getDirection());
return __quotient_and_pdf<SQuery>(query, _sample, interaction);
return __quotient_and_weight<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) NBL_CONST_MEMBER_FUNC
quotient_pdf_type quotient_and_weight(NBL_CONST_REF_ARG(sample_type) _sample, NBL_CONST_REF_ARG(anisotropic_interaction_type) interaction) NBL_CONST_MEMBER_FUNC
{
return quotient_and_pdf(_sample, interaction.isotropic);
return quotient_and_weight(_sample, interaction.isotropic);
}

scalar_type A2;
Expand Down
Loading
Loading