1
Graphics / RenderTexture blurry when scaled up
« on: October 14, 2024, 12:58:42 am »
Hello,
I have an issue when drawing to RenderTexture and then its texture to RenderWindow. For context, when window gets resized I'm using viewport to fill the window as much as possible while keeping original aspect ratio with letterbox effect and while keeping original view size. That way the resolution always stays the same and image just gets scaled to fit in window. That is working well, but I noticed that if window size is greater than view, RenderTexture gets blurry when drawn through Sprite much more than when drawing directly to window. I tried with setSmooth but didn't help. There is no scaling, shaders or anything similar at play other than changed viewport.
What can cause this and how to make RenderTexture appear the same as it appears when drawing without it?
Thanks
The attachment shows what drawing looks like when drawing straight to window (no RenderTexture) vs. when drawing to RenderTexture and then to window.
I have an issue when drawing to RenderTexture and then its texture to RenderWindow. For context, when window gets resized I'm using viewport to fill the window as much as possible while keeping original aspect ratio with letterbox effect and while keeping original view size. That way the resolution always stays the same and image just gets scaled to fit in window. That is working well, but I noticed that if window size is greater than view, RenderTexture gets blurry when drawn through Sprite much more than when drawing directly to window. I tried with setSmooth but didn't help. There is no scaling, shaders or anything similar at play other than changed viewport.
What can cause this and how to make RenderTexture appear the same as it appears when drawing without it?
Thanks
The attachment shows what drawing looks like when drawing straight to window (no RenderTexture) vs. when drawing to RenderTexture and then to window.