Skip to content

Commit 76fbce1

Browse files
committed
Merge branch 'maths_for_bxdfs_hlsl' of https://github.com/Devsh-Graphics-Programming/Nabla into maths_for_bxdfs_hlsl
2 parents 4c0536f + 96efff4 commit 76fbce1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/nbl/builtin/hlsl/math/functions.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct lp_norm<T,0,false>
2727
static scalar_type_t<T> __call(const T v)
2828
{
2929
scalar_type_t<T> retval = abs<T>(v[0]);
30-
for (int i = 1; i < rank<T>::value; i++)
30+
for (int i = 1; i < extent<T>::value; i++)
3131
retval = max<T>(abs<T>(v[i]),retval);
3232
return retval;
3333
}
@@ -40,7 +40,7 @@ struct lp_norm<T,1,false>
4040
static scalar_type_t<T> __sum(const T v)
4141
{
4242
scalar_type_t<T> retval = abs<T>(v[0]);
43-
for (int i = 1; i < rank<T>::value; i++)
43+
for (int i = 1; i < extent<T>::value; i++)
4444
retval += abs<T>(v[i]);
4545
return retval;
4646
}
@@ -276,7 +276,7 @@ void sincos(T theta, NBL_REF_ARG(T) s, NBL_REF_ARG(T) c)
276276
}
277277

278278
template <typename T NBL_FUNC_REQUIRES(is_scalar_v<T>)
279-
matrix<T, 3, 2> frisvad(vector<T, 3> n) // TODO: confirm dimensions of matrix
279+
matrix<T, 2, 3> frisvad(vector<T, 3> n)
280280
{
281281
const T a = 1.0 / (1.0 + n.z);
282282
const T b = -n.x * n.y * a;

0 commit comments

Comments
 (0)