Add helper methods for jai bindings.
This commit is contained in:
parent
29493d365e
commit
84595a62f2
@ -844,6 +844,8 @@ Vector3 CubeSurface::Private::applyCosinePowerFilter(const Vector3 & filterDir,
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "nvthread/ParallelFor.h"
|
||||
|
||||
struct ApplyAngularFilterContext {
|
||||
@ -1023,6 +1025,20 @@ CubeSurface CubeSurface::fastResample(int size, EdgeFixup fixupMethod) const
|
||||
}
|
||||
|
||||
|
||||
void CubeSurface::_irradianceFilter(int size, EdgeFixup fixupMethod) {
|
||||
*this = irradianceFilter(size, fixupMethod);
|
||||
}
|
||||
|
||||
void CubeSurface::_cosinePowerFilter(int size, float cosinePower, EdgeFixup fixupMethod) {
|
||||
*this = cosinePowerFilter(size, cosinePower, fixupMethod);
|
||||
}
|
||||
|
||||
void CubeSurface::_fastResample(int size, EdgeFixup fixupMethod) {
|
||||
*this = fastResample(size, fixupMethod);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CubeSurface::toLinear(float gamma)
|
||||
{
|
||||
if (isNull()) return;
|
||||
|
@ -664,6 +664,10 @@ namespace nvtt
|
||||
|
||||
NVTT_API CubeSurface fastResample(int size, EdgeFixup fixupMethod) const;
|
||||
|
||||
// Jai doesn't support non-pod structs as return types, so expose some other function to do the same, but operate in place:
|
||||
NVTT_API void _irradianceFilter(int size, EdgeFixup fixupMethod);
|
||||
NVTT_API void _cosinePowerFilter(int size, float cosinePower, EdgeFixup fixupMethod);
|
||||
NVTT_API void _fastResample(int size, EdgeFixup fixupMethod);
|
||||
|
||||
// Spherical Harmonics:
|
||||
NVTT_API void computeLuminanceIrradianceSH3(float sh[9]) const;
|
||||
|
Loading…
Reference in New Issue
Block a user