예제 #1
0
void DisplaceOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/)
{
	float xy[2] = { x, y };
	float uv[2], deriv[2][2];

	pixelTransform(xy, uv, deriv);

	/* EWA filtering (without nearest it gets blurry with NO distortion) */
	this->m_inputColorProgram->readFiltered(output, uv[0], uv[1], deriv[0], deriv[1], COM_PS_BILINEAR);
}
void PlaneDistortWarpImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{
	float xy[2] = {x, y};
	float uv[2];
	float deriv[2][2];

	pixelTransform(xy, uv, deriv);

	m_pixelReader->readFiltered(output, uv[0], uv[1], deriv[0], deriv[1], COM_PS_BILINEAR);
}