I would recommend using a bitmap as the input to the effect rather than the image source. Simply drawing the image source into that bitmap should work. They could also create the bitmap from a WIC bitmap source using the D2D API CreateBitmapFromWicBitmap.
Direct2D tile bug when size is over 4K?
Michael Chourdakis
66
Reputation points
This is a follow up from https://stackoverflow.com/questions/67875906/direct2d-tile-limitation?noredirect=1#comment119984097_67875906.
It seems that, when creating custom Direct2D HLSL filters up to 4K resolution the SetRenderingControls work:
D2D1_RENDERING_CONTROLS r4c = {};
m_d2dContext->GetRenderingControls(&r4c);
if (r4c.tileSize.width < (UINT32)wi || r4c.tileSize.height < (UINT32)he)
{
r4c.tileSize.width = wi;
r4c.tileSize.height = he;
m_d2dContext->SetRenderingControls(r4c);
m_d2dContext->GetRenderingControls(&r4c);
nop();
}
This overrides the default 1024x1024 tiling. However this does not work on 8K resolution. It still has tiling and this is a killing for HLSL effects that rely on the entire texture to work, like this lighting.
Is this a bug? Is it a limitation of Direct2D ?
Windows development | Windows API - Win32
2,789 questions
Developer technologies | C++
3,977 questions