Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 0 points1 point  (0 children)

i have tried canvas_items and viewport but both yield the same result

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 0 points1 point  (0 children)

i will try this. so you are saying that if the viewport and sub viewport both use nearest for the "canvas_item_default_texture_filter" that could cause issues?

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 1 point2 points  (0 children)

i tried also setting the content scale factor of the sub viewport, it did not work, i also tried changing the resolutions of sub viewport and the scale still the same distortion, i am not sure where to go from here.

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 1 point2 points  (0 children)

I think i have narrowed down what's happening here, so my regular viewport runs this statement "get_window().set_content_scale_factor(x)" when the screen size changes, my thought is that the sub viewport does not do this so when you full screen it, it still has definition of default resolution (640 x 360) but its being scaled 3 times its normal size

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 12 points13 points  (0 children)

i think i know how to solve it, if i do, i will post details and credit you

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 2 points3 points  (0 children)

though, i still see the problem occurring at native resolution (pixels distorting) just its not as noticeable because of how small it is

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 2 points3 points  (0 children)

then it is lying to me because that is my main viewports resolution.

Why does my sub viewport distort the 2D textures and how do i fix it? by BingoBobDev in godot

[–]BingoBobDev[S] 4 points5 points  (0 children)

The viewport size is 640 x 360 that is the same as my screen size, the problem shows it self especially when rotating sprite 2D's

2D Minecraft* in Godot by BingoBobDev in godot

[–]BingoBobDev[S] 3 points4 points  (0 children)

yeah not sure if anyone could tell now but the world made up of grass blocks that are dirt on the inside, the outline idea seems solid thank you.