Add convolution method to TexImage. Fixes issue 166.

This commit is contained in:
castano
2011-09-27 18:41:02 +00:00
parent 8c65e4c62d
commit 91e6bbe5c3
6 changed files with 49 additions and 14 deletions

View File

@ -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)
{

View File

@ -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);