Use ID2D1Effect::SetInputEffect to combine multiple effects
A quick test with CLSID_D2D1Crop, CLSID_D2D1Scale and CLSID_D2D1GaussianBlur (bad quality GIF for Gaussian, but it is for the idea...) :
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
An example from https://learn.microsoft.com/en-us/windows/win32/direct2d/gaussian-blur:
ComPtr<ID2D1Effect> gaussianBlurEffect;
m_d2dContext->CreateEffect(CLSID_D2D1GaussianBlur, &gaussianBlurEffect);
gaussianBlurEffect->SetInput(0, bitmap);
gaussianBlurEffect->SetValue(D2D1_GAUSSIANBLUR_PROP_STANDARD_DEVIATION, 3.0f);
m_d2dContext->BeginDraw();
m_d2dContext->DrawImage(gaussianBlurEffect.Get());
m_d2dContext->EndDraw();
In the example above, I have understand how effect works in Direct2D. However, the example above is only limited to applying the effect into a bitmap (ID2D1Bitmap?).
What I want to achieve with Direct2D effect is:
Use ID2D1Effect::SetInputEffect to combine multiple effects
A quick test with CLSID_D2D1Crop, CLSID_D2D1Scale and CLSID_D2D1GaussianBlur (bad quality GIF for Gaussian, but it is for the idea...) :
Hi, @thebluetropics
According to the Doc: Effects
You can use Direct2D to apply one or more high quality effects to an image or a set of images.
ID2D1Effect::SetInput method: Sets the given input image by index.
As far as I'm concerned, Direct2D Effects is limited to applying the effect to image.