godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.35k stars 21.06k forks source link

[3D] Textures are blurry in game but appear normal on the editor #75609

Closed JoaoOliveira0117 closed 1 year ago

JoaoOliveira0117 commented 1 year ago

Godot version

4.0

System information

Windows 11, RTX 2060, Vulkan. Using compatibility mode for renderer

Issue description

I want my textures to be as pixelated as possible since i'm trying to replicate the ps1 effect, however the textures appear as normal only on the engine's editor:

image

When i play the scene, all the textures become blurry:

image

I've changed the renderer's texture filtering to nearest and changed between the image's import compression modes to see if there was any different results but none helped me. Already deleted the .godot/imported folder and opened the project again but that didnt helped me. Changed mipmap configs for both project and individual textures, no changes. Changed rendering mode, no changes.

There's more details here on this thread:

https://godotforums.org/d/33420-blurry-textures-ingame-but-normal-textures-on-editor/7

Steps to reproduce

  1. Use a 64x64 pixel art texture on any mesh.
  2. Change the compression mode of the texture and re-import.

Minimal reproduction project

https://github.com/JoaoOliveira0117/project-horror

SaraAnita1 commented 1 year ago

I don't know how to fix this question but I hope you get your answer soon <3

DillonSteyl commented 1 year ago

I downloaded the project from your github account and was unable to replicate the issue. First I went through all of the images and changed the compression mode to "lossless". Then I went through each material and updated the sampling to use "Nearest"... image and I got the desired result from the textures image

JoaoOliveira0117 commented 1 year ago

@DillonSteyl Your suggestion solved my issue, thank you.

I also needed to add the filter_nearest to the sampler2D of the textures i was using, and now everything is working fine.