Bugfixing: Tensor product patch shading sampler

This commit is contained in:
Jakub Melka 2021-03-14 16:08:50 +01:00
parent 325db87cd5
commit 9dcdf10d1a
1 changed files with 3 additions and 1 deletions

View File

@ -3112,7 +3112,9 @@ public:
virtual bool sample(const QPointF& devicePoint, PDFColorBuffer outputBuffer, int limit) const override
{
constexpr PDFReal epsilon = 0.001;
std::array initialSamples = { QPointF(0.5, 0.5) };
std::array initialSamples = { QPointF(0.5, 0.5), // Middle of the patch
QPointF(0.0, 0.0), QPointF(1.0, 0.0), QPointF(0.0, 1.0), QPointF(1.0, 1.0), // Four corners
QPointF(0.5, 0.0), QPointF(0.5, 1.0), QPointF(0.0, 0.5), QPointF(1.0, 0.5) }; // Middle point of edges
for (const PDFTensorPatch& patch : m_patches)
{