Add convolution method to TexImage. Fixes issue 166.
This commit is contained in:
@ -1490,6 +1490,16 @@ void TexImage::abs(int channel)
|
||||
}
|
||||
}
|
||||
|
||||
void TexImage::convolve(int channel, int kernelSize, float * kernelData)
|
||||
{
|
||||
if (m->image == NULL) return;
|
||||
|
||||
detach();
|
||||
|
||||
Kernel2 k(kernelSize, kernelData);
|
||||
m->image->convolve(k, channel, (FloatImage::WrapMode)m->wrapMode);
|
||||
}
|
||||
|
||||
/*
|
||||
void TexImage::blockLuminanceScale(float scale)
|
||||
{
|
||||
|
@ -471,6 +471,7 @@ namespace nvtt
|
||||
NVTT_API void toLUVW(float range = 1.0f);
|
||||
NVTT_API void fromLUVW(float range = 1.0f);
|
||||
NVTT_API void abs(int channel);
|
||||
NVTT_API void convolve(int channel, int kernelSize, float * kernelData);
|
||||
|
||||
//NVTT_API void blockLuminanceScale(float scale);
|
||||
|
||||
|
Reference in New Issue
Block a user