Properly initialize u/v texture size for motion vectors.

This commit is contained in:
Kai Blaschke
2023-09-09 17:26:09 +02:00
parent 48b8d6a0aa
commit c08de98a7d

View File

@ -60,8 +60,9 @@ void MilkdropPreset::Initialize(const RenderContext& renderContext)
// Initialize variables and code now we have a proper render state.
CompileCodeAndRunInitExpressions();
// Update framebuffer size if needed
// Update framebuffer and texture sizes if needed
m_framebuffer.SetSize(renderContext.viewportSizeX, renderContext.viewportSizeY);
m_motionVectorUVMap->SetSize(renderContext.viewportSizeX, renderContext.viewportSizeY);
if (m_state.mainTexture.expired())
{
m_state.mainTexture = m_framebuffer.GetColorAttachmentTexture(1, 0);