diff --git a/Source/Engine/Graphics/Textures/GPUTexture.h b/Source/Engine/Graphics/Textures/GPUTexture.h index 28007196d..6c4d03063 100644 --- a/Source/Engine/Graphics/Textures/GPUTexture.h +++ b/Source/Engine/Graphics/Textures/GPUTexture.h @@ -36,7 +36,8 @@ protected: _parent = parent; _format = format; _msaa = msaa; - LastRenderTime = &parent->LastRenderTime; + if (parent) + LastRenderTime = &parent->LastRenderTime; } public: diff --git a/Source/Engine/Render2D/Render2D.cpp b/Source/Engine/Render2D/Render2D.cpp index 8c6760ba8..9f0c40367 100644 --- a/Source/Engine/Render2D/Render2D.cpp +++ b/Source/Engine/Render2D/Render2D.cpp @@ -1053,10 +1053,10 @@ void DrawBatch(int32 startIndex, int32 count) } // Skip if no chance to render anything + renderTargetWidth = Math::AlignDown(renderTargetWidth, 4); + renderTargetHeight = Math::AlignDown(renderTargetHeight, 4); if (renderTargetWidth <= 0 || renderTargetHeight <= 0) - { return; - } // Get temporary textures auto desc = GPUTextureDescription::New2D(renderTargetWidth, renderTargetHeight, PS_Blur_Format);