Skip to content
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
2 changes: 1 addition & 1 deletion 3rdparty/dxc/dxc
Submodule dxc updated 590 files
4 changes: 2 additions & 2 deletions include/nbl/builtin/hlsl/bxdf/fresnel.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ struct ComputeMicrofacetNormal
// VdotH <= 1-orientedEta2 for orientedEta<1 -> VdotH<0
// VdotH <= 0 for orientedEta>1
// so for transmission VdotH<=0, H needs to be flipped to be consistent with oriented eta
vector_type unnormalized(const bool _refract)
vector_type unnormalized(const bool _refract) NBL_CONST_MEMBER_FUNC
{
assert(hlsl::dot(V, L) <= -hlsl::min(orientedEta, scalar_type(1.0) / orientedEta));
const scalar_type etaFactor = hlsl::mix(scalar_type(1.0), orientedEta, _refract);
Expand All @@ -148,7 +148,7 @@ struct ComputeMicrofacetNormal
}

// returns normalized vector, but NaN when result is length 0
vector_type normalized(const bool _refract)
vector_type normalized(const bool _refract) NBL_CONST_MEMBER_FUNC
{
const vector_type H = unnormalized(_refract);
return hlsl::normalize<vector_type>(H);
Expand Down
2 changes: 1 addition & 1 deletion include/nbl/builtin/hlsl/cpp_compat/basic.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace nbl::hlsl
#define NBL_CONSTEXPR_STATIC_INLINE const static
#define NBL_CONSTEXPR_INLINE_FUNC inline
#define NBL_CONSTEXPR_FORCED_INLINE_FUNC inline
#define NBL_CONST_MEMBER_FUNC
#define NBL_CONST_MEMBER_FUNC const
#define NBL_CONSTEXPR_INLINE_NSPC_SCOPE_VAR const static
#define NBL_CONSTEXPR_FUNC_SCOPE_VAR const
#define NBL_CONSTEXPR_OOL_MEMBER const
Expand Down
2 changes: 1 addition & 1 deletion include/nbl/builtin/hlsl/rwmc/ResolveParameters.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct SResolveParameters
}

template<typename SampleType, typename Colorspace = colorspace::scRGB>
scalar_t calcLuma(NBL_CONST_REF_ARG(SampleType) col)
scalar_t calcLuma(NBL_CONST_REF_ARG(SampleType) col) NBL_CONST_MEMBER_FUNC
{
return hlsl::dot<SampleType>(hlsl::transpose(Colorspace::ToXYZ())[1], col);
}
Expand Down
2 changes: 1 addition & 1 deletion include/nbl/builtin/hlsl/rwmc/SplattingParameters.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct SPackedSplattingParameters
return retval;
}

SSplattingParameters unpack()
SSplattingParameters unpack() NBL_CONST_MEMBER_FUNC
{
SSplattingParameters retval;
const float32_t2 unpackedRcpLog2BaseAndLog2BaseRoot = hlsl::unpackHalf2x16(PackedRcpLog2BaseAndLog2BaseRoot);
Expand Down
6 changes: 3 additions & 3 deletions include/nbl/builtin/hlsl/rwmc/resolve.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct SResolveAccessorAdaptor
NBL_CONSTEXPR_STATIC_INLINE int32_t image_dimension = 2;

template<typename OutputScalarType, int32_t Dimension>
void get(NBL_REF_ARG(output_t) value, vector<uint16_t, 2> uv, uint16_t layer, uint16_t level)
void get(NBL_REF_ARG(output_t) value, vector<uint16_t, 2> uv, uint16_t layer, uint16_t level) NBL_CONST_MEMBER_FUNC
{
typename AccessorType::output_t sampled;
accessor.template get<typename AccessorType::output_scalar_t, Dimension>(sampled, uv, layer, level);
Expand Down Expand Up @@ -82,7 +82,7 @@ struct SResolver
return retval;
}

output_t operator()(NBL_REF_ARG(CascadeAccessor) acc, const int16_t2 coord)
output_t operator()(NBL_REF_ARG(CascadeAccessor) acc, const int16_t2 coord) NBL_CONST_MEMBER_FUNC
{
scalar_t reciprocalBaseI = 1.f;
SCascadeSample curr = __sampleCascade(acc, coord, 0u, reciprocalBaseI);
Expand Down Expand Up @@ -150,7 +150,7 @@ struct SResolver

// pseudo private stuff:

SCascadeSample __sampleCascade(NBL_REF_ARG(CascadeAccessor) acc, int16_t2 coord, uint16_t cascadeIndex, scalar_t reciprocalBaseI)
SCascadeSample __sampleCascade(NBL_REF_ARG(CascadeAccessor) acc, int16_t2 coord, uint16_t cascadeIndex, scalar_t reciprocalBaseI) NBL_CONST_MEMBER_FUNC
{
output_t sampleValue;
scalar_t excl_hood_luma_sum = 0.f;
Expand Down
Loading